Bug 777430 - In BasicLayerManager::PushGroupForLayer, call the less expensive gfxContext::PushGroup instead of gfxContext::PushGroupAndCopyBackground when possible. r=roc.

This commit is contained in:
Jonathan Watt
2012-08-01 11:03:42 +01:00
parent d72ee745cf
commit a67bfa535f

View File

@@ -74,7 +74,11 @@ BasicLayerManager::PushGroupForLayer(gfxContext* aContext, Layer* aLayer,
} else {
*aNeedsClipToVisibleRegion = false;
result = aContext;
aContext->PushGroupAndCopyBackground(gfxASurface::CONTENT_COLOR_ALPHA);
if (aLayer->GetContentFlags() & Layer::CONTENT_COMPONENT_ALPHA) {
aContext->PushGroupAndCopyBackground(gfxASurface::CONTENT_COLOR_ALPHA);
} else {
aContext->PushGroup(gfxASurface::CONTENT_COLOR_ALPHA);
}
}
return result.forget();
}