diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-09-01 22:21:43 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-09-04 17:29:27 +0200 |
commit | e6f54c46dcc0dd9b308d07bd25cdab231e5a335e (patch) | |
tree | 69b7e83305b8c9ea9d9dd4d856f97d5b68a1eee3 /vcl/inc | |
parent | c5b6f8d6469850e14362f2c8f08cdf8c956cbf07 (diff) |
ignore fully opaque alpha bitmap for Skia
This avoids some more expensive operations (if using CPU) like
SkBlendMode::kDstOut for hacks like
9ff0cd1f6b2200940ac51e580809e2a17c4b9550 that just set a fully
opaque bitmap as the alpha.
Change-Id: I446efc482d7bb13e899bf8b352e13fce6b5f9176
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101896
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/skia/salbmp.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/inc/skia/salbmp.hxx b/vcl/inc/skia/salbmp.hxx index 6ce94aad1b01..f834478be51a 100644 --- a/vcl/inc/skia/salbmp.hxx +++ b/vcl/inc/skia/salbmp.hxx @@ -78,6 +78,10 @@ public: OString GetImageKey() const; OString GetAlphaImageKey() const; + // Returns true if it is known that this bitmap can be ignored if it's to be used + // as an alpha bitmap. An optimization, not guaranteed to return true for all such cases. + bool IsFullyOpaqueAsAlpha() const; + #ifdef DBG_UTIL void dump(const char* file) const; #endif |