Bug 1349418 - Remove checkerboarding code and just use an opaque background color behind root scroll frames. r=kats

This commit is contained in:
Markus Stange
2017-04-10 17:01:53 +12:00
parent 85f31a7ad5
commit f510a8a0ad
12 changed files with 21 additions and 111 deletions

View File

@@ -209,8 +209,7 @@ ContainerPrepare(ContainerT* aContainer,
// We don't want to skip container layers because otherwise their mPrepared
// may be null which is not allowed.
if (!layerToRender->GetLayer()->AsContainerLayer()) {
if (!layerToRender->GetLayer()->IsVisible() &&
!layerToRender->NeedToDrawCheckerboarding(nullptr)) {
if (!layerToRender->GetLayer()->IsVisible()) {
CULLING_LOG("Sublayer %p has no effective visible region\n", layerToRender->GetLayer());
continue;
}
@@ -419,24 +418,6 @@ RenderLayers(ContainerT* aContainer, LayerManagerComposite* aManager,
}
}
Color color;
if (layerToRender->NeedToDrawCheckerboarding(&color)) {
if (gfxPrefs::APZHighlightCheckerboardedAreas()) {
color = Color(255 / 255.f, 188 / 255.f, 217 / 255.f, 1.f); // "Cotton Candy"
}
// Ideally we would want to intersect the checkerboard region from the APZ with the layer bounds
// and only fill in that area. However the layer bounds takes into account the base translation
// for the painted layer whereas the checkerboard region does not. One does not simply
// intersect areas in different coordinate spaces. So we do this a little more permissively
// and only fill in the background when we know there is checkerboard, which in theory
// should only occur transiently.
EffectChain effectChain(layer);
effectChain.mPrimaryEffect = new EffectSolidColor(color);
aManager->GetCompositor()->DrawGeometry(gfx::Rect(layer->GetLayerBounds()), clipRect,
effectChain, layer->GetEffectiveOpacity(),
layer->GetEffectiveTransform(), Nothing());
}
if (layerToRender->HasLayerBeenComposited()) {
// Composer2D will compose this layer so skip GPU composition
// this time. The flag will be reset for the next composition phase