summaryrefslogtreecommitdiff
path: root/vcl/opengl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-04-03 22:50:12 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-04-07 11:53:54 +0200
commit2fcfbd73768b69ba58607a054e7f851be2942992 (patch)
treeee125144d0328b19994d22ed5072bb505bba7793 /vcl/opengl
parent21719933e7632a504bf7c03e97a62b01bb938d6a (diff)
no gray conversion needed for VCL alpha hacks
AlphaMask doesn't need any conversion to gray, it's just enough to make sure the alpha channel bitmap is 8bpp. And the conversion is needed for the separate-OutputDevice-alpha hacks, where GetBitmap() gives non-8bpp bitmap for the alpha contents, but there all the R,G,B channels are the same, so just take red and avoid pointless conversion. Change-Id: Ib30fc8fa6d05067d582402ab2c0fcfb49a3742f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91772 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/opengl')
-rw-r--r--vcl/opengl/salbmp.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index 3b500b0945dc..4c8261858023 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -768,4 +768,11 @@ bool OpenGLSalBitmap::ConvertToGreyscale()
return true;
}
+// This is needed to just make the bitmap usable as an alpha channel.
+// Converting to 8bit grey will do.
+bool OpenGLSalBitmap::InterpretAs8Bit()
+{
+ return ConvertToGreyscale();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */