Bug 904620 - Always send a transaction when we get a WebGL update to ensure that we get a composite. r=nrc

This commit is contained in:
Matt Woodrow 2013-08-20 11:39:55 +12:00
parent 7535ca5ecb
commit 4d9a2a8167
3 changed files with 6 additions and 9 deletions

View File

@ -128,17 +128,13 @@ DeprecatedCanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
void
DeprecatedCanvasClientSurfaceStream::Updated()
{
if (mNeedsUpdate) {
mForwarder->UpdateTextureNoSwap(this, 1, mDeprecatedTextureClient->GetDescriptor());
mNeedsUpdate = false;
}
mForwarder->UpdateTextureNoSwap(this, 1, mDeprecatedTextureClient->GetDescriptor());
}
DeprecatedCanvasClientSurfaceStream::DeprecatedCanvasClientSurfaceStream(CompositableForwarder* aFwd,
TextureFlags aFlags)
: CanvasClient(aFwd, aFlags)
, mNeedsUpdate(false)
{
mTextureInfo.mCompositableType = BUFFER_IMAGE_SINGLE;
}
@ -180,7 +176,6 @@ DeprecatedCanvasClientSurfaceStream::Update(gfx::IntSize aSize, ClientCanvasLaye
printf_stderr("isCrossProcess, but not MOZ_WIDGET_GONK! Someone needs to write some code!");
MOZ_ASSERT(false);
#endif
mNeedsUpdate = true;
} else {
SurfaceStreamHandle handle = stream->GetShareHandle();
SurfaceDescriptor *desc = mDeprecatedTextureClient->GetDescriptor();
@ -193,7 +188,6 @@ DeprecatedCanvasClientSurfaceStream::Update(gfx::IntSize aSize, ClientCanvasLaye
// Ref this so the SurfaceStream doesn't disappear unexpectedly. The
// Compositor will need to unref it when finished.
aLayer->mGLContext->AddRef();
mNeedsUpdate = true;
}
}

View File

@ -132,7 +132,6 @@ public:
private:
RefPtr<DeprecatedTextureClient> mDeprecatedTextureClient;
bool mNeedsUpdate;
};
}

View File

@ -618,7 +618,11 @@ SurfaceStreamHostOGL::UpdateImpl(const SurfaceDescriptor& aImage,
const SurfaceStreamDescriptor& streamDesc =
aImage.get_SurfaceStreamDescriptor();
mStream = SurfaceStream::FromHandle(streamDesc.handle());
SurfaceStream *stream = SurfaceStream::FromHandle(streamDesc.handle());
if (stream == mStream) {
return;
}
mStream = stream;
MOZ_ASSERT(mStream);
mStreamGL = dont_AddRef(mStream->GLContext());
}