зеркало из https://github.com/mozilla/gecko-dev.git
Bug 989858 - Part 2: Convert BasicCanvasLayer. r=roc
This commit is contained in:
Родитель
45feb365f4
Коммит
faaf960268
|
@ -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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче