mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 973976 - Revert to Thebes path for CopyableCanvasLayer. r=jmuizelaar
The performance on the Mac platform degraded after porting the code to Moz2D in Bug 948765. This patch chooses the old thebes path instead of the Moz2D path, so that performance is unaffected. This way we can easily revert this patch at a later time when the perf issue has been fixed.
This commit is contained in:
parent
799924e25f
commit
13d86024c0
@ -290,8 +290,11 @@ CopyableCanvasLayer::PaintWithOpacity(gfx::DrawTarget* aTarget,
|
||||
options.mCompositionOp = aOperator;
|
||||
}
|
||||
|
||||
// XXX: This needs rewriting for acceptable performance using CoreGraphics.
|
||||
// Therefore - this ::PaintWithOpacity is currently not used
|
||||
Rect rect = Rect(0, 0, mBounds.width, mBounds.height);
|
||||
aTarget->FillRect(rect, pat, options);
|
||||
|
||||
if (aMaskSurface) {
|
||||
aTarget->MaskSurface(pat, aMaskSurface, Point(0, 0), options);
|
||||
}
|
||||
|
@ -79,10 +79,10 @@ CanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
|
||||
bool updated = false;
|
||||
{
|
||||
// Restrict drawTarget to a scope so that terminates before Unlock.
|
||||
RefPtr<DrawTarget> drawTarget =
|
||||
mBuffer->AsTextureClientDrawTarget()->GetAsDrawTarget();
|
||||
if (drawTarget) {
|
||||
aLayer->UpdateTarget(drawTarget);
|
||||
nsRefPtr<gfxASurface> surface =
|
||||
mBuffer->AsTextureClientSurface()->GetAsSurface();
|
||||
if (surface) {
|
||||
aLayer->DeprecatedUpdateSurface(surface);
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user