Bug 1507078 - Add mContinuousUpdate handling to RenderAndroidSurfaceTextureHostOGL r=nical

When mContinuousUpdate is true, UpdateTexImage() needs to be called for each rendering.

Differential Revision: https://phabricator.services.mozilla.com/D27232

--HG--
extra : moz-landing-system : lando
This commit is contained in:
sotaro 2019-04-12 16:58:36 +00:00
Родитель 96ef73cc3d
Коммит 1df1c7709c
2 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -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();
}

Просмотреть файл

@ -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;