Bug 649417 - Part 2 - Add a YUV option to SharedImage and use it to share YUV data across processes. r=cjones,joe

This commit is contained in:
Matt Woodrow
2011-04-21 16:38:39 +12:00
parent fc21b7078a
commit 9f9df90122
11 changed files with 369 additions and 66 deletions

View File

@@ -162,6 +162,12 @@ public:
*/
virtual void SetCurrentImage(Image* aImage) = 0;
/**
* Ask any PlanarYCbCr images created by this container to delay
* YUV -> RGB conversion until draw time. See PlanarYCbCrImage::SetDelayedConversion.
*/
virtual void SetDelayedConversion(PRBool aDelayed) {}
/**
* Get the current Image.
* This has to add a reference since otherwise there are race conditions
@@ -415,6 +421,18 @@ public:
*/
virtual void SetData(const Data& aData) = 0;
/**
* Ask this Image to not convert YUV to RGB during SetData, and make
* the original data available through GetData. This is optional,
* and not all PlanarYCbCrImages will support it.
*/
virtual void SetDelayedConversion(PRBool aDelayed) { }
/**
* Grab the original YUV data. This is optional.
*/
virtual const Data* GetData() { return nsnull; }
protected:
PlanarYCbCrImage(void* aImplData) : Image(aImplData, PLANAR_YCBCR) {}
};