зеркало из https://github.com/mozilla/gecko-dev.git
Bug 950312 - Part 7: Disable component alpha for layers with a mix-blend-mode. r=roc
This commit is contained in:
Родитель
f05c7aef5f
Коммит
3366917b4e
|
@ -1007,6 +1007,7 @@ ContainerLayer::DefaultComputeSupportsComponentAlphaChildren(bool* aNeedsSurface
|
|||
{
|
||||
bool supportsComponentAlphaChildren = false;
|
||||
bool needsSurfaceCopy = false;
|
||||
CompositionOp blendMode = GetEffectiveMixBlendMode();
|
||||
if (UseIntermediateSurface()) {
|
||||
if (GetEffectiveVisibleRegion().GetNumRects() == 1 &&
|
||||
(GetContentFlags() & Layer::CONTENT_OPAQUE))
|
||||
|
@ -1016,12 +1017,13 @@ ContainerLayer::DefaultComputeSupportsComponentAlphaChildren(bool* aNeedsSurface
|
|||
gfx::Matrix transform;
|
||||
if (HasOpaqueAncestorLayer(this) &&
|
||||
GetEffectiveTransform().Is2D(&transform) &&
|
||||
!gfx::ThebesMatrix(transform).HasNonIntegerTranslation()) {
|
||||
!gfx::ThebesMatrix(transform).HasNonIntegerTranslation() &&
|
||||
blendMode == gfx::CompositionOp::OP_OVER) {
|
||||
supportsComponentAlphaChildren = true;
|
||||
needsSurfaceCopy = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (blendMode == gfx::CompositionOp::OP_OVER) {
|
||||
supportsComponentAlphaChildren =
|
||||
(GetContentFlags() & Layer::CONTENT_OPAQUE) ||
|
||||
(GetParent() && GetParent()->SupportsComponentAlphaChildren());
|
||||
|
|
Загрузка…
Ссылка в новой задаче