Bug 755078 - Backout previously-landed patch for bug 755078. r=roc

This commit is contained in:
Nicholas Cameron 2012-06-09 14:22:40 -04:00
parent caebb33c05
commit 41314b89f2
3 changed files with 0 additions and 30 deletions

View File

@ -35,8 +35,6 @@ struct PRLogModuleInfo;
# define MOZ_LAYERS_LOG(_args)
#endif // if defined(DEBUG) || defined(PR_LOGGING)
#define MOZ_ENABLE_MASK_LAYERS
class gfxContext;
class nsPaintEvent;
@ -697,7 +695,6 @@ public:
*/
void SetMaskLayer(Layer* aMaskLayer)
{
#ifdef MOZ_ENABLE_MASK_LAYERS
#ifdef DEBUG
if (aMaskLayer) {
gfxMatrix maskTransform;
@ -709,7 +706,6 @@ public:
mMaskLayer = aMaskLayer;
Mutated();
#endif
}
/**

View File

@ -1143,11 +1143,7 @@ ContainerState::ThebesLayerData::UpdateCommonClipCount(
already_AddRefed<ImageContainer>
ContainerState::ThebesLayerData::CanOptimizeImageLayer()
{
#ifdef MOZ_ENABLE_MASK_LAYERS
if (!mImage) {
#else
if (!mImage || !mItemClip.mRoundedClipRects.IsEmpty()) {
#endif
return nsnull;
}
@ -1177,10 +1173,6 @@ ContainerState::PopThebesLayerData()
gfx3DMatrix transform = imageLayer->GetTransform()*
gfx3DMatrix::ScalingMatrix(mParameters.mXScale, mParameters.mYScale, 1.0f);
imageLayer->SetTransform(transform);
#ifndef MOZ_ENABLE_MASK_LAYERS
NS_ASSERTION(data->mItemClip.mRoundedClipRects.IsEmpty(),
"How did we get rounded clip rects here?");
#endif
if (data->mItemClip.mHaveClipRect) {
nsIntRect clip = ScaleToNearestPixels(data->mItemClip.mClipRect);
imageLayer->IntersectClipRect(clip);
@ -1262,7 +1254,6 @@ ContainerState::PopThebesLayerData()
}
userData->mForcedBackgroundColor = backgroundColor;
#ifdef MOZ_ENABLE_MASK_LAYERS
// use a mask layer for rounded rect clipping
PRInt32 commonClipCount = data->mCommonClipCount;
NS_ASSERTION(commonClipCount >= 0, "Inconsistent clip count.");
@ -1274,7 +1265,6 @@ ContainerState::PopThebesLayerData()
} else {
// mask layer for image and color layers
SetupMaskLayer(layer, data->mItemClip);
#endif
}
PRUint32 flags;
if (isOpaque && !data->mForceTransparentSurface) {
@ -1637,13 +1627,7 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
// Assign the item to a layer
if (layerState == LAYER_ACTIVE_FORCE ||
layerState == LAYER_ACTIVE_EMPTY ||
#ifdef MOZ_ENABLE_MASK_LAYERS
layerState == LAYER_ACTIVE) {
#else
(layerState == LAYER_ACTIVE &&
(aClip.mRoundedClipRects.IsEmpty() ||
!aClip.IsRectClippedByRoundedCorner(item->GetVisibleRect())))) {
#endif
// LAYER_ACTIVE_EMPTY means the layer is created just for its metadata.
// We should never see an empty layer with any visible content!
@ -1705,13 +1689,11 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
}
RestrictVisibleRegionForLayer(ownLayer, itemVisibleRect);
#ifdef MOZ_ENABLE_MASK_LAYERS
// rounded rectangle clipping using mask layers
// (must be done after visible rect is set on layer)
if (aClip.IsRectClippedByRoundedCorner(itemContent)) {
SetupMaskLayer(ownLayer, aClip);
}
#endif
ContainerLayer* oldContainer = ownLayer->GetParent();
if (oldContainer && oldContainer != mContainerLayer) {
@ -2830,7 +2812,6 @@ void
ContainerState::SetupMaskLayer(Layer *aLayer, const FrameLayerBuilder::Clip& aClip,
PRUint32 aRoundedRectClipCount)
{
#ifdef MOZ_ENABLE_MASK_LAYERS
nsIntRect boundingRect = aLayer->GetEffectiveVisibleRegion().GetBounds();
// don't build an unnecessary mask
if (aClip.mRoundedClipRects.IsEmpty() ||
@ -2925,7 +2906,6 @@ ContainerState::SetupMaskLayer(Layer *aLayer, const FrameLayerBuilder::Clip& aCl
userData->mBounds = aLayer->GetEffectiveVisibleRegion().GetBounds();
aLayer->SetMaskLayer(maskLayer);
#endif
return;
}

View File

@ -1816,12 +1816,6 @@ CanScrollWithBlitting(nsIFrame* aFrame)
f->IsFrameOfType(nsIFrame::eSVG)) {
return false;
}
#ifndef MOZ_ENABLE_MASK_LAYERS
nsIScrollableFrame* sf = do_QueryFrame(f);
if ((sf || f->IsFrameOfType(nsIFrame::eReplaced)) &&
nsLayoutUtils::HasNonZeroCorner(f->GetStyleBorder()->mBorderRadius))
return false;
#endif
if (nsLayoutUtils::IsPopup(f))
break;
}