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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user