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

This commit is contained in:
Sotaro Ikeda
2014-07-18 12:40:35 -07:00
parent 8262ce0c76
commit 010ff9062f
11 changed files with 77 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);
}
}