Bug 1236282 - Clip color layer drawing in BasicCompositor so that unbounded operators don't erase stuff outside the layer. r?bas.schouten
The same as
bug 1077358, but for BasicCompositor.
--- a/gfx/layers/basic/BasicCompositor.cpp
+++ b/gfx/layers/basic/BasicCompositor.cpp
@@ -401,18 +401,21 @@ BasicCompositor::DrawQuad(const gfx::Rec
blendMode = static_cast<EffectBlendMode*>(effect)->mBlendMode;
}
switch (aEffectChain.mPrimaryEffect->mType) {
case EffectTypes::SOLID_COLOR: {
EffectSolidColor* effectSolidColor =
static_cast<EffectSolidColor*>(aEffectChain.mPrimaryEffect.get());
+ // Clip drawing in case we're using (unbounded) operator source.
+ dest->PushClipRect(aRect);
FillRectWithMask(dest, aRect, effectSolidColor->mColor,
DrawOptions(aOpacity, blendMode), sourceMask, &maskTransform);
+ dest->PopClip();
break;
}
case EffectTypes::RGB: {
TexturedEffect* texturedEffect =
static_cast<TexturedEffect*>(aEffectChain.mPrimaryEffect.get());
TextureSourceBasic* source = texturedEffect->mTexture->AsSourceBasic();
if (texturedEffect->mPremultiplied) {