Bug 907745 - Add comments to prepare for bug 908196. r=bjacob

This commit is contained in:
Nicolas Silva 2013-08-28 15:21:13 +02:00
parent 21124fcd0b
commit 28c91403fd
2 changed files with 18 additions and 4 deletions

View File

@ -166,6 +166,16 @@ TemporaryRef<BufferTextureClient>
CompositableClient::CreateBufferTextureClient(gfx::SurfaceFormat aFormat,
uint32_t aTextureFlags)
{
// XXX - Once bug 908196 is fixed, we can use gralloc textures here which will
// improve performances of videos using SharedPlanarYCbCrImage on b2g.
//#ifdef MOZ_WIDGET_GONK
// {
// RefPtr<BufferTextureClient> result = new GrallocTextureClientOGL(this,
// aFormat,
// aTextureFlags);
// return result.forget();
// }
//#endif
if (gfxPlatform::GetPlatform()->PreferMemoryOverShmem()) {
RefPtr<BufferTextureClient> result = new MemoryTextureClient(this, aFormat, aTextureFlags);
return result.forget();

View File

@ -196,12 +196,8 @@ public:
virtual bool ToSurfaceDescriptor(SurfaceDescriptor& aDescriptor) = 0;
virtual bool Allocate(uint32_t aSize) = 0;
virtual uint8_t* GetBuffer() const = 0;
virtual size_t GetBufferSize() const = 0;
virtual gfx::IntSize GetSize() const { return mSize; }
// TextureClientSurface
@ -226,6 +222,14 @@ public:
gfx::SurfaceFormat GetFormat() const { return mFormat; }
// XXX - Bug 908196 - Make Allocate(uint32_t) and GetBufferSize() protected.
// these two methods should only be called by methods of BufferTextureClient
// that are overridden in GrallocTextureClient (which does not implement the
// two methods below)
virtual bool Allocate(uint32_t aSize) = 0;
virtual size_t GetBufferSize() const = 0;
protected:
CompositableClient* mCompositable;
gfx::SurfaceFormat mFormat;