Support for native 32bit Bitmap in VCL and SVP (cairo) backend

Desktop / LibreOffice - Toma┼ż Vajngerl [collabora.co.uk] - 3 April 2019 09:57 EDT

This adds basic support for 32bit bitmaps for the SVP backend. For other backends the support is disabled for now as we need to add it for each backend separately and enable support.

When this patch is applied it is possible to a Bitmap with bit count 32, but currently no input filter uses this with the exception of the new PngImageReader(libpng based), which is used only for the icons.

For a general support more things need to be implemented and tested:- conversion back and fourth between 32-bit and 24-bit + 8bit alpha (or other supported pairs)- 'raw' export of the bitmap needs to be handeled properly (like in SVM import/export) so it creates the correct image.- input filters need to be checked and converted if this is necessary- look for possible bugs when drawing transparent bitmaps- check of UNO API

Change-Id: I7a7be0e6134dfdd9a7aeaef897131bb6e710ae7e Reviewed-on: https://gerrit.libreoffice.org/69289

86ea64f21681 Support for native 32bit Bitmap in VCL and SVP (cairo) backend
include/vcl/BitmapTools.hxx | 5 +
vcl/headless/svpgdi.cxx | 12 +-
vcl/headless/svpinst.cxx | 7 ++
vcl/inc/backend/BackendCapabilities.hxx | 28 +++++
vcl/inc/headless/svpinst.hxx | 2 +
vcl/inc/salinst.hxx | 7 ++
vcl/qa/cppunit/BitmapTest.cxx | 64 +++++++++-
vcl/qa/cppunit/png/PngFilterTest.cxx | 135 +++++++++++++--------
vcl/source/bitmap/BitmapDisabledImageFilter.cxx | 2 +-
vcl/source/bitmap/BitmapTools.cxx | 43 ++++++-
vcl/source/bitmap/bitmap.cxx | 14 ++-
vcl/source/filter/png/PngImageReader.cxx | 148 +++++++++++++++++-------
vcl/source/filter/png/pngwrite.cxx | 39 ++++---
vcl/source/gdi/bmpacc2.cxx | 129 ++++++++++++---------
14 files changed, 459 insertions(+), 176 deletions(-)

Upstream: cgit.freedesktop.org


  • Share