pass argb32 pixmaps from vcl to canvas, avoiding costly x11 roundtrips
- fixes also problem with emf+ rendering for slideshow Change-Id: Icb894d3f37b29f23d3f267c944d827eefbf47fda
This commit is contained in:
parent
87354e7fc1
commit
22f63477a3
@ -134,6 +134,30 @@ namespace cairocanvas
|
|||||||
return maCanvasHelper.repaint( pSurface, viewState, renderState );
|
return maCanvasHelper.repaint( pSurface, viewState, renderState );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SAL_CALL CanvasBitmap::setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rAny ) throw (uno::RuntimeException)
|
||||||
|
{
|
||||||
|
sal_Int64 nPointer;
|
||||||
|
|
||||||
|
if ( nHandle == 0 )
|
||||||
|
{
|
||||||
|
rAny >>= nPointer;
|
||||||
|
|
||||||
|
if ( nPointer )
|
||||||
|
{
|
||||||
|
::Bitmap *pBitmap = reinterpret_cast< ::Bitmap* >( nPointer );
|
||||||
|
|
||||||
|
mpBufferSurface = createSurface( *pBitmap );
|
||||||
|
mpBufferCairo = mpBufferSurface->getCairo();
|
||||||
|
|
||||||
|
::Size aSize( pBitmap->GetSizePixel() );
|
||||||
|
maSize = ::basegfx::B2ISize( aSize.getWidth(), aSize.getHeight() );
|
||||||
|
|
||||||
|
maCanvasHelper.setSize( maSize );
|
||||||
|
maCanvasHelper.setSurface( mpBufferSurface, mbHasAlpha );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uno::Any SAL_CALL CanvasBitmap::getFastPropertyValue( sal_Int32 nHandle ) throw (uno::RuntimeException)
|
uno::Any SAL_CALL CanvasBitmap::getFastPropertyValue( sal_Int32 nHandle ) throw (uno::RuntimeException)
|
||||||
{
|
{
|
||||||
uno::Any aRV( sal_Int32(0) );
|
uno::Any aRV( sal_Int32(0) );
|
||||||
@ -152,10 +176,11 @@ namespace cairocanvas
|
|||||||
#ifdef CAIRO_HAS_XLIB_SURFACE
|
#ifdef CAIRO_HAS_XLIB_SURFACE
|
||||||
X11Surface* pXlibSurface=dynamic_cast<X11Surface*>(mpBufferSurface.get());
|
X11Surface* pXlibSurface=dynamic_cast<X11Surface*>(mpBufferSurface.get());
|
||||||
OSL_ASSERT(pXlibSurface);
|
OSL_ASSERT(pXlibSurface);
|
||||||
uno::Sequence< uno::Any > args( 3 );
|
uno::Sequence< uno::Any > args( 4 );
|
||||||
args[0] = uno::Any( false ); // do not call XFreePixmap on it
|
args[0] = uno::Any( false ); // do not call XFreePixmap on it
|
||||||
args[1] = uno::Any( pXlibSurface->getPixmap()->mhDrawable );
|
args[1] = uno::Any( pXlibSurface->getPixmap()->mhDrawable );
|
||||||
args[2] = uno::Any( sal_Int32( pXlibSurface->getDepth() ) );
|
args[2] = uno::Any( sal_Int32( pXlibSurface->getDepth() ) );
|
||||||
|
args[3] = uno::Any( sal_Int64( pXlibSurface->getVisual () ) );
|
||||||
|
|
||||||
aRV = uno::Any( args );
|
aRV = uno::Any( args );
|
||||||
#elif defined CAIRO_HAS_QUARTZ_SURFACE
|
#elif defined CAIRO_HAS_QUARTZ_SURFACE
|
||||||
@ -180,7 +205,7 @@ namespace cairocanvas
|
|||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
#ifdef CAIRO_HAS_XLIB_SURFACE
|
#ifdef CAIRO_HAS_XLIB_SURFACE
|
||||||
uno::Sequence< uno::Any > args( 3 );
|
uno::Sequence< uno::Any > args( 4 );
|
||||||
SurfaceSharedPtr pAlphaSurface = mpSurfaceProvider->createSurface( maSize, CAIRO_CONTENT_COLOR );
|
SurfaceSharedPtr pAlphaSurface = mpSurfaceProvider->createSurface( maSize, CAIRO_CONTENT_COLOR );
|
||||||
CairoSharedPtr pAlphaCairo = pAlphaSurface->getCairo();
|
CairoSharedPtr pAlphaCairo = pAlphaSurface->getCairo();
|
||||||
X11Surface* pXlibSurface=dynamic_cast<X11Surface*>(pAlphaSurface.get());
|
X11Surface* pXlibSurface=dynamic_cast<X11Surface*>(pAlphaSurface.get());
|
||||||
@ -199,6 +224,7 @@ namespace cairocanvas
|
|||||||
args[0] = uno::Any( true );
|
args[0] = uno::Any( true );
|
||||||
args[1] = ::com::sun::star::uno::Any( pPixmap->mhDrawable );
|
args[1] = ::com::sun::star::uno::Any( pPixmap->mhDrawable );
|
||||||
args[2] = ::com::sun::star::uno::Any( sal_Int32( pXlibSurface->getDepth () ) );
|
args[2] = ::com::sun::star::uno::Any( sal_Int32( pXlibSurface->getDepth () ) );
|
||||||
|
args[3] = ::com::sun::star::uno::Any( sal_Int64( pXlibSurface->getVisual () ) );
|
||||||
pPixmap->clear(); // caller takes ownership of pixmap
|
pPixmap->clear(); // caller takes ownership of pixmap
|
||||||
|
|
||||||
// return pixmap and alphachannel pixmap - it will be used in BitmapEx
|
// return pixmap and alphachannel pixmap - it will be used in BitmapEx
|
||||||
|
@ -115,14 +115,14 @@ namespace cairocanvas
|
|||||||
// 2nd the pixmap handle
|
// 2nd the pixmap handle
|
||||||
// 3rd the pixmap depth
|
// 3rd the pixmap depth
|
||||||
virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (::com::sun::star::uno::RuntimeException);
|
virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (::com::sun::star::uno::RuntimeException);
|
||||||
virtual void SAL_CALL setFastPropertyValue(sal_Int32, const ::com::sun::star::uno::Any&) throw (::com::sun::star::uno::RuntimeException) {}
|
virtual void SAL_CALL setFastPropertyValue(sal_Int32, const ::com::sun::star::uno::Any&) throw (::com::sun::star::uno::RuntimeException);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SurfaceProviderRef mpSurfaceProvider;
|
SurfaceProviderRef mpSurfaceProvider;
|
||||||
::cairo::SurfaceSharedPtr mpBufferSurface;
|
::cairo::SurfaceSharedPtr mpBufferSurface;
|
||||||
::cairo::CairoSharedPtr mpBufferCairo;
|
::cairo::CairoSharedPtr mpBufferCairo;
|
||||||
|
|
||||||
const ::basegfx::B2ISize maSize;
|
::basegfx::B2ISize maSize;
|
||||||
const bool mbHasAlpha;
|
const bool mbHasAlpha;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ namespace cairo
|
|||||||
mpSurface(
|
mpSurface(
|
||||||
cairo_xlib_surface_create( (Display*)rSysData.pDisplay,
|
cairo_xlib_surface_create( (Display*)rSysData.pDisplay,
|
||||||
(Drawable)rData.aPixmap,
|
(Drawable)rData.aPixmap,
|
||||||
(Visual*) rSysData.pVisual,
|
(Visual*) (rData.aVisual ? rData.aVisual : rSysData.pVisual),
|
||||||
rData.mnWidth, rData.mnHeight ),
|
rData.mnWidth, rData.mnHeight ),
|
||||||
&cairo_surface_destroy)
|
&cairo_surface_destroy)
|
||||||
{
|
{
|
||||||
@ -312,6 +312,11 @@ namespace cairo
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void* X11Surface::getVisual() const
|
||||||
|
{
|
||||||
|
return cairo_xlib_surface_get_visual( mpSurface.get() );
|
||||||
|
}
|
||||||
|
|
||||||
SurfaceSharedPtr createSurface( const CairoSurfaceSharedPtr& rSurface )
|
SurfaceSharedPtr createSurface( const CairoSurfaceSharedPtr& rSurface )
|
||||||
{
|
{
|
||||||
return SurfaceSharedPtr(new X11Surface(rSurface));
|
return SurfaceSharedPtr(new X11Surface(rSurface));
|
||||||
|
@ -92,6 +92,7 @@ namespace cairo {
|
|||||||
X11PixmapSharedPtr getPixmap() const { return mpPixmap; }
|
X11PixmapSharedPtr getPixmap() const { return mpPixmap; }
|
||||||
void* getRenderFormat() const { return maSysData.pRenderFormat; }
|
void* getRenderFormat() const { return maSysData.pRenderFormat; }
|
||||||
long getDrawable() const { return mpPixmap ? mpPixmap->mhDrawable : maSysData.hDrawable; }
|
long getDrawable() const { return mpPixmap ? mpPixmap->mhDrawable : maSysData.hDrawable; }
|
||||||
|
void* getVisual() const;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@ public:
|
|||||||
|
|
||||||
SAL_DLLPRIVATE bool ImplCreateFromDrawable(
|
SAL_DLLPRIVATE bool ImplCreateFromDrawable(
|
||||||
Drawable aDrawable,
|
Drawable aDrawable,
|
||||||
|
void* pVisual,
|
||||||
SalX11Screen nXScreen,
|
SalX11Screen nXScreen,
|
||||||
long nDrawableDepth,
|
long nDrawableDepth,
|
||||||
long nX,
|
long nX,
|
||||||
@ -162,6 +163,7 @@ class ImplSalDDB
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
Pixmap maPixmap;
|
Pixmap maPixmap;
|
||||||
|
void* mpVisual;
|
||||||
SalTwoRect maTwoRect;
|
SalTwoRect maTwoRect;
|
||||||
long mnDepth;
|
long mnDepth;
|
||||||
SalX11Screen mnXScreen;
|
SalX11Screen mnXScreen;
|
||||||
@ -193,6 +195,7 @@ public:
|
|||||||
|
|
||||||
ImplSalDDB(
|
ImplSalDDB(
|
||||||
Drawable aDrawable,
|
Drawable aDrawable,
|
||||||
|
void *pVisual,
|
||||||
SalX11Screen nXScreen,
|
SalX11Screen nXScreen,
|
||||||
long nDrawableDepth,
|
long nDrawableDepth,
|
||||||
long nX,
|
long nX,
|
||||||
@ -204,6 +207,7 @@ public:
|
|||||||
~ImplSalDDB();
|
~ImplSalDDB();
|
||||||
|
|
||||||
Pixmap ImplGetPixmap() const { return maPixmap; }
|
Pixmap ImplGetPixmap() const { return maPixmap; }
|
||||||
|
void* ImplGetVisual() const { return mpVisual; }
|
||||||
long ImplGetWidth() const { return maTwoRect.mnDestWidth; }
|
long ImplGetWidth() const { return maTwoRect.mnDestWidth; }
|
||||||
long ImplGetHeight() const { return maTwoRect.mnDestHeight; }
|
long ImplGetHeight() const { return maTwoRect.mnDestHeight; }
|
||||||
long ImplGetDepth() const { return mnDepth; }
|
long ImplGetDepth() const { return mnDepth; }
|
||||||
|
@ -325,6 +325,7 @@ struct BitmapSystemData
|
|||||||
void* rImageContext; //Image context (CGContextRef)
|
void* rImageContext; //Image context (CGContextRef)
|
||||||
#else
|
#else
|
||||||
void* aPixmap;
|
void* aPixmap;
|
||||||
|
void* aVisual;
|
||||||
#endif
|
#endif
|
||||||
int mnWidth;
|
int mnWidth;
|
||||||
int mnHeight;
|
int mnHeight;
|
||||||
@ -846,6 +847,8 @@ public:
|
|||||||
const BmpFilterParam* pFilterParam = NULL,
|
const BmpFilterParam* pFilterParam = NULL,
|
||||||
const Link* pProgress = NULL );
|
const Link* pProgress = NULL );
|
||||||
|
|
||||||
|
bool HasAlpha();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BitmapReadAccess* AcquireReadAccess();
|
BitmapReadAccess* AcquireReadAccess();
|
||||||
BitmapWriteAccess* AcquireWriteAccess();
|
BitmapWriteAccess* AcquireWriteAccess();
|
||||||
|
@ -1901,4 +1901,17 @@ bool Bitmap::GetSystemData( BitmapSystemData& rData ) const
|
|||||||
return bRet;
|
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: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
3184
vcl/source/gdi/gdimtf.cxx.orig
Normal file
3184
vcl/source/gdi/gdimtf.cxx.orig
Normal file
File diff suppressed because it is too large
Load Diff
@ -21,6 +21,8 @@
|
|||||||
#include <rtl/logfile.hxx>
|
#include <rtl/logfile.hxx>
|
||||||
#include <cppuhelper/compbase1.hxx>
|
#include <cppuhelper/compbase1.hxx>
|
||||||
|
|
||||||
|
#include <com/sun/star/beans/XFastPropertySet.hpp>
|
||||||
|
|
||||||
#include <com/sun/star/geometry/RealSize2D.hpp>
|
#include <com/sun/star/geometry/RealSize2D.hpp>
|
||||||
#include <com/sun/star/geometry/RealPoint2D.hpp>
|
#include <com/sun/star/geometry/RealPoint2D.hpp>
|
||||||
#include <com/sun/star/geometry/RealRectangle2D.hpp>
|
#include <com/sun/star/geometry/RealRectangle2D.hpp>
|
||||||
@ -70,11 +72,32 @@ namespace vcl
|
|||||||
{
|
{
|
||||||
namespace unotools
|
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 )
|
const ::BitmapEx& inputBitmap )
|
||||||
{
|
{
|
||||||
RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::xBitmapFromBitmapEx()" );
|
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 );
|
return new vcl::unotools::VclCanvasBitmap( inputBitmap );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -566,6 +566,7 @@ XImage* X11SalBitmap::ImplCreateXImage(
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
bool X11SalBitmap::ImplCreateFromDrawable(
|
bool X11SalBitmap::ImplCreateFromDrawable(
|
||||||
Drawable aDrawable,
|
Drawable aDrawable,
|
||||||
|
void *pVisual,
|
||||||
SalX11Screen nScreen,
|
SalX11Screen nScreen,
|
||||||
long nDrawableDepth,
|
long nDrawableDepth,
|
||||||
long nX,
|
long nX,
|
||||||
@ -576,7 +577,7 @@ bool X11SalBitmap::ImplCreateFromDrawable(
|
|||||||
Destroy();
|
Destroy();
|
||||||
|
|
||||||
if( aDrawable && nWidth && nHeight && nDrawableDepth )
|
if( aDrawable && nWidth && nHeight && nDrawableDepth )
|
||||||
mpDDB = new ImplSalDDB( aDrawable, nScreen, nDrawableDepth, nX, nY, nWidth, nHeight );
|
mpDDB = new ImplSalDDB( aDrawable, pVisual, nScreen, nDrawableDepth, nX, nY, nWidth, nHeight );
|
||||||
|
|
||||||
return( mpDDB != NULL );
|
return( mpDDB != NULL );
|
||||||
}
|
}
|
||||||
@ -736,7 +737,8 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
|
|||||||
}
|
}
|
||||||
else if( rSalBmp.mpDDB )
|
else if( rSalBmp.mpDDB )
|
||||||
ImplCreateFromDrawable( rSalBmp.mpDDB->ImplGetPixmap(),
|
ImplCreateFromDrawable( rSalBmp.mpDDB->ImplGetPixmap(),
|
||||||
rSalBmp.mpDDB->ImplGetScreen(),
|
rSalBmp.mpDDB->ImplGetVisual(),
|
||||||
|
rSalBmp.mpDDB->ImplGetScreen(),
|
||||||
rSalBmp.mpDDB->ImplGetDepth(),
|
rSalBmp.mpDDB->ImplGetDepth(),
|
||||||
0, 0, rSalBmp.mpDDB->ImplGetWidth(), rSalBmp.mpDDB->ImplGetHeight() );
|
0, 0, rSalBmp.mpDDB->ImplGetWidth(), rSalBmp.mpDDB->ImplGetHeight() );
|
||||||
|
|
||||||
@ -775,11 +777,13 @@ bool X11SalBitmap::Create(
|
|||||||
|
|
||||||
if( xFastPropertySet->getFastPropertyValue(bMask ? 2 : 1) >>= args ) {
|
if( xFastPropertySet->getFastPropertyValue(bMask ? 2 : 1) >>= args ) {
|
||||||
long pixmapHandle;
|
long pixmapHandle;
|
||||||
if( ( args[1] >>= pixmapHandle ) && ( args[2] >>= depth ) ) {
|
sal_Int64 nVisualPtr;
|
||||||
|
if( args.getLength() >= 4 && ( args[1] >>= pixmapHandle ) && ( args[2] >>= depth ) && ( args[3] >>= nVisualPtr ) ) {
|
||||||
|
|
||||||
mbGrey = bMask;
|
mbGrey = bMask;
|
||||||
bool bSuccess = ImplCreateFromDrawable(
|
bool bSuccess = ImplCreateFromDrawable(
|
||||||
pixmapHandle,
|
pixmapHandle,
|
||||||
|
reinterpret_cast<void*>(nVisualPtr),
|
||||||
// FIXME: this seems multi-screen broken to me
|
// FIXME: this seems multi-screen broken to me
|
||||||
SalX11Screen( 0 ),
|
SalX11Screen( 0 ),
|
||||||
depth,
|
depth,
|
||||||
@ -891,6 +895,7 @@ bool X11SalBitmap::GetSystemData( BitmapSystemData& rData )
|
|||||||
// prolly not a good idea, since it's accessed from
|
// prolly not a good idea, since it's accessed from
|
||||||
// non-platform aware code in vcl/bitmap.hxx)
|
// non-platform aware code in vcl/bitmap.hxx)
|
||||||
rData.aPixmap = (void*)mpDDB->ImplGetPixmap();
|
rData.aPixmap = (void*)mpDDB->ImplGetPixmap();
|
||||||
|
rData.aVisual = mpDDB->ImplGetVisual ();
|
||||||
rData.mnWidth = mpDDB->ImplGetWidth ();
|
rData.mnWidth = mpDDB->ImplGetWidth ();
|
||||||
rData.mnHeight = mpDDB->ImplGetHeight ();
|
rData.mnHeight = mpDDB->ImplGetHeight ();
|
||||||
return true;
|
return true;
|
||||||
@ -906,6 +911,7 @@ bool X11SalBitmap::GetSystemData( BitmapSystemData& rData )
|
|||||||
ImplSalDDB::ImplSalDDB( XImage* pImage, Drawable aDrawable,
|
ImplSalDDB::ImplSalDDB( XImage* pImage, Drawable aDrawable,
|
||||||
SalX11Screen nXScreen, const SalTwoRect& rTwoRect )
|
SalX11Screen nXScreen, const SalTwoRect& rTwoRect )
|
||||||
: maPixmap ( 0 )
|
: maPixmap ( 0 )
|
||||||
|
, mpVisual ( NULL )
|
||||||
, maTwoRect ( rTwoRect )
|
, maTwoRect ( rTwoRect )
|
||||||
, mnDepth ( pImage->depth )
|
, mnDepth ( pImage->depth )
|
||||||
, mnXScreen ( nXScreen )
|
, mnXScreen ( nXScreen )
|
||||||
@ -937,13 +943,15 @@ ImplSalDDB::ImplSalDDB( XImage* pImage, Drawable aDrawable,
|
|||||||
|
|
||||||
ImplSalDDB::ImplSalDDB(
|
ImplSalDDB::ImplSalDDB(
|
||||||
Drawable aDrawable,
|
Drawable aDrawable,
|
||||||
|
void *pVisual,
|
||||||
SalX11Screen nXScreen,
|
SalX11Screen nXScreen,
|
||||||
long nDrawableDepth,
|
long nDrawableDepth,
|
||||||
long nX,
|
long nX,
|
||||||
long nY,
|
long nY,
|
||||||
long nWidth,
|
long nWidth,
|
||||||
long nHeight
|
long nHeight
|
||||||
) : mnDepth( nDrawableDepth )
|
) : mpVisual ( pVisual )
|
||||||
|
, mnDepth( nDrawableDepth )
|
||||||
, mnXScreen( nXScreen )
|
, mnXScreen( nXScreen )
|
||||||
{
|
{
|
||||||
SalDisplay* pSalDisp = GetGenericData()->GetSalDisplay();
|
SalDisplay* pSalDisp = GetGenericData()->GetSalDisplay();
|
||||||
|
@ -90,7 +90,7 @@ void X11SalGraphics::CopyScreenArea( Display* pDisplay,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
X11SalBitmap aBM;
|
X11SalBitmap aBM;
|
||||||
aBM.ImplCreateFromDrawable( aSrc, nXScreenSrc, nSrcDepth, src_x, src_y, w, h );
|
aBM.ImplCreateFromDrawable( aSrc, NULL, nXScreenSrc, nSrcDepth, src_x, src_y, w, h );
|
||||||
SalTwoRect aTwoRect;
|
SalTwoRect aTwoRect;
|
||||||
aTwoRect.mnSrcX = aTwoRect.mnSrcY = 0;
|
aTwoRect.mnSrcX = aTwoRect.mnSrcY = 0;
|
||||||
aTwoRect.mnSrcWidth = aTwoRect.mnDestWidth = w;
|
aTwoRect.mnSrcWidth = aTwoRect.mnDestWidth = w;
|
||||||
@ -913,7 +913,7 @@ SalBitmap *X11SalGraphics::getBitmap( long nX, long nY, long nDX, long nDY )
|
|||||||
nBitCount = 1;
|
nBitCount = 1;
|
||||||
|
|
||||||
if( ! bFakeWindowBG )
|
if( ! bFakeWindowBG )
|
||||||
pSalBitmap->ImplCreateFromDrawable( GetDrawable(), m_nXScreen, nBitCount, nX, nY, nDX, nDY );
|
pSalBitmap->ImplCreateFromDrawable( GetDrawable(), NULL, m_nXScreen, nBitCount, nX, nY, nDX, nDY );
|
||||||
else
|
else
|
||||||
pSalBitmap->Create( Size( nDX, nDY ), (nBitCount > 8) ? 24 : nBitCount, BitmapPalette( nBitCount > 8 ? nBitCount : 0 ) );
|
pSalBitmap->Create( Size( nDX, nDY ), (nBitCount > 8) ? 24 : nBitCount, BitmapPalette( nBitCount > 8 ? nBitCount : 0 ) );
|
||||||
|
|
||||||
|
1009
vcl/unx/generic/gdi/salgdi2.cxx.orig
Normal file
1009
vcl/unx/generic/gdi/salgdi2.cxx.orig
Normal file
File diff suppressed because it is too large
Load Diff
13
vcl/unx/generic/gdi/salgdi2.cxx.rej
Normal file
13
vcl/unx/generic/gdi/salgdi2.cxx.rej
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- vcl/unx/generic/gdi/salgdi2.cxx
|
||||||
|
+++ vcl/unx/generic/gdi/salgdi2.cxx
|
||||||
|
@@ -658,8 +658,8 @@
|
||||||
|
const SalVisual& rSalVis = pSalDisp->GetVisual( m_nXScreen );
|
||||||
|
Display* pXDisplay = pSalDisp->GetDisplay();
|
||||||
|
|
||||||
|
- Picture aAlphaPic;
|
||||||
|
- Pixmap aAlphaPM;
|
||||||
|
+ Picture aAlphaPic = 0;
|
||||||
|
+ Pixmap aAlphaPM = 0;
|
||||||
|
// create source Picture
|
||||||
|
int nDepth = m_pVDev ? m_pVDev->GetDepth() : rSalVis.GetDepth();
|
||||||
|
const X11SalBitmap& rSrcX11Bmp = static_cast<const X11SalBitmap&>( rSrcBitmap );
|
Loading…
x
Reference in New Issue
Block a user