зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1021845 - Don't skip checkerboarding layers during compositing, even if the layer's visible region is empty. r=botond
--HG-- extra : commitid : 2b5dQN09gIh extra : rebase_source : 8bd2dfcf4b17a4ceb863e8744ffbcdf17c6f8fc6
This commit is contained in:
Родитель
96c1739213
Коммит
3209f1f0b4
|
@ -323,6 +323,14 @@ ContainerRenderVR(ContainerT* aContainer,
|
||||||
DUMP("<<< ContainerRenderVR [%p]\n", aContainer);
|
DUMP("<<< ContainerRenderVR [%p]\n", aContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool
|
||||||
|
NeedToDrawCheckerboardingForLayer(Layer* aLayer, Color* aOutCheckerboardingColor)
|
||||||
|
{
|
||||||
|
return (aLayer->GetContentFlags() & Layer::CONTENT_OPAQUE) &&
|
||||||
|
aLayer->IsOpaqueForVisibility() &&
|
||||||
|
LayerHasCheckerboardingAPZC(aLayer, aOutCheckerboardingColor);
|
||||||
|
}
|
||||||
|
|
||||||
/* all of the prepared data that we need in RenderLayer() */
|
/* all of the prepared data that we need in RenderLayer() */
|
||||||
struct PreparedData
|
struct PreparedData
|
||||||
{
|
{
|
||||||
|
@ -368,7 +376,8 @@ ContainerPrepare(ContainerT* aContainer,
|
||||||
// We don't want to skip container layers because otherwise their mPrepared
|
// We don't want to skip container layers because otherwise their mPrepared
|
||||||
// may be null which is not allowed.
|
// may be null which is not allowed.
|
||||||
if (!layerToRender->GetLayer()->AsContainerLayer()) {
|
if (!layerToRender->GetLayer()->AsContainerLayer()) {
|
||||||
if (!layerToRender->GetLayer()->IsVisible()) {
|
if (!layerToRender->GetLayer()->IsVisible() &&
|
||||||
|
!NeedToDrawCheckerboardingForLayer(layerToRender->GetLayer(), nullptr)) {
|
||||||
CULLING_LOG("Sublayer %p has no effective visible region\n", layerToRender->GetLayer());
|
CULLING_LOG("Sublayer %p has no effective visible region\n", layerToRender->GetLayer());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -533,9 +542,7 @@ RenderLayers(ContainerT* aContainer,
|
||||||
Layer* layer = layerToRender->GetLayer();
|
Layer* layer = layerToRender->GetLayer();
|
||||||
|
|
||||||
Color color;
|
Color color;
|
||||||
if ((layer->GetContentFlags() & Layer::CONTENT_OPAQUE) &&
|
if (NeedToDrawCheckerboardingForLayer(layer, &color)) {
|
||||||
layer->IsOpaqueForVisibility() &&
|
|
||||||
LayerHasCheckerboardingAPZC(layer, &color)) {
|
|
||||||
if (gfxPrefs::APZHighlightCheckerboardedAreas()) {
|
if (gfxPrefs::APZHighlightCheckerboardedAreas()) {
|
||||||
color = Color(255 / 255.f, 188 / 255.f, 217 / 255.f, 1.f); // "Cotton Candy"
|
color = Color(255 / 255.f, 188 / 255.f, 217 / 255.f, 1.f); // "Cotton Candy"
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче