diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-10-31 21:41:42 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-11-27 09:55:14 +0100 |
commit | 5493c1ea621225af4b5f5eaa8bc873e1f5fe5cad (patch) | |
tree | eca42b3ee472b566ac893c6ed77e89f90cd4e027 | |
parent | 29e6baf034cbb241461dd7a74a50eb05b1661d36 (diff) |
skia: drawMask can be simplified with drawBitmap call
Change-Id: Ie01c9dba1287495db9f176c1e1e25799e5f3e872
-rw-r--r-- | vcl/skia/gdiimpl.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index d0c2c1a08058..35bb44f02f2a 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -728,7 +728,6 @@ void SkiaSalGraphicsImpl::drawMask(const SalTwoRect& rPosAry, const SalBitmap& r void SkiaSalGraphicsImpl::drawMask(const SalTwoRect& rPosAry, const SkBitmap& rBitmap, Color nMaskColor) { - preDraw(); SkBitmap tmpBitmap; if (!tmpBitmap.tryAllocN32Pixels(rBitmap.width(), rBitmap.height())) abort(); @@ -739,13 +738,8 @@ void SkiaSalGraphicsImpl::drawMask(const SalTwoRect& rPosAry, const SkBitmap& rB paint.setBlendMode(SkBlendMode::kDstOut); SkCanvas canvas(tmpBitmap); canvas.drawBitmap(rBitmap, 0, 0, &paint); - mSurface->getCanvas()->drawBitmapRect( - tmpBitmap, - SkRect::MakeXYWH(rPosAry.mnSrcX, rPosAry.mnSrcY, rPosAry.mnSrcWidth, rPosAry.mnSrcHeight), - SkRect::MakeXYWH(rPosAry.mnDestX, rPosAry.mnDestY, rPosAry.mnDestWidth, - rPosAry.mnDestHeight), - nullptr); - postDraw(); + + drawBitmap(rPosAry, tmpBitmap); } std::shared_ptr<SalBitmap> SkiaSalGraphicsImpl::getBitmap(long nX, long nY, long nWidth, |