From 47dd602d1a6e9fd9738134b023deed62e3b93108 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Tue, 6 Nov 2018 00:42:09 +0000 Subject: [PATCH] Bug 1456555 - Fix SourceSurface offset handling in DTSkia::PushLayer. r=lsalzman This got added in bug 1429508 and then removed in bug 1451845. Tiled blobs adds tests for this, so it shouldn't break again. MozReview-Commit-ID: 3azL7SoWlr2 Depends on D10038 Differential Revision: https://phabricator.services.mozilla.com/D10041 --HG-- extra : moz-landing-system : lando --- gfx/2d/DrawTargetSkia.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp index 076caa8e8ed4..79343c64548f 100644 --- a/gfx/2d/DrawTargetSkia.cpp +++ b/gfx/2d/DrawTargetSkia.cpp @@ -2125,6 +2125,10 @@ DrawTargetSkia::PushLayerWithBlend(bool aOpaque, Float aOpacity, SourceSurface* sk_sp clipImage = aMask ? GetSkImageForSurface(aMask) : nullptr; SkMatrix clipMatrix; GfxMatrixToSkiaMatrix(aMaskTransform, clipMatrix); + if (aMask) { + clipMatrix.postTranslate(aMask->GetRect().X(), aMask->GetRect().Y()); + } + SkCanvas::SaveLayerRec saveRec(aBounds.IsEmpty() ? nullptr : &bounds, &paint, nullptr,