Bug 1039883 - release Tiled layer's gralloc when an application is background r=nical

This commit is contained in:
Sotaro Ikeda
2014-07-18 06:21:24 -07:00
parent c447495f01
commit 493aa8441b
11 changed files with 54 additions and 12 deletions

View File

@@ -47,9 +47,11 @@ GrallocTextureClientOGL::GrallocTextureClientOGL(ISurfaceAllocator* aAllocator,
GrallocTextureClientOGL::~GrallocTextureClientOGL()
{
MOZ_COUNT_DTOR(GrallocTextureClientOGL);
if (ShouldDeallocateInDestructor()) {
ISurfaceAllocator* allocator = GetAllocator();
ISurfaceAllocator* allocator = GetAllocator();
if (ShouldDeallocateInDestructor()) {
allocator->DeallocGrallocBuffer(&mGrallocHandle);
} else {
allocator->DropGrallocBuffer(&mGrallocHandle);
}
}