Bug 912766. Use the DIB texture client/host. r=mattwoodrow
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "mozilla/layers/TextureClient.h" // for DeprecatedTextureClient, etc
|
||||
#include "mozilla/layers/TextureClientOGL.h"
|
||||
#include "mozilla/mozalloc.h" // for operator delete, etc
|
||||
#include "gfxASurface.h" // for gfxContentType
|
||||
#ifdef XP_WIN
|
||||
#include "mozilla/layers/TextureD3D9.h"
|
||||
#include "mozilla/layers/TextureD3D11.h"
|
||||
@@ -107,7 +108,8 @@ CompositableChild::Destroy()
|
||||
}
|
||||
|
||||
TemporaryRef<DeprecatedTextureClient>
|
||||
CompositableClient::CreateDeprecatedTextureClient(DeprecatedTextureClientType aDeprecatedTextureClientType)
|
||||
CompositableClient::CreateDeprecatedTextureClient(DeprecatedTextureClientType aDeprecatedTextureClientType,
|
||||
gfxASurface::gfxContentType aContentType)
|
||||
{
|
||||
MOZ_ASSERT(GetForwarder(), "Can't create a texture client if the compositable is not connected to the compositor.");
|
||||
LayersBackend parentBackend = GetForwarder()->GetCompositorBackendType();
|
||||
@@ -145,7 +147,11 @@ CompositableClient::CreateDeprecatedTextureClient(DeprecatedTextureClientType aD
|
||||
}
|
||||
if (parentBackend == LAYERS_D3D9 &&
|
||||
!GetForwarder()->ForwardsToDifferentProcess()) {
|
||||
result = new DeprecatedTextureClientD3D9(GetForwarder(), GetTextureInfo());
|
||||
if (aContentType == gfxASurface::CONTENT_COLOR_ALPHA) {
|
||||
result = new DeprecatedTextureClientDIB(GetForwarder(), GetTextureInfo());
|
||||
} else {
|
||||
result = new DeprecatedTextureClientD3D9(GetForwarder(), GetTextureInfo());
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user