Bug 709490 - Part 9: Readback without blocking main thread. r=jgilbert

This commit is contained in:
Morris Tseng
2015-10-05 10:50:16 +08:00
parent 763f11b31c
commit 1e04cd9230
18 changed files with 477 additions and 24 deletions

View File

@@ -411,6 +411,15 @@ CanvasClientSharedSurface::UpdateRenderer(gfx::IntSize aSize, Renderer& aRendere
auto layersBackend = shadowForwarder->GetCompositorBackendType();
mReadbackClient = TexClientFromReadback(surf, forwarder, flags, layersBackend);
if (asyncRenderer) {
// Above codes will readback the GLContext to mReadbackClient
// in order to send frame to compositor. We copy from this
// TextureClient directly by calling CopyFromTextureClient().
// Therefore, if main-thread want the content of GLContext,
// it don't have to readback it again.
asyncRenderer->CopyFromTextureClient(mReadbackClient);
}
newFront = mReadbackClient;
} else {
mReadbackClient = nullptr;