Backed out 4 changesets (bug 991028) for nonunified bustage

CLOSED TREE

Backed out changeset 147581a518c3 (bug 991028)
Backed out changeset e5bacc566e58 (bug 991028)
Backed out changeset 6dc852777a4d (bug 991028)
Backed out changeset 780bec5571b9 (bug 991028)
This commit is contained in:
Phil Ringnalda
2014-04-06 21:21:38 -07:00
parent d4da7c0a21
commit 9724e72fe9
37 changed files with 1146 additions and 116 deletions

View File

@@ -36,7 +36,12 @@ public:
virtual void DeallocateSharedData(ISurfaceAllocator* allocator) MOZ_OVERRIDE
{
allocator->DeallocGrallocBuffer(mGrallocActor);
// We just need to wrap the actor in a SurfaceDescriptor because that's what
// ISurfaceAllocator uses as input, we don't care about the other parameters.
SurfaceDescriptor sd = SurfaceDescriptorGralloc(nullptr, mGrallocActor,
IntSize(0, 0),
false, false);
allocator->DestroySharedSurface(&sd);
mGrallocActor = nullptr;
}
@@ -80,8 +85,16 @@ GrallocTextureClientOGL::~GrallocTextureClientOGL()
{
MOZ_COUNT_DTOR(GrallocTextureClientOGL);
if (ShouldDeallocateInDestructor()) {
// If the buffer has never been shared we must deallocate it or it would
// leak.
// We just need to wrap the actor in a SurfaceDescriptor because that's what
// ISurfaceAllocator uses as input, we don't care about the other parameters.
SurfaceDescriptor sd = SurfaceDescriptorGralloc(nullptr, mGrallocActor,
IntSize(0, 0),
false, false);
ISurfaceAllocator* allocator = GetAllocator();
allocator->DeallocGrallocBuffer(mGrallocActor);
allocator->DestroySharedSurface(&sd);
}
}