Backed out changeset 84df2aaf5e2a (bug 1023677)

This commit is contained in:
Carsten "Tomcat" Book 2014-07-18 10:45:27 +02:00
Родитель f87d44ff5a
Коммит 575d59768d
3 изменённых файлов: 6 добавлений и 33 удалений

Просмотреть файл

@ -1023,14 +1023,6 @@ ContainerLayer::DefaultComputeEffectiveTransforms(const Matrix4x4& aTransformToS
void
ContainerLayer::DefaultComputeSupportsComponentAlphaChildren(bool* aNeedsSurfaceCopy)
{
if (!(GetContentFlags() & Layer::CONTENT_COMPONENT_ALPHA_DESCENDANT)) {
mSupportsComponentAlphaChildren = false;
if (aNeedsSurfaceCopy) {
*aNeedsSurfaceCopy = false;
}
return;
}
bool supportsComponentAlphaChildren = false;
bool needsSurfaceCopy = false;
CompositionOp blendMode = GetEffectiveMixBlendMode();

Просмотреть файл

@ -747,29 +747,23 @@ public:
*/
CONTENT_COMPONENT_ALPHA = 0x02,
/**
* If this is set then one of the descendant layers of this one has
* CONTENT_COMPONENT_ALPHA set.
*/
CONTENT_COMPONENT_ALPHA_DESCENDANT = 0x04,
/**
* If this is set then this layer is part of a preserve-3d group, and should
* be sorted with sibling layers that are also part of the same group.
*/
CONTENT_PRESERVE_3D = 0x08,
CONTENT_PRESERVE_3D = 0x04,
/**
* This indicates that the transform may be changed on during an empty
* transaction where there is no possibility of redrawing the content, so the
* implementation should be ready for that.
*/
CONTENT_MAY_CHANGE_TRANSFORM = 0x10,
CONTENT_MAY_CHANGE_TRANSFORM = 0x08,
/**
* Disable subpixel AA for this layer. This is used if the display isn't suited
* for subpixel AA like hidpi or rotated content.
*/
CONTENT_DISABLE_SUBPIXEL_AA = 0x20
CONTENT_DISABLE_SUBPIXEL_AA = 0x10
};
/**
* CONSTRUCTION PHASE ONLY

Просмотреть файл

@ -3081,9 +3081,7 @@ ContainerState::Finish(uint32_t* aTextContentFlags, LayerManagerData* aData)
layer = mNewChildLayers[i];
if (!layer->GetVisibleRegion().IsEmpty()) {
textContentFlags |=
layer->GetContentFlags() & (Layer::CONTENT_COMPONENT_ALPHA |
Layer::CONTENT_COMPONENT_ALPHA_DESCENDANT);
textContentFlags |= layer->GetContentFlags() & Layer::CONTENT_COMPONENT_ALPHA;
}
if (!layer->GetParent()) {
@ -3456,24 +3454,13 @@ FrameLayerBuilder::BuildContainerLayerFor(nsDisplayListBuilder* aBuilder,
} else {
containerLayer->SetVisibleRegion(pixBounds);
}
// CONTENT_COMPONENT_ALPHA is propogated up to the nearest CONTENT_OPAQUE
// ancestor so that BasicLayerManager knows when to copy the background into
// pushed groups. Accelerated layers managers can't necessarily do this (only
// when the visible region is a simple rect), so we propogate
// CONTENT_COMPONENT_ALPHA_DESCENDANT all the way to the root.
if (flags & Layer::CONTENT_COMPONENT_ALPHA) {
flags |= Layer::CONTENT_COMPONENT_ALPHA_DESCENDANT;
}
// Make sure that rounding the visible region out didn't add any area
// we won't paint
if (aChildren.IsOpaque() && !aChildren.NeedsTransparentSurface()) {
bounds.ScaleRoundIn(scaleParameters.mXScale, scaleParameters.mYScale);
if (bounds.Contains(pixBounds.ToAppUnits(appUnitsPerDevPixel))) {
// Clear CONTENT_COMPONENT_ALPHA and add CONTENT_OPAQUE instead.
flags &= ~Layer::CONTENT_COMPONENT_ALPHA;
flags |= Layer::CONTENT_OPAQUE;
// Clear CONTENT_COMPONENT_ALPHA
flags = Layer::CONTENT_OPAQUE;
}
}
containerLayer->SetContentFlags(flags);