зеркало из https://github.com/mozilla/gecko-dev.git
Bug 993475 - Support masks on color layers in BasicCompositor. r=mattwoodrow
This commit is contained in:
Родитель
55e4cdf746
Коммит
f82e98ade3
|
@ -318,9 +318,19 @@ BasicCompositor::DrawQuad(const gfx::Rect& aRect,
|
|||
EffectSolidColor* effectSolidColor =
|
||||
static_cast<EffectSolidColor*>(aEffectChain.mPrimaryEffect.get());
|
||||
|
||||
dest->FillRect(aRect,
|
||||
ColorPattern(effectSolidColor->mColor),
|
||||
DrawOptions(aOpacity));
|
||||
if (sourceMask) {
|
||||
dest->PushClipRect(aRect);
|
||||
Matrix dtTransform = dest->GetTransform();
|
||||
dest->SetTransform(maskTransform);
|
||||
dest->MaskSurface(ColorPattern(effectSolidColor->mColor),
|
||||
sourceMask, Point(), DrawOptions(aOpacity));
|
||||
dest->SetTransform(dtTransform);
|
||||
dest->PopClip();
|
||||
} else {
|
||||
dest->FillRect(aRect,
|
||||
ColorPattern(effectSolidColor->mColor),
|
||||
DrawOptions(aOpacity));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EFFECT_RGB: {
|
||||
|
|
Загрузка…
Ссылка в новой задаче