diff --git a/vcl/skia/osx/gdiimpl.cxx b/vcl/skia/osx/gdiimpl.cxx index 1035d998a1c8..5d8113c35e67 100644 --- a/vcl/skia/osx/gdiimpl.cxx +++ b/vcl/skia/osx/gdiimpl.cxx @@ -128,7 +128,7 @@ void AquaSkiaSalGraphicsImpl::flushSurfaceToScreenCG() assert(mSurface.get()); // Do not use sub-rect, it creates copies of the data. - sk_sp image = makeCheckedImageSnapshot(mSurface); + sk_sp image = makeCheckedImageSnapshot(mSurface, scaleRect(mDirtyRect, mScaling)); SkPixmap pixmap; if (!image->peekPixels(&pixmap)) abort(); @@ -139,9 +139,8 @@ void AquaSkiaSalGraphicsImpl::flushSurfaceToScreenCG() // the first pixel of mDirtyRect.topLeft(), and using pixmap.rowBytes() ensures the following // pixel lines will be read from correct positions. CGContextRef context = CGBitmapContextCreate( - pixmap.writable_addr32(mDirtyRect.x() * mScaling, mDirtyRect.y() * mScaling), - mDirtyRect.width() * mScaling, mDirtyRect.height() * mScaling, 8, pixmap.rowBytes(), - GetSalData()->mxRGBSpace, toCGBitmapType(image->colorType(), image->alphaType())); + pixmap.writable_addr(), pixmap.width(), pixmap.height(), 8, pixmap.rowBytes(), + GetSalData()->mxRGBSpace, toCGBitmapType(pixmap.colorType(), pixmap.alphaType())); if (!context) { SAL_WARN("vcl.skia", "flushSurfaceToScreenGC(): Failed to allocate bitmap context");