diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h index b65ddce0b7e..b82b9753518 100644 --- a/gfx/layers/Layers.h +++ b/gfx/layers/Layers.h @@ -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 } /** diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index b389e707b8e..a3decf6104f 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -1143,11 +1143,7 @@ ContainerState::ThebesLayerData::UpdateCommonClipCount( already_AddRefed 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; } diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index dc07cc1c376..7d9c632afb4 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -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; }