Bug 865104 - Implement a BasicCompositor. r=nrc

This commit is contained in:
Matt Woodrow
2013-05-01 12:42:05 +12:00
parent b12fa52160
commit c16f4c4e13
22 changed files with 609 additions and 84 deletions

View File

@@ -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);
}