Bug 656185 - Part 2 - Upload the entire image for PlanarYCbCrImageOGL to a texture and clip using texture coordinates. r=derf
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include "nsCoreAnimationSupport.h"
|
||||
#include "mozilla/ReentrantMonitor.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/mozalloc.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
@@ -407,6 +408,12 @@ public:
|
||||
PRUint32 mPicY;
|
||||
gfxIntSize mPicSize;
|
||||
StereoMode mStereoMode;
|
||||
|
||||
nsIntRect GetPictureRect() const {
|
||||
return nsIntRect(mPicX, mPicY,
|
||||
mPicSize.width,
|
||||
mPicSize.height);
|
||||
}
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -433,6 +440,20 @@ public:
|
||||
*/
|
||||
virtual const Data* GetData() { return nsnull; }
|
||||
|
||||
/**
|
||||
* Make a copy of the YCbCr data.
|
||||
*
|
||||
* @param aDest Data object to store the plane data in.
|
||||
* @param aDestSize Size of the Y plane that was copied.
|
||||
* @param aDestBufferSize Number of bytes allocated for storage.
|
||||
* @param aData Input image data.
|
||||
* @return Raw data pointer for the planes or nsnull on failure.
|
||||
*/
|
||||
PRUint8 *CopyData(Data& aDest, gfxIntSize& aDestSize,
|
||||
PRUint32& aDestBufferSize, const Data& aData);
|
||||
|
||||
virtual PRUint8* AllocateBuffer(PRUint32 aSize);
|
||||
|
||||
protected:
|
||||
PlanarYCbCrImage(void* aImplData) : Image(aImplData, PLANAR_YCBCR) {}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user