diff options
Diffstat (limited to 'vcl/skia/gdiimpl.cxx')
-rw-r--r-- | vcl/skia/gdiimpl.cxx | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index 579a2d98d7fa..de46b67ef073 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -37,7 +37,7 @@ #include <SkRegion.h> #include <SkPathEffect.h> #include <SkDashPathEffect.h> -#include <GrBackendSurface.h> +#include <ganesh/GrBackendSurface.h> #include <SkTextBlob.h> #include <SkRSXform.h> @@ -245,8 +245,14 @@ public: : Idle(get_debug_name(pGraphics)) , mpGraphics(pGraphics) { +#ifdef MACOSX + // tdf#165277 Skia needs to flush immediately before POST_PAINT + // tasks on macOS + SetPriority(TaskPriority::SKIA_FLUSH); +#else // We don't want to be swapping before we've painted. SetPriority(TaskPriority::POST_PAINT); +#endif } #ifndef NDEBUG virtual ~SkiaFlushIdle() { free(debugname); } @@ -273,11 +279,12 @@ public: // tdf#157312 and tdf#163945 Lower Skia flush timer priority on macOS // On macOS, flushing with Skia/Metal is noticeably slower than // with Skia/Raster. So lower the flush timer priority to - // TaskPriority::POST_PAINT so that the flush timer runs less + // TaskPriority::SKIA_FLUSH so that the flush timer runs less // frequently but each pass copies a more up-to-date offscreen // surface. - // TODO: fix tdf#163734 on macOS - SetPriority(TaskPriority::POST_PAINT); + // tdf#165277 Skia needs to flush immediately before POST_PAINT + // tasks on macOS + SetPriority(TaskPriority::SKIA_FLUSH); #else SetPriority(TaskPriority::HIGHEST); #endif @@ -316,7 +323,13 @@ void SkiaSalGraphicsImpl::createSurface() // We don't want to be swapping before we've painted. mFlush->Stop(); +#ifdef MACOSX + // tdf#165277 Skia needs to flush immediately before POST_PAINT + // tasks on macOS + mFlush->SetPriority(TaskPriority::SKIA_FLUSH); +#else mFlush->SetPriority(TaskPriority::POST_PAINT); +#endif } void SkiaSalGraphicsImpl::createWindowSurface(bool forceRaster) |