summaryrefslogtreecommitdiff
path: root/vcl/inc/skia
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-11-11 20:51:55 +0100
committerLuboš Luňák <l.lunak@collabora.com>2021-11-12 18:49:39 +0100
commit110fa313628c55fef1d35830358aea7e27c1e3ee (patch)
tree6a7f817e299093d1c3db916897dcd3eaf968f191 /vcl/inc/skia
parent754697f0dcd63e1f0ce2edd70ab8b42b1b4d4484 (diff)
get rid of Skia's 'rasterhack' for Invert()
It seems that manually writing a shader that does the same as SkBlendMode::kDifference works fine even though the blend mode crashes e.g. on Windows/AMD. So get rid of the memory<->GPU conversions and use the shader as a workaround. Change-Id: I971deeeb98f40e5ffa90f6a8dd7b0b21ec491c1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125101 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/inc/skia')
-rw-r--r--vcl/inc/skia/utils.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/inc/skia/utils.hxx b/vcl/inc/skia/utils.hxx
index 0bcc5989493e..ba479c58f234 100644
--- a/vcl/inc/skia/utils.hxx
+++ b/vcl/inc/skia/utils.hxx
@@ -71,6 +71,9 @@ VCL_DLLPUBLIC sk_sp<SkImage> makeCheckedImageSnapshot(sk_sp<SkSurface> surface,
inline Size imageSize(const sk_sp<SkImage>& image) { return Size(image->width(), image->height()); }
+// Do 'paint->setBlendMode(SkBlendMode::kDifference)' (workaround for buggy drivers).
+void setBlendModeDifference(SkPaint* paint);
+
// Must be called in any VCL backend before any Skia functionality is used.
// If not set, Skia will be disabled.
VCL_DLLPUBLIC void