summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-06-10 12:24:10 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-06-11 14:41:50 +0100
commit056c7b46d42c9cb891cb269a2561f1cf34cafe10 (patch)
tree38796501a62da442db6f771f87075311a60ced65 /canvas
parent85165a18e9f8123d80246bedfad0acd8a314f715 (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 'canvas')
-rw-r--r--canvas/source/cairo/cairo_canvasbitmap.cxx30
-rw-r--r--canvas/source/cairo/cairo_canvasbitmap.hxx4
-rw-r--r--canvas/source/cairo/cairo_xlib_cairo.cxx7
-rw-r--r--canvas/source/cairo/cairo_xlib_cairo.hxx1
4 files changed, 5 insertions, 37 deletions
diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx
index 0f7be7f537ca..91f61940dc1d 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.cxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.cxx
@@ -134,30 +134,6 @@ namespace cairocanvas
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 = 0;
-
- 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 aRV( sal_Int32(0) );
@@ -176,11 +152,10 @@ namespace cairocanvas
#ifdef CAIRO_HAS_XLIB_SURFACE
X11Surface* pXlibSurface=dynamic_cast<X11Surface*>(mpBufferSurface.get());
OSL_ASSERT(pXlibSurface);
- uno::Sequence< uno::Any > args( 4 );
+ uno::Sequence< uno::Any > args( 3 );
args[0] = uno::Any( false ); // do not call XFreePixmap on it
args[1] = uno::Any( pXlibSurface->getPixmap()->mhDrawable );
args[2] = uno::Any( sal_Int32( pXlibSurface->getDepth() ) );
- args[3] = uno::Any( sal_Int64( pXlibSurface->getVisual () ) );
aRV = uno::Any( args );
#elif defined CAIRO_HAS_QUARTZ_SURFACE
@@ -205,7 +180,7 @@ namespace cairocanvas
case 2:
{
#ifdef CAIRO_HAS_XLIB_SURFACE
- uno::Sequence< uno::Any > args( 4 );
+ uno::Sequence< uno::Any > args( 3 );
SurfaceSharedPtr pAlphaSurface = mpSurfaceProvider->createSurface( maSize, CAIRO_CONTENT_COLOR );
CairoSharedPtr pAlphaCairo = pAlphaSurface->getCairo();
X11Surface* pXlibSurface=dynamic_cast<X11Surface*>(pAlphaSurface.get());
@@ -224,7 +199,6 @@ namespace cairocanvas
args[0] = uno::Any( true );
args[1] = ::com::sun::star::uno::Any( pPixmap->mhDrawable );
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
// return pixmap and alphachannel pixmap - it will be used in BitmapEx
diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx
index bef03f557cd0..b1d669ed5713 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.hxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.hxx
@@ -115,14 +115,14 @@ namespace cairocanvas
// 2nd the pixmap handle
// 3rd the pixmap depth
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:
SurfaceProviderRef mpSurfaceProvider;
::cairo::SurfaceSharedPtr mpBufferSurface;
::cairo::CairoSharedPtr mpBufferCairo;
- ::basegfx::B2ISize maSize;
+ const ::basegfx::B2ISize maSize;
const bool mbHasAlpha;
};
}
diff --git a/canvas/source/cairo/cairo_xlib_cairo.cxx b/canvas/source/cairo/cairo_xlib_cairo.cxx
index 8b262926bebb..bae6943a47bc 100644
--- a/canvas/source/cairo/cairo_xlib_cairo.cxx
+++ b/canvas/source/cairo/cairo_xlib_cairo.cxx
@@ -187,7 +187,7 @@ namespace cairo
mpSurface(
cairo_xlib_surface_create( (Display*)rSysData.pDisplay,
(Drawable)rData.aPixmap,
- (Visual*) (rData.aVisual ? rData.aVisual : rSysData.pVisual),
+ (Visual*) rSysData.pVisual,
rData.mnWidth, rData.mnHeight ),
&cairo_surface_destroy)
{
@@ -312,11 +312,6 @@ namespace cairo
return -1;
}
- void* X11Surface::getVisual() const
- {
- return cairo_xlib_surface_get_visual( mpSurface.get() );
- }
-
SurfaceSharedPtr createSurface( const CairoSurfaceSharedPtr& rSurface )
{
return SurfaceSharedPtr(new X11Surface(rSurface));
diff --git a/canvas/source/cairo/cairo_xlib_cairo.hxx b/canvas/source/cairo/cairo_xlib_cairo.hxx
index 080258bb04d2..105c570eae7d 100644
--- a/canvas/source/cairo/cairo_xlib_cairo.hxx
+++ b/canvas/source/cairo/cairo_xlib_cairo.hxx
@@ -92,7 +92,6 @@ namespace cairo {
X11PixmapSharedPtr getPixmap() const { return mpPixmap; }
void* getRenderFormat() const { return maSysData.pRenderFormat; }
long getDrawable() const { return mpPixmap ? mpPixmap->mhDrawable : maSysData.hDrawable; }
- void* getVisual() const;
};
}