mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 755078 - Backout previously-landed patch for bug 755078. r=roc
This commit is contained in:
parent
caebb33c05
commit
41314b89f2
@ -35,8 +35,6 @@ struct PRLogModuleInfo;
|
|||||||
# define MOZ_LAYERS_LOG(_args)
|
# define MOZ_LAYERS_LOG(_args)
|
||||||
#endif // if defined(DEBUG) || defined(PR_LOGGING)
|
#endif // if defined(DEBUG) || defined(PR_LOGGING)
|
||||||
|
|
||||||
#define MOZ_ENABLE_MASK_LAYERS
|
|
||||||
|
|
||||||
class gfxContext;
|
class gfxContext;
|
||||||
class nsPaintEvent;
|
class nsPaintEvent;
|
||||||
|
|
||||||
@ -697,7 +695,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
void SetMaskLayer(Layer* aMaskLayer)
|
void SetMaskLayer(Layer* aMaskLayer)
|
||||||
{
|
{
|
||||||
#ifdef MOZ_ENABLE_MASK_LAYERS
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (aMaskLayer) {
|
if (aMaskLayer) {
|
||||||
gfxMatrix maskTransform;
|
gfxMatrix maskTransform;
|
||||||
@ -709,7 +706,6 @@ public:
|
|||||||
|
|
||||||
mMaskLayer = aMaskLayer;
|
mMaskLayer = aMaskLayer;
|
||||||
Mutated();
|
Mutated();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1143,11 +1143,7 @@ ContainerState::ThebesLayerData::UpdateCommonClipCount(
|
|||||||
already_AddRefed<ImageContainer>
|
already_AddRefed<ImageContainer>
|
||||||
ContainerState::ThebesLayerData::CanOptimizeImageLayer()
|
ContainerState::ThebesLayerData::CanOptimizeImageLayer()
|
||||||
{
|
{
|
||||||
#ifdef MOZ_ENABLE_MASK_LAYERS
|
|
||||||
if (!mImage) {
|
if (!mImage) {
|
||||||
#else
|
|
||||||
if (!mImage || !mItemClip.mRoundedClipRects.IsEmpty()) {
|
|
||||||
#endif
|
|
||||||
return nsnull;
|
return nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1177,10 +1173,6 @@ ContainerState::PopThebesLayerData()
|
|||||||
gfx3DMatrix transform = imageLayer->GetTransform()*
|
gfx3DMatrix transform = imageLayer->GetTransform()*
|
||||||
gfx3DMatrix::ScalingMatrix(mParameters.mXScale, mParameters.mYScale, 1.0f);
|
gfx3DMatrix::ScalingMatrix(mParameters.mXScale, mParameters.mYScale, 1.0f);
|
||||||
imageLayer->SetTransform(transform);
|
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) {
|
if (data->mItemClip.mHaveClipRect) {
|
||||||
nsIntRect clip = ScaleToNearestPixels(data->mItemClip.mClipRect);
|
nsIntRect clip = ScaleToNearestPixels(data->mItemClip.mClipRect);
|
||||||
imageLayer->IntersectClipRect(clip);
|
imageLayer->IntersectClipRect(clip);
|
||||||
@ -1262,7 +1254,6 @@ ContainerState::PopThebesLayerData()
|
|||||||
}
|
}
|
||||||
userData->mForcedBackgroundColor = backgroundColor;
|
userData->mForcedBackgroundColor = backgroundColor;
|
||||||
|
|
||||||
#ifdef MOZ_ENABLE_MASK_LAYERS
|
|
||||||
// use a mask layer for rounded rect clipping
|
// use a mask layer for rounded rect clipping
|
||||||
PRInt32 commonClipCount = data->mCommonClipCount;
|
PRInt32 commonClipCount = data->mCommonClipCount;
|
||||||
NS_ASSERTION(commonClipCount >= 0, "Inconsistent clip count.");
|
NS_ASSERTION(commonClipCount >= 0, "Inconsistent clip count.");
|
||||||
@ -1274,7 +1265,6 @@ ContainerState::PopThebesLayerData()
|
|||||||
} else {
|
} else {
|
||||||
// mask layer for image and color layers
|
// mask layer for image and color layers
|
||||||
SetupMaskLayer(layer, data->mItemClip);
|
SetupMaskLayer(layer, data->mItemClip);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
PRUint32 flags;
|
PRUint32 flags;
|
||||||
if (isOpaque && !data->mForceTransparentSurface) {
|
if (isOpaque && !data->mForceTransparentSurface) {
|
||||||
@ -1637,13 +1627,7 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
|||||||
// Assign the item to a layer
|
// Assign the item to a layer
|
||||||
if (layerState == LAYER_ACTIVE_FORCE ||
|
if (layerState == LAYER_ACTIVE_FORCE ||
|
||||||
layerState == LAYER_ACTIVE_EMPTY ||
|
layerState == LAYER_ACTIVE_EMPTY ||
|
||||||
#ifdef MOZ_ENABLE_MASK_LAYERS
|
|
||||||
layerState == LAYER_ACTIVE) {
|
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.
|
// LAYER_ACTIVE_EMPTY means the layer is created just for its metadata.
|
||||||
// We should never see an empty layer with any visible content!
|
// We should never see an empty layer with any visible content!
|
||||||
@ -1705,13 +1689,11 @@ ContainerState::ProcessDisplayItems(const nsDisplayList& aList,
|
|||||||
}
|
}
|
||||||
RestrictVisibleRegionForLayer(ownLayer, itemVisibleRect);
|
RestrictVisibleRegionForLayer(ownLayer, itemVisibleRect);
|
||||||
|
|
||||||
#ifdef MOZ_ENABLE_MASK_LAYERS
|
|
||||||
// rounded rectangle clipping using mask layers
|
// rounded rectangle clipping using mask layers
|
||||||
// (must be done after visible rect is set on layer)
|
// (must be done after visible rect is set on layer)
|
||||||
if (aClip.IsRectClippedByRoundedCorner(itemContent)) {
|
if (aClip.IsRectClippedByRoundedCorner(itemContent)) {
|
||||||
SetupMaskLayer(ownLayer, aClip);
|
SetupMaskLayer(ownLayer, aClip);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
ContainerLayer* oldContainer = ownLayer->GetParent();
|
ContainerLayer* oldContainer = ownLayer->GetParent();
|
||||||
if (oldContainer && oldContainer != mContainerLayer) {
|
if (oldContainer && oldContainer != mContainerLayer) {
|
||||||
@ -2830,7 +2812,6 @@ void
|
|||||||
ContainerState::SetupMaskLayer(Layer *aLayer, const FrameLayerBuilder::Clip& aClip,
|
ContainerState::SetupMaskLayer(Layer *aLayer, const FrameLayerBuilder::Clip& aClip,
|
||||||
PRUint32 aRoundedRectClipCount)
|
PRUint32 aRoundedRectClipCount)
|
||||||
{
|
{
|
||||||
#ifdef MOZ_ENABLE_MASK_LAYERS
|
|
||||||
nsIntRect boundingRect = aLayer->GetEffectiveVisibleRegion().GetBounds();
|
nsIntRect boundingRect = aLayer->GetEffectiveVisibleRegion().GetBounds();
|
||||||
// don't build an unnecessary mask
|
// don't build an unnecessary mask
|
||||||
if (aClip.mRoundedClipRects.IsEmpty() ||
|
if (aClip.mRoundedClipRects.IsEmpty() ||
|
||||||
@ -2925,7 +2906,6 @@ ContainerState::SetupMaskLayer(Layer *aLayer, const FrameLayerBuilder::Clip& aCl
|
|||||||
userData->mBounds = aLayer->GetEffectiveVisibleRegion().GetBounds();
|
userData->mBounds = aLayer->GetEffectiveVisibleRegion().GetBounds();
|
||||||
|
|
||||||
aLayer->SetMaskLayer(maskLayer);
|
aLayer->SetMaskLayer(maskLayer);
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1816,12 +1816,6 @@ CanScrollWithBlitting(nsIFrame* aFrame)
|
|||||||
f->IsFrameOfType(nsIFrame::eSVG)) {
|
f->IsFrameOfType(nsIFrame::eSVG)) {
|
||||||
return false;
|
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))
|
if (nsLayoutUtils::IsPopup(f))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user