diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-06-10 12:24:10 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-06-12 09:13:18 +0100 |
commit | 87b32becda5c16eac318e69936f6533da472bda2 (patch) | |
tree | 609871957d07df14f7e7b9e7c784a098085ea9b1 /vcl/source | |
parent | c48c9d5c3a0b3518e1d847e8a5c5cb7362873217 (diff) |
Revert "pass argb32 pixmaps from vcl to canvas, avoiding costly x11 ...
This reverts commit 22f63477a3300d474c3d6832232b888f75c7290c.
Conflicts:
canvas/source/cairo/cairo_canvasbitmap.cxx
Change-Id: Ib266050ebc6eaca4fbd36ed013ac95a1b4b9d316
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/bitmap.cxx | 13 | ||||
-rw-r--r-- | vcl/source/helper/canvastools.cxx | 25 |
2 files changed, 1 insertions, 37 deletions
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 223dc6454f18..bf5398df2f28 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -1812,17 +1812,4 @@ bool Bitmap::GetSystemData( BitmapSystemData& rData ) const return bRet; } -bool Bitmap::HasAlpha() -{ - bool bRet = false; - if( mpImpBmp ) - { - SalBitmap* pSalBitmap = mpImpBmp->ImplGetSalBitmap(); - if( pSalBitmap ) - bRet = pSalBitmap->HasAlpha(); - } - - return bRet; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx index ae48e4b41a54..9ba85d0585c8 100644 --- a/vcl/source/helper/canvastools.cxx +++ b/vcl/source/helper/canvastools.cxx @@ -21,8 +21,6 @@ #include <rtl/logfile.hxx> #include <cppuhelper/compbase1.hxx> -#include <com/sun/star/beans/XFastPropertySet.hpp> - #include <com/sun/star/geometry/RealSize2D.hpp> #include <com/sun/star/geometry/RealPoint2D.hpp> #include <com/sun/star/geometry/RealRectangle2D.hpp> @@ -72,32 +70,11 @@ namespace vcl { namespace unotools { - uno::Reference< rendering::XBitmap > xBitmapFromBitmapEx( const uno::Reference< rendering::XGraphicDevice >& xGraphicDevice, + uno::Reference< rendering::XBitmap > xBitmapFromBitmapEx( const uno::Reference< rendering::XGraphicDevice >& /*xGraphicDevice*/, const ::BitmapEx& inputBitmap ) { RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::xBitmapFromBitmapEx()" ); - if ( inputBitmap.GetBitmap().HasAlpha() ) - { - geometry::IntegerSize2D aSize; - - aSize.Width = aSize.Height = 1; - - uno::Reference< rendering::XBitmap > xBitmap = xGraphicDevice->createCompatibleAlphaBitmap( aSize ); - - uno::Reference< beans::XFastPropertySet > rPropSet( xBitmap, uno::UNO_QUERY ); - if ( rPropSet.is() ) - { - Bitmap aBitmap = inputBitmap.GetBitmap(); - rPropSet->setFastPropertyValue( 0, uno::Any( sal_Int64( &aBitmap ))); - - aSize = xBitmap->getSize(); - - if ( aSize.Width != 1 || aSize.Height != 1 ) - return xBitmap; - } - } - return new vcl::unotools::VclCanvasBitmap( inputBitmap ); } |