Bug 865104 - Implement a BasicCompositor. r=nrc
This commit is contained in:
@@ -20,7 +20,8 @@ namespace layers {
|
||||
/* static */ TemporaryRef<ContentClient>
|
||||
ContentClient::CreateContentClient(CompositableForwarder* aForwarder)
|
||||
{
|
||||
if (aForwarder->GetCompositorBackendType() != LAYERS_OPENGL) {
|
||||
if (aForwarder->GetCompositorBackendType() != LAYERS_OPENGL &&
|
||||
aForwarder->GetCompositorBackendType() != LAYERS_BASIC) {
|
||||
return nullptr;
|
||||
}
|
||||
if (LayerManagerComposite::SupportsDirectTexturing() ||
|
||||
@@ -132,8 +133,10 @@ ContentClientRemote::BuildTextureClients(ContentType aType,
|
||||
}
|
||||
mTextureInfo.mTextureFlags = aFlags | HostRelease;
|
||||
mTextureClient = CreateTextureClient(TEXTURE_CONTENT);
|
||||
MOZ_ASSERT(mTextureClient, "Failed to create texture client");
|
||||
if (aFlags & BUFFER_COMPONENT_ALPHA) {
|
||||
mTextureClientOnWhite = CreateTextureClient(TEXTURE_CONTENT);
|
||||
MOZ_ASSERT(mTextureClientOnWhite, "Failed to create texture client");
|
||||
mTextureInfo.mTextureFlags |= ComponentAlpha;
|
||||
}
|
||||
|
||||
@@ -256,6 +259,7 @@ void
|
||||
ContentClientDoubleBuffered::CreateFrontBufferAndNotify(const nsIntRect& aBufferRect)
|
||||
{
|
||||
mFrontClient = CreateTextureClient(TEXTURE_CONTENT);
|
||||
MOZ_ASSERT(mFrontClient, "Failed to create texture client");
|
||||
mFrontClient->EnsureAllocated(mSize, mContentType);
|
||||
|
||||
mFrontBufferRect = aBufferRect;
|
||||
@@ -263,6 +267,7 @@ ContentClientDoubleBuffered::CreateFrontBufferAndNotify(const nsIntRect& aBuffer
|
||||
|
||||
if (mTextureInfo.mTextureFlags & ComponentAlpha) {
|
||||
mFrontClientOnWhite = CreateTextureClient(TEXTURE_CONTENT);
|
||||
MOZ_ASSERT(mFrontClientOnWhite, "Failed to create texture client");
|
||||
mFrontClientOnWhite->EnsureAllocated(mSize, mContentType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user