Bug 933082 - Part 4: let ClientLayerManager hold a ShadowLayerForwarder instead of inheriting from ShadowLayerForwarder. Make ISurfaceAllocator refcounted. Make SharedSurface_Gralloc keep its mAllocator alive - r=nical

This commit is contained in:
Benoit Jacob
2013-11-26 14:00:29 -05:00
parent 59d0084ae9
commit 00b1601e4a
18 changed files with 75 additions and 61 deletions

View File

@@ -143,7 +143,7 @@ ClientImageLayer::RenderLayer()
flags |= TEXTURE_DISALLOW_BIGIMAGE;
}
mImageClient = ImageClient::CreateImageClient(type,
ClientManager(),
ClientManager()->AsShadowForwarder(),
flags);
if (type == BUFFER_BRIDGE) {
static_cast<ImageClientBridge*>(mImageClient.get())->SetLayer(this);
@@ -154,7 +154,7 @@ ClientImageLayer::RenderLayer()
}
if (HasShadow() && !mContainer->IsAsync()) {
mImageClient->Connect();
ClientManager()->Attach(mImageClient, this);
ClientManager()->AsShadowForwarder()->Attach(mImageClient, this);
}
if (!mImageClient->UpdateImage(mContainer, GetContentFlags())) {
return;