Bug 973892 - Fix b2g bustage on a CLOSED TREE.
--- a/gfx/layers/GrallocImages.cpp
+++ b/gfx/layers/GrallocImages.cpp
@@ -391,16 +391,16 @@ GrallocImage::GetTextureClient(Composita
return nullptr;
}
const SurfaceDescriptorGralloc& desc = sd.get_SurfaceDescriptorGralloc();
TextureFlags flags = desc.external() ? TEXTURE_DEALLOCATE_CLIENT : 0;
if (desc.isRBSwapped()) {
flags |= TEXTURE_RB_SWAPPED;
}
GrallocBufferActor* actor = static_cast<GrallocBufferActor*>(desc.bufferChild());
- mTextureClient = new GrallocTextureClientOGL(actor, mSize, flags);
+ mTextureClient = new GrallocTextureClientOGL(actor, mSize, gfx::BackendType::NONE, flags);
mTextureClient->SetGraphicBufferLocked(mGraphicBufferLocked);
}
return mTextureClient;
}
} // namespace layers
} // namespace mozilla
--- a/gfx/layers/client/CompositableClient.cpp
+++ b/gfx/layers/client/CompositableClient.cpp
@@ -291,17 +291,18 @@ CompositableClient::CreateTextureClientF
{
result = new TextureClientX11(aFormat, aTextureFlags);
}
#endif
#endif
#ifdef MOZ_WIDGET_GONK
if (!DisableGralloc(aFormat)) {
- result = new GrallocTextureClientOGL(this, aFormat, aTextureFlags);
+ result = new GrallocTextureClientOGL(this, aFormat, aMoz2DBackend,
+ aTextureFlags);
}
#endif
// Can't do any better than a buffer texture client.
if (!result) {
result = CreateBufferTextureClient(aFormat, aTextureFlags, aMoz2DBackend);
}
--- a/gfx/layers/opengl/GrallocTextureClient.cpp
+++ b/gfx/layers/opengl/GrallocTextureClient.cpp
@@ -88,39 +88,42 @@ GrallocTextureClientOGL::DropTextureData
mGrallocActor = nullptr;
mGraphicBuffer = nullptr;
return result;
}
}
GrallocTextureClientOGL::GrallocTextureClientOGL(GrallocBufferActor* aActor,
gfx::IntSize aSize,
+ gfx::BackendType aMoz2DBackend,
TextureFlags aFlags)
-: BufferTextureClient(nullptr, gfx::SurfaceFormat::UNKNOWN, aFlags)
+: BufferTextureClient(nullptr, gfx::SurfaceFormat::UNKNOWN, aMoz2DBackend, aFlags)
, mAllocator(nullptr)
, mMappedBuffer(nullptr)
{
InitWith(aActor, aSize);
MOZ_COUNT_CTOR(GrallocTextureClientOGL);
}
GrallocTextureClientOGL::GrallocTextureClientOGL(CompositableClient* aCompositable,
gfx::SurfaceFormat aFormat,
+ gfx::BackendType aMoz2DBackend,
TextureFlags aFlags)
-: BufferTextureClient(aCompositable, aFormat, aFlags)
+: BufferTextureClient(aCompositable, aFormat, aMoz2DBackend, aFlags)
, mAllocator(nullptr)
, mMappedBuffer(nullptr)
{
MOZ_COUNT_CTOR(GrallocTextureClientOGL);
}
GrallocTextureClientOGL::GrallocTextureClientOGL(ISurfaceAllocator* aAllocator,
gfx::SurfaceFormat aFormat,
+ gfx::BackendType aMoz2DBackend,
TextureFlags aFlags)
-: BufferTextureClient(nullptr, aFormat, aFlags)
+: BufferTextureClient(nullptr, aFormat, aMoz2DBackend, aFlags)
, mAllocator(aAllocator)
, mMappedBuffer(nullptr)
{
MOZ_COUNT_CTOR(GrallocTextureClientOGL);
}
GrallocTextureClientOGL::~GrallocTextureClientOGL()
{
--- a/gfx/layers/opengl/GrallocTextureClient.h
+++ b/gfx/layers/opengl/GrallocTextureClient.h
@@ -30,22 +30,25 @@ class GraphicBufferLocked;
*
* This is only used in Firefox OS
*/
class GrallocTextureClientOGL : public BufferTextureClient
{
public:
GrallocTextureClientOGL(GrallocBufferActor* aActor,
gfx::IntSize aSize,
+ gfx::BackendType aMoz2DMackend,
TextureFlags aFlags = TEXTURE_FLAGS_DEFAULT);
GrallocTextureClientOGL(CompositableClient* aCompositable,
gfx::SurfaceFormat aFormat,
+ gfx::BackendType aMoz2DMackend,
TextureFlags aFlags = TEXTURE_FLAGS_DEFAULT);
GrallocTextureClientOGL(ISurfaceAllocator* aAllocator,
gfx::SurfaceFormat aFormat,
+ gfx::BackendType aMoz2DMackend,
TextureFlags aFlags = TEXTURE_FLAGS_DEFAULT);
~GrallocTextureClientOGL();
virtual bool Lock(OpenMode aMode) MOZ_OVERRIDE;
virtual void Unlock() MOZ_OVERRIDE;