Backed out changeset ec335dbccfbd (bug 1067748) for reftest failures

This commit is contained in:
Carsten "Tomcat" Book 2014-09-16 09:31:20 +02:00
parent 1e93de37df
commit 8d4febe0fa

View File

@ -2349,11 +2349,7 @@ ThebesLayerData::Accumulate(ContainerState* aState,
bool clipMatches = mItemClip == aClip;
mItemClip = aClip;
nscolor uniformColor;
bool isUniform = aItem->IsUniform(aState->mBuilder, &uniformColor);
if (!mIsSolidColorInVisibleRegion && !isUniform &&
mOpaqueRegion.Contains(aDrawRect) &&
if (!mIsSolidColorInVisibleRegion && mOpaqueRegion.Contains(aDrawRect) &&
mVisibleRegion.Contains(aVisibleRect)) {
// A very common case! Most pages have a ThebesLayer with the page
// background (opaque) visible and most or all of the page content over the
@ -2367,6 +2363,9 @@ ThebesLayerData::Accumulate(ContainerState* aState,
return;
}
nscolor uniformColor;
bool isUniform = aItem->IsUniform(aState->mBuilder, &uniformColor);
// Some display items have to exist (so they can set forceTransparentSurface
// below) but don't draw anything. They'll return true for isUniform but
// a color with opacity 0.
@ -2387,11 +2386,6 @@ ThebesLayerData::Accumulate(ContainerState* aState,
// This color is all we have
mSolidColor = uniformColor;
mIsSolidColorInVisibleRegion = true;
} else if (NS_GET_A(uniformColor) == 255 &&
aVisibleRect.Contains(mVisibleRegion.GetBounds())) {
// This color covers everything else in the layer
mSolidColor = uniformColor;
mIsSolidColorInVisibleRegion = true;
} else if (mIsSolidColorInVisibleRegion &&
mVisibleRegion.IsEqual(nsIntRegion(aVisibleRect)) &&
clipMatches) {