Bug 1236282 - Clip color layer drawing in BasicCompositor so that unbounded operators don't erase stuff outside the layer. r=Bas

The same as bug 1077358, but for BasicCompositor.
This commit is contained in:
Markus Stange
2016-01-12 12:47:36 +01:00
parent b7e9c1082c
commit 368e80660b

View File

@@ -11,6 +11,7 @@
#include "gfx2DGlue.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/Helpers.h"
#include "mozilla/gfx/Tools.h"
#include "gfxUtils.h"
#include "YCbCrUtils.h"
#include <algorithm>
@@ -406,8 +407,17 @@ BasicCompositor::DrawQuad(const gfx::Rect& aRect,
EffectSolidColor* effectSolidColor =
static_cast<EffectSolidColor*>(aEffectChain.mPrimaryEffect.get());
bool unboundedOp = !IsOperatorBoundByMask(blendMode);
if (unboundedOp) {
dest->PushClipRect(aRect);
}
FillRectWithMask(dest, aRect, effectSolidColor->mColor,
DrawOptions(aOpacity, blendMode), sourceMask, &maskTransform);
if (unboundedOp) {
dest->PopClip();
}
break;
}
case EffectTypes::RGB: {