Bug 947045 - Use Xlib surfaces in basic compositor (r=mattwoodrow)

This commit is contained in:
David Anderson
2014-02-05 08:39:02 -08:00
parent c9cf160717
commit 8de7fda523
7 changed files with 428 additions and 0 deletions

View File

@@ -17,6 +17,9 @@
#include "gfxWindowsPlatform.h"
#include "gfx2DGlue.h"
#endif
#ifdef XP_LINUX
#include "mozilla/layers/TextureClientX11.h"
#endif
using namespace mozilla::gfx;
@@ -212,6 +215,17 @@ CompositableClient::CreateTextureClientForDrawing(SurfaceFormat aFormat,
}
}
#endif
#ifdef MOZ_X11
LayersBackend parentBackend = GetForwarder()->GetCompositorBackendType();
if (parentBackend == LayersBackend::LAYERS_BASIC &&
gfxPlatform::GetPlatform()->ScreenReferenceSurface()->GetType() == gfxSurfaceType::Xlib &&
!(aTextureFlags & TEXTURE_ALLOC_FALLBACK))
{
result = new TextureClientX11(aFormat, aTextureFlags);
}
#endif
// Can't do any better than a buffer texture client.
if (!result) {
result = CreateBufferTextureClient(aFormat, aTextureFlags);