summaryrefslogtreecommitdiff
path: root/vcl/inc/skia
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-12-11 14:18:00 +0100
committerLuboš Luňák <l.lunak@collabora.com>2019-12-12 11:02:04 +0100
commite2c34ce3feac29e12ff47957eb8efcb6ad303709 (patch)
treeadd4d4f133e5fefce5ea3ba09f920431db5f1725 /vcl/inc/skia
parent23b3de0b9a6cb69ed258905effa096ce5d5f1f13 (diff)
make Skia Windows widget drawing use correct alpha (tdf#129074)
The OpenGL code made the widget drawing use two variants drawn on black and on white, for reasons not explained in 3149cc341b1866d215110f0783227549a99b5920 (probably the Windows API doesn't handle alpha completely correctly or whatever). This means that getting the actual alpha requires a custom algorithm that needs to be implemented manually for Skia use. Change-Id: I1438f3829a1bdeda9e55700c4a397c60d5663446 Reviewed-on: https://gerrit.libreoffice.org/84948 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.hxx6
-rw-r--r--vcl/inc/skia/win/gdiimpl.hxx7
2 files changed, 7 insertions, 6 deletions
diff --git a/vcl/inc/skia/utils.hxx b/vcl/inc/skia/utils.hxx
index 27ca2b1f0b72..6fd61afd0a05 100644
--- a/vcl/inc/skia/utils.hxx
+++ b/vcl/inc/skia/utils.hxx
@@ -44,9 +44,9 @@ inline sk_sp<SkSurface> createSkSurface(const Size& size, SkColorType type = kN3
#ifdef DBG_UTIL
void prefillSurface(sk_sp<SkSurface>& surface);
-void dump(const SkBitmap& bitmap, const char* file);
-void dump(const sk_sp<SkImage>& image, const char* file);
-void dump(const sk_sp<SkSurface>& surface, const char* file);
+VCL_DLLPUBLIC void dump(const SkBitmap& bitmap, const char* file);
+VCL_DLLPUBLIC void dump(const sk_sp<SkImage>& image, const char* file);
+VCL_DLLPUBLIC void dump(const sk_sp<SkSurface>& surface, const char* file);
#endif
} // namespace
diff --git a/vcl/inc/skia/win/gdiimpl.hxx b/vcl/inc/skia/win/gdiimpl.hxx
index 003fac2cc65b..dabd56ad04a3 100644
--- a/vcl/inc/skia/win/gdiimpl.hxx
+++ b/vcl/inc/skia/win/gdiimpl.hxx
@@ -27,12 +27,13 @@ class SkiaCompatibleDC : public CompatibleDC
public:
SkiaCompatibleDC(SalGraphics& rGraphics, int x, int y, int width, int height);
- virtual std::unique_ptr<Texture> getAsMaskTexture() override;
+ virtual std::unique_ptr<Texture> getAsMaskTexture() const override;
virtual bool wantsTextColorWhite() const override { return true; }
- sk_sp<SkImage> getAsImage();
- sk_sp<SkImage> getAsMaskImage();
+ sk_sp<SkImage> getAsImage() const;
+ sk_sp<SkImage> getAsMaskImage() const;
+ sk_sp<SkImage> getAsImageDiff(const SkiaCompatibleDC& other) const;
struct Texture;
};