vcl: simplify Image internals

Desktop / LibreOffice - Tomaž Vajngerl [collabora.com] - 23 November 2015 06:59 UTC

Image could be of 2 types - BITMAP or IMAGE, where BITMAP used to store the content in a Bitmap and IMAGE in a ImplImageData, which contained a BitmapEx. This was refactored with this commit to always store the content in a BitmapEx and there are no distinct image types anymore. This greatly simplfies the code.

Drawing of the image in case of type IMAGE was done in the class ImplImageBmp which also modified the image according to DrawImageFlags (for example to create a "disabled" image). This was moved to ImplImage and the bitmap manipulation code was moved to BitmapProcessor (done in previous commits).

a4fc2b3 vcl: simplify Image internals
include/vcl/image.hxx | 4 +
vcl/Library_vcl.mk | 2 -
vcl/inc/image.h | 66 ++-------
vcl/source/image/Image.cxx | 129 +++++++++-------
vcl/source/image/ImplImage.cxx | 15 +-
vcl/source/image/ImplImageBmp.cxx | 287 ------------------------------------
vcl/source/image/ImplImageData.cxx | 48 ------
vcl/source/outdev/bitmap.cxx | 89 +----------
8 files changed, 95 insertions(+), 545 deletions(-)

Upstream: cgit.freedesktop.org


  • Share