summaryrefslogtreecommitdiff
path: root/basebmp/source/bitmapdevice.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-06-07 21:39:19 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-06-07 21:54:19 +0300
commitfd3c83d5f2414b2bba7b941609b59452a6d5b1e8 (patch)
tree53c9f922915fa36dad6680c334273d7d7344ee55 /basebmp/source/bitmapdevice.cxx
parent54b69a1f504ce16fd9e436357f4f237b038627e1 (diff)
Add two new 32bpp formats and add helpful comments
For Android (and perhaps iOS) we need a 32bpp format with channels in RGBA order. Rename the (basebmp-internal) 32bpp PixelFormatTreats_* typedefs so that the channel order in their names matches the memory order of the channels. Change-Id: Ia8a74f6d44e0a2cffdf66a05ddf8fc7d6ae2a263
Diffstat (limited to 'basebmp/source/bitmapdevice.cxx')
-rw-r--r--basebmp/source/bitmapdevice.cxx22
1 files changed, 17 insertions, 5 deletions
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index b3676c603edc..07a36ceeef66 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -1862,9 +1862,11 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector&
16, // SIXTEEN_BIT_LSB_TC_MASK
16, // SIXTEEN_BIT_MSB_TC_MASK
24, // TWENTYFOUR_BIT_TC_MASK
- 32, // THIRTYTWO_BIT_TC_MASK
+ 32, // THIRTYTWO_BIT_TC_MASK_BGRA
32, // THIRTYTWO_BIT_TC_MASK_ARGB
- };
+ 32, // THIRTYTWO_BIT_TC_MASK_ABGR
+ 32, // THIRTYTWO_BIT_TC_MASK_RGBA
+ };
sal_Int32 nScanlineStride(0);
@@ -2004,13 +2006,23 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector&
// ----------------------------------------------------------------------
// thirtytwo bit formats
- case Format::THIRTYTWO_BIT_TC_MASK:
- return createRenderer<PixelFormatTraits_RGB32_888,StdMasks>(
+ case Format::THIRTYTWO_BIT_TC_MASK_BGRA:
+ return createRenderer<PixelFormatTraits_BGRX32_8888,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal, rDamage );
case Format::THIRTYTWO_BIT_TC_MASK_ARGB:
- return createRenderer<PixelFormatTraits_BGR32_888,StdMasks>(
+ return createRenderer<PixelFormatTraits_XRGB32_8888,StdMasks>(
+ aBounds, nScanlineFormat, nScanlineStride,
+ pFirstScanline, pMem, pPal, rDamage );
+
+ case Format::THIRTYTWO_BIT_TC_MASK_ABGR:
+ return createRenderer<PixelFormatTraits_XBGR32_8888,StdMasks>(
+ aBounds, nScanlineFormat, nScanlineStride,
+ pFirstScanline, pMem, pPal, rDamage );
+
+ case Format::THIRTYTWO_BIT_TC_MASK_RGBA:
+ return createRenderer<PixelFormatTraits_RGBX32_8888,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal, rDamage );
}