diff --git a/gfx/webrender_bindings/RenderAndroidSurfaceTextureHostOGL.cpp b/gfx/webrender_bindings/RenderAndroidSurfaceTextureHostOGL.cpp index 36fa6d66b6920..95d2ef937dfbc 100644 --- a/gfx/webrender_bindings/RenderAndroidSurfaceTextureHostOGL.cpp +++ b/gfx/webrender_bindings/RenderAndroidSurfaceTextureHostOGL.cpp @@ -18,6 +18,7 @@ RenderAndroidSurfaceTextureHostOGL::RenderAndroidSurfaceTextureHostOGL( gfx::SurfaceFormat aFormat, bool aContinuousUpdate) : mSurfTex(aSurfTex), mSize(aSize), + mContinuousUpdate(aContinuousUpdate), mIsPrepared(false), mAttachedToGLContext(false) { MOZ_COUNT_CTOR_INHERITED(RenderAndroidSurfaceTextureHostOGL, @@ -83,8 +84,12 @@ wr::WrExternalImage RenderAndroidSurfaceTextureHostOGL::Lock( mSurfTex->GetTexName(), aRendering); } - // Bug 1507078, Call UpdateTexImage() only when mContinuousUpdate is true - if (mSurfTex && !mSurfTex->IsSingleBuffer()) { + if (mContinuousUpdate) { + MOZ_ASSERT(!mSurfTex->IsSingleBuffer()); + mSurfTex->UpdateTexImage(); + } else if (!mSurfTex->IsSingleBuffer()) { + // Always calling UpdateTexImage() is not good. + // XXX Bug 1543846 will update this. mSurfTex->UpdateTexImage(); } diff --git a/gfx/webrender_bindings/RenderAndroidSurfaceTextureHostOGL.h b/gfx/webrender_bindings/RenderAndroidSurfaceTextureHostOGL.h index ae71868237025..a53df1d95c1ca 100644 --- a/gfx/webrender_bindings/RenderAndroidSurfaceTextureHostOGL.h +++ b/gfx/webrender_bindings/RenderAndroidSurfaceTextureHostOGL.h @@ -38,7 +38,7 @@ class RenderAndroidSurfaceTextureHostOGL final : public RenderTextureHostOGL { const mozilla::java::GeckoSurfaceTexture::GlobalRef mSurfTex; const gfx::IntSize mSize; - // XXX const bool mContinuousUpdate; + const bool mContinuousUpdate; // XXX const bool mIgnoreTransform; bool mIsPrepared; bool mAttachedToGLContext;