diff options
author | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-06-11 13:39:56 +0100 |
---|---|---|
committer | Andrzej Hunt <andrzej.hunt@collabora.com> | 2014-06-25 13:04:30 +0100 |
commit | cd1f3480a6ebff075f243bde5891a3e8f3c9533c (patch) | |
tree | e2724c4adf77abfa12c5cfc78544ef71114878cb /vcl/headless/svpbmp.cxx | |
parent | e756452c40b39fc0fc7ea15b446b88c6c8736c90 (diff) |
Fill the alpha channel by default for vcl 32-bit bitmaps too.
Otherwise the alpha channel for bitmaps created directly is empty,
indicating a transparent bitmap (although we don't actually handle
transparency). This complements hardcoding of the alpha channel
in basebmp. VCL bitmaps can be copied bit-for-bit directly into
a basebmp bitmap, hence it's important to make sure we fill the
alpha channel in vcl too.
Conflicts:
include/vcl/salbtype.hxx
Change-Id: Icb2fa417db6625a6ffa6bd82eb5773ff75be5a3c
Diffstat (limited to 'vcl/headless/svpbmp.cxx')
-rw-r--r-- | vcl/headless/svpbmp.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx index 0a81fdc94b90..3920aea25f2d 100644 --- a/vcl/headless/svpbmp.cxx +++ b/vcl/headless/svpbmp.cxx @@ -188,36 +188,36 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( bool ) nBitCount = 32; pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; #ifdef OSL_BIGENDIAN - pBuf->maColorMask = ColorMask( 0x0000ff00, 0x00ff0000, 0xff000000 ); + pBuf->maColorMask = ColorMask( 0x0000ff00, 0x00ff0000, 0xff000000, 0x000000ff ); #else - pBuf->maColorMask = ColorMask( 0x00ff0000, 0x0000ff00, 0x000000ff ); + pBuf->maColorMask = ColorMask( 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 ); #endif break; case FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB: nBitCount = 32; pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; #ifdef OSL_BIGENDIAN - pBuf->maColorMask = ColorMask( 0x00ff0000, 0x0000ff00, 0x000000ff ); + pBuf->maColorMask = ColorMask( 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 ); #else - pBuf->maColorMask = ColorMask( 0x0000ff00, 0x00ff0000, 0xff000000 ); + pBuf->maColorMask = ColorMask( 0x0000ff00, 0x00ff0000, 0xff000000, 0x000000ff ); #endif break; case FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR: nBitCount = 32; pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; #ifdef OSL_BIGENDIAN - pBuf->maColorMask = ColorMask( 0x000000ff, 0x0000ff00, 0x00ff0000 ); + pBuf->maColorMask = ColorMask( 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 ); #else - pBuf->maColorMask = ColorMask( 0xff000000, 0x00ff0000, 0x0000ff00 ); + pBuf->maColorMask = ColorMask( 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff ); #endif break; case FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA: nBitCount = 32; pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; #ifdef OSL_BIGENDIAN - pBuf->maColorMask = ColorMask( 0xff000000, 0x00ff0000, 0x0000ff00 ); + pBuf->maColorMask = ColorMask( 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff ); #else - pBuf->maColorMask = ColorMask( 0x000000ff, 0x0000ff00, 0x00ff0000 ); + pBuf->maColorMask = ColorMask( 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 ); #endif break; |