summaryrefslogtreecommitdiff
path: root/vcl/inc/skia
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-01-30 13:04:23 +0100
committerLuboš Luňák <l.lunak@collabora.com>2020-01-30 15:14:01 +0100
commit7f56bbe3a09265a62792dc0624fdb44f8c176172 (patch)
tree7855dd0b57be35df23800564cb9a7bd5728373d2 /vcl/inc/skia
parent4ce8120f1e53f7b81e653b01d141643013bc69ab (diff)
again finally(?) fix Skia Windows widget drawing (tdf#130051)
I was correct to see in 202146901b6fbab92 that the black bitmap was in premultiplied alpha, but what I missed what that some controls keep the alpha set at zero (and only some work properly). So go back to the algorithm of synthetizing alpha from the red channel, compute it properly (before it was using alpha channel by mistake), and treat the data properly as premultiplied. This hopefully finally makes all Windows control widgets work. Change-Id: If2716eb8ecf623fcc57ee1db5904edfaee679aa9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87734 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/inc/skia')
-rw-r--r--vcl/inc/skia/win/gdiimpl.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/inc/skia/win/gdiimpl.hxx b/vcl/inc/skia/win/gdiimpl.hxx
index 69ee6ba475af..5e8aee2e4523 100644
--- a/vcl/inc/skia/win/gdiimpl.hxx
+++ b/vcl/inc/skia/win/gdiimpl.hxx
@@ -32,8 +32,9 @@ public:
virtual bool wantsTextColorWhite() const override { return true; }
- sk_sp<SkImage> getAsImage(bool fromPremultiplied = false) const;
+ sk_sp<SkImage> getAsImage() const;
sk_sp<SkImage> getAsMaskImage() const;
+ sk_sp<SkImage> getAsImageDiff(const SkiaCompatibleDC& white) const;
struct Texture;
struct PackedTexture;