mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 989858 - Part 2: Convert BasicCanvasLayer. r=roc
This commit is contained in:
parent
e921db2fe5
commit
4586f037e0
@ -367,8 +367,6 @@ CopyableCanvasLayer::GetTempSurface(const IntSize& aSize,
|
||||
mCachedFormat = aFormat;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mCachedTempSurface->Stride() ==
|
||||
mCachedTempSurface->GetSize().width * 4);
|
||||
return mCachedTempSurface;
|
||||
}
|
||||
|
||||
|
@ -43,16 +43,25 @@ BasicCanvasLayer::DeprecatedPaint(gfxContext* aContext, Layer* aMaskLayer)
|
||||
return;
|
||||
|
||||
FirePreTransactionCallback();
|
||||
DeprecatedUpdateSurface();
|
||||
UpdateTarget();
|
||||
FireDidTransactionCallback();
|
||||
|
||||
gfxContext::GraphicsOperator mixBlendMode = DeprecatedGetEffectiveMixBlendMode();
|
||||
DeprecatedPaintWithOpacity(aContext,
|
||||
GetEffectiveOpacity(),
|
||||
aMaskLayer,
|
||||
mixBlendMode != gfxContext::OPERATOR_OVER ?
|
||||
mixBlendMode :
|
||||
DeprecatedGetOperator());
|
||||
gfxMatrix m;
|
||||
if (mNeedsYFlip) {
|
||||
m = aContext->CurrentMatrix();
|
||||
aContext->Translate(gfxPoint(0.0, mBounds.height));
|
||||
aContext->Scale(1.0, -1.0);
|
||||
}
|
||||
|
||||
FillRectWithMask(aContext->GetDrawTarget(),
|
||||
Rect(0, 0, mBounds.width, mBounds.height),
|
||||
mSurface, ToFilter(mFilter),
|
||||
DrawOptions(GetEffectiveOpacity(), GetEffectiveOperator(this)),
|
||||
aMaskLayer);
|
||||
|
||||
if (mNeedsYFlip) {
|
||||
aContext->SetMatrix(m);
|
||||
}
|
||||
}
|
||||
|
||||
already_AddRefed<CanvasLayer>
|
||||
|
Loading…
Reference in New Issue
Block a user