summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/impimage.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-03-29 13:37:27 +0000
committerRüdiger Timm <rt@openoffice.org>2005-03-29 13:37:27 +0000
commit29d1632d211591365ebcf96da6e71c140696d73b (patch)
tree4cf8b8018ce0b55d9026a05b9a5d07887ae4cd79 /vcl/source/gdi/impimage.cxx
parent3cefc95972eb4c95fd608ae2b3c79dabac88e096 (diff)
INTEGRATION: CWS perform02 (1.16.210); FILE MERGED
2005/02/14 16:22:01 ssa 1.16.210.1: #i42762# improve and use AlphaMask::CopyPixel() to avoid palette lookups
Diffstat (limited to 'vcl/source/gdi/impimage.cxx')
-rw-r--r--vcl/source/gdi/impimage.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index 148ed576a254..b66a10646109 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: impimage.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: kz $ $Date: 2004-06-10 17:53:28 $
+ * last change: $Author: rt $ $Date: 2005-03-29 14:37:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -58,7 +58,6 @@
*
*
************************************************************************/
-
#ifndef _SV_OUTDEV_HXX
#include <outdev.hxx>
#endif
@@ -394,7 +393,17 @@ void ImplImageBmp::ColorTransform( BmpColorMode eColorMode )
BitmapEx ImplImageBmp::GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const
{
const Bitmap aNewBmp( Size( nPosCount * maSize.Width(), maSize.Height() ), maBmpEx.GetBitmap().GetBitCount() );
- BitmapEx aRet( aNewBmp );
+ BitmapEx aRet;
+ if( maBmpEx.IsAlpha() )
+ {
+ // initialize target bitmap with an empty alpha mask
+ // which allows for using an optimized copypixel later on (see AlphaMask::CopyPixel)
+ // that avoids palette lookups
+ AlphaMask aAlpha( Size( nPosCount * maSize.Width(), maSize.Height() ) );
+ aRet = BitmapEx( aNewBmp, aAlpha );
+ }
+ else
+ aRet = BitmapEx( aNewBmp );
for( USHORT i = 0; i < nPosCount; i++ )
{