[Libreoffice-commits] core.git: vcl/skia
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 16 14:00:27 UTC 2020
vcl/skia/gdiimpl.cxx | 2 +-
vcl/skia/win/gdiimpl.cxx | 1 +
vcl/skia/x11/gdiimpl.cxx | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
New commits:
commit b0ba9e835060f8f5daf3943a03039ed443705eba
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Jul 15 12:16:47 2020 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Thu Jul 16 15:59:46 2020 +0200
flush all Skia drawing before drawing to the screen
Otherwise xor drawing might not get applied.
Change-Id: Ic1f9496c76c8f1162951e2ac4acbcd131c714a3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98885
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 09dd924b6a2c..68cb2f0a5d23 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1080,7 +1080,7 @@ Color SkiaSalGraphicsImpl::getPixel(long nX, long nY)
SkiaZone zone;
checkSurface();
SAL_INFO("vcl.skia.trace", "getpixel(" << this << "): " << Point(nX, nY));
- mSurface->getCanvas()->flush();
+ flushDrawing();
// This is presumably slow, but getPixel() should be generally used only by unit tests.
SkBitmap bitmap;
if (!bitmap.tryAllocN32Pixels(GetWidth(), GetHeight()))
diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx
index 0e883bc1960f..ea7cb3362386 100644
--- a/vcl/skia/win/gdiimpl.cxx
+++ b/vcl/skia/win/gdiimpl.cxx
@@ -66,6 +66,7 @@ void WinSkiaSalGraphicsImpl::freeResources() {}
void WinSkiaSalGraphicsImpl::performFlush()
{
SkiaZone zone;
+ flushDrawing();
if (mWindowContext)
mWindowContext->swapBuffers();
}
diff --git a/vcl/skia/x11/gdiimpl.cxx b/vcl/skia/x11/gdiimpl.cxx
index 72b1f9874c5c..1058aaf0f8f4 100644
--- a/vcl/skia/x11/gdiimpl.cxx
+++ b/vcl/skia/x11/gdiimpl.cxx
@@ -128,6 +128,7 @@ void X11SkiaSalGraphicsImpl::freeResources() {}
void X11SkiaSalGraphicsImpl::performFlush()
{
SkiaZone zone;
+ flushDrawing();
// TODO XPutImage() is somewhat inefficient, XShmPutImage() should be preferred.
mWindowContext->swapBuffers();
}
More information about the Libreoffice-commits
mailing list