Bug 944703 - Part 6: make DeprecatedSharedPlanarYCbCrImage hold a strong reference to its ISurfaceAllocator - r=nical

This commit is contained in:
Benoit Jacob 2013-12-03 13:44:38 -05:00
parent 0e4939b19e
commit 759b559e56
2 changed files with 8 additions and 7 deletions

View File

@ -45,6 +45,12 @@ SharedPlanarYCbCrImage::~SharedPlanarYCbCrImage() {
}
}
DeprecatedSharedPlanarYCbCrImage::DeprecatedSharedPlanarYCbCrImage(ISurfaceAllocator* aAllocator)
: PlanarYCbCrImage(nullptr)
, mSurfaceAllocator(aAllocator), mAllocated(false)
{
MOZ_COUNT_CTOR(DeprecatedSharedPlanarYCbCrImage);
}
DeprecatedSharedPlanarYCbCrImage::~DeprecatedSharedPlanarYCbCrImage() {
MOZ_COUNT_DTOR(DeprecatedSharedPlanarYCbCrImage);

View File

@ -30,12 +30,7 @@ class TextureClient;
class DeprecatedSharedPlanarYCbCrImage : public PlanarYCbCrImage
{
public:
DeprecatedSharedPlanarYCbCrImage(ISurfaceAllocator* aAllocator)
: PlanarYCbCrImage(nullptr)
, mSurfaceAllocator(aAllocator), mAllocated(false)
{
MOZ_COUNT_CTOR(DeprecatedSharedPlanarYCbCrImage);
}
DeprecatedSharedPlanarYCbCrImage(ISurfaceAllocator* aAllocator);
~DeprecatedSharedPlanarYCbCrImage();
@ -89,7 +84,7 @@ public:
private:
ipc::Shmem mShmem;
ISurfaceAllocator* mSurfaceAllocator;
RefPtr<ISurfaceAllocator> mSurfaceAllocator;
bool mAllocated;
};