diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-25 14:31:26 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-25 17:06:15 +0000 |
commit | a785df6a5f9ad327210f51163129ef8b59c3af29 (patch) | |
tree | 364f6db15d4ddb4f31ec2cd9b4a6c66482271a74 /vcl/headless | |
parent | 940914489c7679dc660dd671c93a7f1ec0d49ead (diff) |
Use the cairo-compatible basebmp surface for headless
That way the conversion from basebmp to cairo becomes unnecessary on blitting
the thing onto a cairo surface for gtk3 and opens a route to using cairo, e.g.
especially for text, to render to basebmp surfaces.
Change-Id: I1d11f503410af9c92a97018e9ee20045412b157e
Diffstat (limited to 'vcl/headless')
-rw-r--r-- | vcl/headless/svpbmp.cxx | 10 | ||||
-rw-r--r-- | vcl/headless/svpgdi.cxx | 1 | ||||
-rw-r--r-- | vcl/headless/svpinst.cxx | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx index cedb9751a025..d9da88b920d7 100644 --- a/vcl/headless/svpbmp.cxx +++ b/vcl/headless/svpbmp.cxx @@ -185,6 +185,15 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( BitmapAccessMode ) nBitCount = 24; pBuf->mnFormat = BMP_FORMAT_24BIT_TC_BGR; break; + case FORMAT_THIRTYTWO_BIT_TC_MASK_BGRX: + nBitCount = 32; + pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; +#ifdef OSL_BIGENDIAN + pBuf->maColorMask = ColorMask( 0x0000ff00, 0x00ff0000, 0xff000000 ); +#else + pBuf->maColorMask = ColorMask( 0x00ff0000, 0x0000ff00, 0x000000ff ); +#endif + break; case FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA: nBitCount = 32; pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; @@ -389,6 +398,7 @@ sal_uInt32 SvpSalBitmap::getBitCountFromScanlineFormat( basebmp::Format nFormat case FORMAT_TWENTYFOUR_BIT_TC_MASK: nBitCount = 24; break; + case FORMAT_THIRTYTWO_BIT_TC_MASK_BGRX: case FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA: case FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB: case FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR: diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index b65e7b973e0e..3f63146bd149 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -126,6 +126,7 @@ void SvpSalGraphics::setDevice( basebmp::BitmapDeviceSharedPtr& rDevice ) case basebmp::FORMAT_SIXTEEN_BIT_LSB_TC_MASK: case basebmp::FORMAT_SIXTEEN_BIT_MSB_TC_MASK: case basebmp::FORMAT_TWENTYFOUR_BIT_TC_MASK: + case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_BGRX: case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA: case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_ARGB: case basebmp::FORMAT_THIRTYTWO_BIT_TC_MASK_ABGR: diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index 7523dfd36368..a1088834def4 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -439,14 +439,14 @@ Format SvpSalInstance::getFormatForBitCount( sal_uInt16 nBitCount ) return FORMAT_SIXTEEN_BIT_LSB_TC_MASK; #endif case 24: - return FORMAT_TWENTYFOUR_BIT_TC_MASK; + return FORMAT_THIRTYTWO_BIT_TC_MASK_BGRX; case 32: return FORMAT_THIRTYTWO_BIT_TC_MASK_BGRA; case 0: #ifdef ANDROID return FORMAT_THIRTYTWO_BIT_TC_MASK_RGBA; #else - return FORMAT_TWENTYFOUR_BIT_TC_MASK; + return FORMAT_THIRTYTWO_BIT_TC_MASK_BGRX; #endif default: return SVP_DEFAULT_BITMAP_FORMAT; |