ooo-build r14319 - in trunk: . patches/test



Author: thorstenb
Date: Wed Oct 15 21:23:28 2008
New Revision: 14319
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14319&view=rev

Log:
    * patches/test/opengl-canvas.diff: work-in-progress, sprites &
    copy-on-write semantics finished



Modified:
   trunk/ChangeLog
   trunk/patches/test/opengl-canvas.diff

Modified: trunk/patches/test/opengl-canvas.diff
==============================================================================
--- trunk/patches/test/opengl-canvas.diff	(original)
+++ trunk/patches/test/opengl-canvas.diff	Wed Oct 15 21:23:28 2008
@@ -8,26 +8,30 @@
  canvas/prj/build.lst                            |    1 
  canvas/source/opengl/exports.dxp                |    3 
  canvas/source/opengl/exports.map                |    8 
- canvas/source/opengl/makefile.mk                |   63 ++
- canvas/source/opengl/ogl_canvasbitmap.cxx       |   72 ++
- canvas/source/opengl/ogl_canvasbitmap.hxx       |   87 +++
- canvas/source/opengl/ogl_canvascustomsprite.cxx |   77 ++
- canvas/source/opengl/ogl_canvascustomsprite.hxx |   83 ++
- canvas/source/opengl/ogl_canvasfont.cxx         |  109 +++
- canvas/source/opengl/ogl_canvasfont.hxx         |   79 ++
- canvas/source/opengl/ogl_canvashelper.cxx       |  766 +++++++++++++++++++++++
- canvas/source/opengl/ogl_canvashelper.hxx       |  208 ++++++
- canvas/source/opengl/ogl_spritecanvas.cxx       |  190 ++++++
- canvas/source/opengl/ogl_spritecanvas.hxx       |  117 ++++
+ canvas/source/opengl/makefile.mk                |   65 ++
+ canvas/source/opengl/ogl_bitmapcanvashelper.cxx |  107 +++
+ canvas/source/opengl/ogl_bitmapcanvashelper.hxx |  106 +++
+ canvas/source/opengl/ogl_canvasbitmap.cxx       |   62 ++
+ canvas/source/opengl/ogl_canvasbitmap.hxx       |   81 +++
+ canvas/source/opengl/ogl_canvascustomsprite.cxx |  123 ++++
+ canvas/source/opengl/ogl_canvascustomsprite.hxx |   97 +++
+ canvas/source/opengl/ogl_canvasfont.cxx         |   88 +++
+ canvas/source/opengl/ogl_canvasfont.hxx         |   72 ++
+ canvas/source/opengl/ogl_canvashelper.cxx       |  705 +++++++++++++++++++++++
+ canvas/source/opengl/ogl_canvashelper.hxx       |  227 +++++++
+ canvas/source/opengl/ogl_spritecanvas.cxx       |  204 +++++++
+ canvas/source/opengl/ogl_spritecanvas.hxx       |  125 ++++
  canvas/source/opengl/ogl_spritedevicehelper.cxx |  220 +++++++
  canvas/source/opengl/ogl_spritedevicehelper.hxx |  102 +++
- canvas/source/opengl/ogl_textlayout.cxx         |  244 +++++++
- canvas/source/opengl/ogl_textlayout.hxx         |   90 +++
- offapi/com/sun/star/rendering/XSpriteCanvas.idl |    8 
- 19 files changed, 2523 insertions(+), 4 deletions(-)
+ canvas/source/opengl/ogl_textlayout.cxx         |  222 +++++++
+ canvas/source/opengl/ogl_textlayout.hxx         |   83 +++
+ offapi/com/sun/star/rendering/XSpriteCanvas.idl |   13 
+ 21 files changed, 2707 insertions(+), 7 deletions(-)
  create mode 100644 canvas/source/opengl/exports.dxp
  create mode 100644 canvas/source/opengl/exports.map
  create mode 100644 canvas/source/opengl/makefile.mk
+ create mode 100644 canvas/source/opengl/ogl_bitmapcanvashelper.cxx
+ create mode 100644 canvas/source/opengl/ogl_bitmapcanvashelper.hxx
  create mode 100644 canvas/source/opengl/ogl_canvasbitmap.cxx
  create mode 100644 canvas/source/opengl/ogl_canvasbitmap.hxx
  create mode 100644 canvas/source/opengl/ogl_canvascustomsprite.cxx
@@ -81,10 +85,10 @@
 +};
 diff --git canvas/source/opengl/makefile.mk canvas/source/opengl/makefile.mk
 new file mode 100644
-index 0000000..0ca6763
+index 0000000..fe31daf
 --- /dev/null
 +++ canvas/source/opengl/makefile.mk
-@@ -0,0 +1,63 @@
+@@ -0,0 +1,65 @@
 +#*************************************************************************
 +#
 +#    OpenOffice.org - a multi-platform office productivity suite
@@ -121,6 +125,8 @@
 +			$(SLO)$/ogl_spritedevicehelper.obj \
 +			$(SLO)$/ogl_canvashelper.obj \
 +			$(SLO)$/ogl_canvasfont.obj \
++			$(SLO)$/ogl_canvasbitmap.obj \
++			$(SLO)$/ogl_bitmapcanvashelper.obj \
 +			$(SLO)$/ogl_canvascustomsprite.obj \
 +			$(SLO)$/ogl_textlayout.obj
 +
@@ -148,12 +154,12 @@
 +# ==========================================================================
 +
 +.INCLUDE :	target.mk
-diff --git canvas/source/opengl/ogl_canvasbitmap.cxx canvas/source/opengl/ogl_canvasbitmap.cxx
+diff --git canvas/source/opengl/ogl_bitmapcanvashelper.cxx canvas/source/opengl/ogl_bitmapcanvashelper.cxx
 new file mode 100644
-index 0000000..ebeba24
+index 0000000..3033de3
 --- /dev/null
-+++ canvas/source/opengl/ogl_canvasbitmap.cxx
-@@ -0,0 +1,72 @@
++++ canvas/source/opengl/ogl_bitmapcanvashelper.cxx
+@@ -0,0 +1,107 @@
 +/*************************************************************************
 + *
 + *    OpenOffice.org - a multi-platform office productivity suite
@@ -163,7 +169,6 @@
 + *
 + *      Copyright (C) 2008, Novell Inc.
 + *      Parts copyright 2005 by Sun Microsystems, Inc.
-+ *      Parts copyright 2004 David Reveman, Peter Nilsson
 + *
 + *   The Contents of this file are made available subject to
 + *   the terms of GNU Lesser General Public License Version 2.1.
@@ -173,65 +178,281 @@
 +// MARKER(update_precomp.py): autogen include statement, do not remove
 +#include "precompiled_canvas.hxx"
 +
-+#include "ogl_canvasbitmap.hxx"
++#include "ogl_bitmapcanvashelper.hxx"
 +
 +#include <canvas/debug.hxx>
 +#include <canvas/canvastools.hxx>
++#include <tools/diagnose_ex.h>
 +
 +
 +using namespace ::com::sun::star;
 +
-+namespace nullcanvas
++namespace oglcanvas
 +{
-+    CanvasBitmap::CanvasBitmap( const ::basegfx::B2ISize& rSize,
-+                                const DeviceRef&          rDevice,
-+                                bool                      bHasAlpha ) :
-+        mpDevice( rDevice )
-+    {
-+        ENSURE_AND_THROW( mpDevice.is(),
-+                          "CanvasBitmap::CanvasBitmap(): Invalid surface or device" );
-+
-+        maCanvasHelper.init( rSize,
-+                             *mpDevice.get(),
-+                             bHasAlpha );
++    BitmapCanvasHelper::BitmapCanvasHelper()
++    {}
++
++    void BitmapCanvasHelper::disposing()
++    {
++        CanvasHelper::disposing();
 +    }
 +
-+    void SAL_CALL CanvasBitmap::disposing()
++    void BitmapCanvasHelper::init( rendering::XGraphicDevice&     rDevice,
++                                   const geometry::IntegerSize2D& rSize )
 +    {
-+        mpDevice.clear();
++        maSize = rSize;
++        CanvasHelper::init(rDevice);
++    }
 +
-+        // forward to parent
-+        CanvasBitmap_Base::disposing();
++    void BitmapCanvasHelper::copyRect( const rendering::XCanvas*                            /*pCanvas*/, 
++                                       const uno::Reference< rendering::XBitmapCanvas >&    /*sourceCanvas*/, 
++                                       const geometry::RealRectangle2D&                     /*sourceRect*/, 
++                                       const rendering::ViewState&                          /*sourceViewState*/, 
++                                       const rendering::RenderState&                        /*sourceRenderState*/, 
++                                       const geometry::RealRectangle2D&                     /*destRect*/, 
++                                       const rendering::ViewState&                          /*destViewState*/, 
++                                       const rendering::RenderState&                        /*destRenderState*/ )
++    {
++        // TODO(F2): copyRect NYI
++    }
++
++    geometry::IntegerSize2D BitmapCanvasHelper::getSize()
++    {
++        return maSize;
++    }
++
++    uno::Reference< rendering::XBitmap > BitmapCanvasHelper::getScaledBitmap( const geometry::RealSize2D& /*newSize*/, 
++                                                                              sal_Bool                    /*beFast*/ )
++    {
++        // TODO(F1):
++        return uno::Reference< rendering::XBitmap >();
 +    }
 +
-+#define IMPLEMENTATION_NAME "NullCanvas.CanvasBitmap"
-+#define SERVICE_NAME "com.sun.star.rendering.CanvasBitmap"
++    uno::Sequence< sal_Int8 > BitmapCanvasHelper::getData( rendering::IntegerBitmapLayout&     /*bitmapLayout*/, 
++                                                           const geometry::IntegerRectangle2D& /*rect*/ )
++    {
++        // TODO(F2): NYI - and improbable to ever be
++        return uno::Sequence< sal_Int8 >();
++    }
 +
-+    ::rtl::OUString SAL_CALL CanvasBitmap::getImplementationName(  ) throw (uno::RuntimeException)
++    void BitmapCanvasHelper::setData( const uno::Sequence< sal_Int8 >&      /*data*/, 
++                                      const rendering::IntegerBitmapLayout& /*bitmapLayout*/, 
++                                      const geometry::IntegerRectangle2D&   /*rect*/ )
 +    {
-+        return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) );
++        // TODO(F2): NYI - and improbable to ever be
 +    }
 +
-+    sal_Bool SAL_CALL CanvasBitmap::supportsService( const ::rtl::OUString& ServiceName ) throw (uno::RuntimeException)
++    void BitmapCanvasHelper::setPixel( const uno::Sequence< sal_Int8 >&       /*color*/, 
++                                       const rendering::IntegerBitmapLayout&  /*bitmapLayout*/, 
++                                       const geometry::IntegerPoint2D&        /*pos*/ )
 +    {
-+        return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME ) );
++        // TODO(F2): NYI - and improbable to ever be
 +    }
 +
-+    uno::Sequence< ::rtl::OUString > SAL_CALL CanvasBitmap::getSupportedServiceNames(  ) throw (uno::RuntimeException)
++    uno::Sequence< sal_Int8 > BitmapCanvasHelper::getPixel( rendering::IntegerBitmapLayout&   /*bitmapLayout*/, 
++                                                            const geometry::IntegerPoint2D&   /*pos*/ )
 +    {
-+        uno::Sequence< ::rtl::OUString > aRet(1);
-+        aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
-+        
-+        return aRet;
++        // TODO(F2): NYI - and improbable to ever be
++        return uno::Sequence< sal_Int8 >();
++    }
++
++    rendering::IntegerBitmapLayout BitmapCanvasHelper::getMemoryLayout()
++    {
++        return ::canvas::tools::getStdMemoryLayout(getSize());
++    }
++
++    bool BitmapCanvasHelper::hasAlpha() const
++    {
++        return true;
 +    }
 +
 +}
+diff --git canvas/source/opengl/ogl_bitmapcanvashelper.hxx canvas/source/opengl/ogl_bitmapcanvashelper.hxx
+new file mode 100644
+index 0000000..35c1f94
+--- /dev/null
++++ canvas/source/opengl/ogl_bitmapcanvashelper.hxx
+@@ -0,0 +1,106 @@
++/*************************************************************************
++ *
++ *    OpenOffice.org - a multi-platform office productivity suite
++ *
++ *    Author:
++ *      Thorsten Behrens <tbehrens novell com>      
++ *
++ *      Copyright (C) 2008, Novell Inc.
++ *      Parts copyright 2005 by Sun Microsystems, Inc.
++ *
++ *   The Contents of this file are made available subject to
++ *   the terms of GNU Lesser General Public License Version 2.1.
++ *
++ ************************************************************************/
++
++#ifndef OGL_BITMAPCANVASHELPER_HXX_
++#define OGL_BITMAPCANVASHELPER_HXX_
++
++#include <com/sun/star/rendering/XBitmapCanvas.hpp>
++#include <com/sun/star/rendering/XIntegerBitmap.hpp>
++
++#include <basegfx/vector/b2isize.hxx>
++#include <basegfx/vector/b2dsize.hxx>
++
++#include <boost/utility.hpp>
++#include <boost/shared_ptr.hpp>
++#include <vector>
++
++#include "ogl_canvashelper.hxx"
++
++
++namespace oglcanvas
++{
++    /** Helper class for basic canvas functionality. */
++    class BitmapCanvasHelper : public CanvasHelper
++    {
++    public:
++        BitmapCanvasHelper();
++
++        /// Release all references
++        void disposing();
++
++        /** Initialize canvas helper
++
++            This method late-initializes the canvas helper, providing
++            it with the necessary device and output objects. Note that
++            the CanvasHelper does <em>not</em> take ownership of the
++            passed rDevice reference, nor does it perform any
++            reference counting. Thus, to prevent the reference counted
++            SpriteCanvas object from deletion, the user of this class
++            is responsible for holding ref-counted references itself!
++
++            @param rDevice
++            Reference device this canvas is associated with
++
++         */
++        void init( ::com::sun::star::rendering::XGraphicDevice&     rDevice,
++                   const ::com::sun::star::geometry::IntegerSize2D& rSize );
++
++        // BitmapCanvasHelper functionality
++        // ================================
++
++        void copyRect( const ::com::sun::star::rendering::XCanvas*          rCanvas,
++                       const ::com::sun::star::uno::Reference< 
++                            ::com::sun::star::rendering::XBitmapCanvas >&   sourceCanvas, 
++                       const ::com::sun::star::geometry::RealRectangle2D&   sourceRect, 
++                       const ::com::sun::star::rendering::ViewState&        sourceViewState, 
++                       const ::com::sun::star::rendering::RenderState&      sourceRenderState, 
++                       const ::com::sun::star::geometry::RealRectangle2D&   destRect, 
++                       const ::com::sun::star::rendering::ViewState&        destViewState, 
++                       const ::com::sun::star::rendering::RenderState&      destRenderState );
++            
++        ::com::sun::star::geometry::IntegerSize2D getSize();
++
++        ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > queryBitmapCanvas();
++
++        ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > 
++            getScaledBitmap( const ::com::sun::star::geometry::RealSize2D&  newSize, 
++                             sal_Bool                                               beFast );
++
++        ::com::sun::star::uno::Sequence< sal_Int8 > 
++            getData( ::com::sun::star::rendering::IntegerBitmapLayout&      bitmapLayout,
++                     const ::com::sun::star::geometry::IntegerRectangle2D&  rect );
++
++        void setData( const ::com::sun::star::uno::Sequence< sal_Int8 >&        data, 
++                      const ::com::sun::star::rendering::IntegerBitmapLayout&   bitmapLayout, 
++                      const ::com::sun::star::geometry::IntegerRectangle2D&     rect );
++
++        void setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >&       color, 
++                       const ::com::sun::star::rendering::IntegerBitmapLayout&  bitmapLayout, 
++                       const ::com::sun::star::geometry::IntegerPoint2D&        pos );
++
++        ::com::sun::star::uno::Sequence< sal_Int8 > 
++            getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout, 
++                      const ::com::sun::star::geometry::IntegerPoint2D& pos );
++
++        ::com::sun::star::rendering::IntegerBitmapLayout getMemoryLayout();
++
++        bool hasAlpha() const;
++
++    private:
++        ::com::sun::star::geometry::IntegerSize2D maSize;
++    };
++}
++
++#endif
+diff --git canvas/source/opengl/ogl_canvasbitmap.cxx canvas/source/opengl/ogl_canvasbitmap.cxx
+new file mode 100644
+index 0000000..51b58e5
+--- /dev/null
++++ canvas/source/opengl/ogl_canvasbitmap.cxx
+@@ -0,0 +1,62 @@
++/*************************************************************************
++ *
++ *    OpenOffice.org - a multi-platform office productivity suite
++ *
++ *    Author:
++ *      Thorsten Behrens <tbehrens novell com>      
++ *
++ *      Copyright (C) 2008, Novell Inc.
++ *      Parts copyright 2005 by Sun Microsystems, Inc.
++ *      Parts copyright 2004 David Reveman, Peter Nilsson
++ *
++ *   The Contents of this file are made available subject to
++ *   the terms of GNU Lesser General Public License Version 2.1.
++ *
++ ************************************************************************/
++
++// MARKER(update_precomp.py): autogen include statement, do not remove
++#include "precompiled_canvas.hxx"
++
++#include "ogl_canvasbitmap.hxx"
++
++#include <canvas/debug.hxx>
++#include <canvas/canvastools.hxx>
++#include <tools/diagnose_ex.h>
++
++
++using namespace ::com::sun::star;
++
++namespace oglcanvas
++{
++    CanvasBitmap::CanvasBitmap( const geometry::IntegerSize2D& rSize,
++                                const SpriteCanvasRef&         rDevice,
++                                bool                           bHasAlpha ) :
++        mpDevice( rDevice ),
++        mbHasAlpha( bHasAlpha )
++    {
++        ENSURE_OR_THROW( mpDevice.is(),
++                         "CanvasBitmap::CanvasBitmap(): Invalid surface or device" );
++
++        maCanvasHelper.init( *mpDevice.get(), rSize );
++    }
++
++    CanvasBitmap::CanvasBitmap( const CanvasBitmap& rSrc ) :
++        mpDevice( rSrc.mpDevice ),
++        mbHasAlpha( rSrc.mbHasAlpha )
++    {
++        maCanvasHelper = rSrc.maCanvasHelper;
++    }
++
++    void SAL_CALL CanvasBitmap::disposing()
++    {
++        mpDevice.clear();
++
++        // forward to parent
++        CanvasBitmapBaseT::disposing();
++    }
++
++    bool CanvasBitmap::renderRecordedActions() const
++    {
++        return maCanvasHelper.renderRecordedActions();
++    }
++}
 diff --git canvas/source/opengl/ogl_canvasbitmap.hxx canvas/source/opengl/ogl_canvasbitmap.hxx
 new file mode 100644
-index 0000000..6596952
+index 0000000..efb92bb
 --- /dev/null
 +++ canvas/source/opengl/ogl_canvasbitmap.hxx
-@@ -0,0 +1,87 @@
+@@ -0,0 +1,81 @@
 +/*************************************************************************
 + *
 + *    OpenOffice.org - a multi-platform office productivity suite
@@ -251,9 +472,8 @@
 +#ifndef OGL_CANVASBITMAP_HXX
 +#define OGL_CANVASBITMAP_HXX
 +
-+#include <cppuhelper/compbase3.hxx>
++#include <cppuhelper/compbase2.hxx>
 +
-+#include <com/sun/star/lang/XServiceInfo.hpp>
 +#include <com/sun/star/rendering/XBitmapCanvas.hpp>
 +#include <com/sun/star/rendering/XIntegerBitmap.hpp>
 +
@@ -263,7 +483,7 @@
 +
 +#include <boost/shared_ptr.hpp>
 +
-+#include "ogl_canvashelper.hxx"
++#include "ogl_bitmapcanvashelper.hxx"
 +#include "ogl_spritecanvas.hxx"
 +
 +
@@ -271,11 +491,10 @@
 +
 +namespace oglcanvas
 +{
-+    typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::rendering::XBitmapCanvas,
-+                                              ::com::sun::star::rendering::XIntegerBitmap,
-+                                              ::com::sun::star::lang::XServiceInfo >    CanvasBitmapBase_Base;
++    typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::rendering::XBitmapCanvas,
++                                              ::com::sun::star::rendering::XIntegerBitmap > CanvasBitmapBase_Base;
 +    typedef ::canvas::IntegerBitmapBase< ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >, 
-+                                         CanvasHelper, 
++                                         BitmapCanvasHelper, 
 +                                         ::osl::MutexGuard,
 +                                         ::cppu::OWeakObject >                          CanvasBitmapBaseT;
 +
@@ -290,9 +509,9 @@
 +            @param rDevice
 +            Reference device, with which bitmap should be compatible
 +         */
-+        CanvasBitmap( const ::basegfx::B2ISize& rSize,
-+                      const SpriteCanvasRef&    rDevice,
-+                      bool                      bHasAlpha );
++        CanvasBitmap( const ::com::sun::star::geometry::IntegerSize2D& rSize,
++                      const SpriteCanvasRef&                           rDevice,
++                      bool                                             bHasAlpha );
 +
 +        /** Create verbatim copy (including all recorded actions)
 +         */
@@ -301,11 +520,6 @@
 +        /// Dispose all internal references
 +        virtual void SAL_CALL disposing();
 +
-+        // XServiceInfo
-+        virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
-+        virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
-+        virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException);
-+
 +        /** Write out recorded actions
 +         */
 +        bool renderRecordedActions() const;
@@ -315,16 +529,17 @@
 +            raw pointer (without refcounting) 
 +        */
 +        SpriteCanvasRef mpDevice;
++        bool            mbHasAlpha;
 +    };
 +}
 +
 +#endif
 diff --git canvas/source/opengl/ogl_canvascustomsprite.cxx canvas/source/opengl/ogl_canvascustomsprite.cxx
 new file mode 100644
-index 0000000..f3ff780
+index 0000000..4d722df
 --- /dev/null
 +++ canvas/source/opengl/ogl_canvascustomsprite.cxx
-@@ -0,0 +1,77 @@
+@@ -0,0 +1,123 @@
 +/*************************************************************************
 + *
 + *    OpenOffice.org - a multi-platform office productivity suite
@@ -347,22 +562,28 @@
 +
 +#include <canvas/debug.hxx>
 +#include <canvas/verbosetrace.hxx>
++#include <canvas/verifyinput.hxx>
 +#include <tools/diagnose_ex.h>
 +
 +#include <canvas/canvastools.hxx>
 +
 +#include <basegfx/matrix/b2dhommatrix.hxx>
 +#include <basegfx/point/b2dpoint.hxx>
++#include <basegfx/tools/canvastools.hxx>
 +
 +
 +using namespace ::com::sun::star;
 +
 +namespace oglcanvas
 +{
-+    CanvasCustomSprite::CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D&   /*rSpriteSize*/,
-+                                            const SpriteCanvasRef&                          rRefDevice ) :
-+        CanvasCustomSpriteBaseT( m_aMutex ),
-+        mpSpriteCanvas( rRefDevice )
++    CanvasCustomSprite::CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
++                                            const SpriteCanvasRef&                        rRefDevice ) :
++        mpSpriteCanvas( rRefDevice ),
++        maSize(rSpriteSize),
++        maTransformation(),
++        maPosition(),
++        mfAlpha(0.0),
++        mfPriority(0.0)
 +    {
 +        ENSURE_OR_THROW( rRefDevice.get(),
 +                         "CanvasCustomSprite::CanvasCustomSprite(): Invalid sprite canvas" );
@@ -376,38 +597,78 @@
 +        mpSpriteCanvas.clear();
 +    }
 +
-+    void CanvasCustomSprite::redraw() const
++    void SAL_CALL CanvasCustomSprite::setAlpha( double alpha ) throw (lang::IllegalArgumentException, 
++                                                                      uno::RuntimeException)
++    {
++        canvas::tools::verifyRange( alpha, 0.0, 1.0 );
++
++        ::osl::MutexGuard aGuard( m_aMutex );
++        mfAlpha = alpha;
++    }
++
++    void SAL_CALL CanvasCustomSprite::move( const geometry::RealPoint2D&  aNewPos, 
++                                            const rendering::ViewState&   viewState, 
++                                            const rendering::RenderState& renderState ) throw (lang::IllegalArgumentException, 
++                                                                                               uno::RuntimeException)
++    {
++        canvas::tools::verifyArgs(aNewPos, viewState, renderState, 
++                                  BOOST_CURRENT_FUNCTION,
++                                  static_cast< ::cppu::OWeakObject* >(this));
++        
++        ::osl::MutexGuard aGuard( m_aMutex );
++        ::basegfx::B2DHomMatrix aTransform;
++        ::canvas::tools::mergeViewAndRenderTransform(aTransform,
++                                                     viewState, 
++                                                     renderState);
++
++        // convert position to device pixel
++        maPosition = ::basegfx::unotools::b2DPointFromRealPoint2D(aNewPos);
++        maPosition *= aTransform;
++    }
++
++    void SAL_CALL CanvasCustomSprite::transform( const geometry::AffineMatrix2D& aTransformation ) throw (lang::IllegalArgumentException, 
++                                                                                                          uno::RuntimeException)
 +    {
 +        ::osl::MutexGuard aGuard( m_aMutex );
++        maTransformation = aTransformation;
++    }
++
++    void SAL_CALL CanvasCustomSprite::clip( const uno::Reference< rendering::XPolyPolygon2D >& /*aClip*/ ) throw (uno::RuntimeException)
++    {
++        // TODO(F3)
 +    }
 +
-+#define IMPLEMENTATION_NAME "DummyCanvas.CanvasCustomSprite"
-+#define SERVICE_NAME "com.sun.star.rendering.CanvasCustomSprite"
++    void SAL_CALL CanvasCustomSprite::setPriority( double nPriority ) throw (uno::RuntimeException)
++    {
++        ::osl::MutexGuard aGuard( m_aMutex );
++        mfPriority = nPriority;
++    }
 +
-+    ::rtl::OUString SAL_CALL CanvasCustomSprite::getImplementationName() throw( uno::RuntimeException )
++    void SAL_CALL CanvasCustomSprite::show() throw (uno::RuntimeException)
 +    {
-+        return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) );
++        ::osl::MutexGuard aGuard( m_aMutex );
++        if( mpSpriteCanvas.is() )
++            mpSpriteCanvas->show(this);
 +    }
 +
-+    sal_Bool SAL_CALL CanvasCustomSprite::supportsService( const ::rtl::OUString& ServiceName ) throw( uno::RuntimeException )
++    void SAL_CALL CanvasCustomSprite::hide() throw (uno::RuntimeException)
 +    {
-+        return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME ) );
++        ::osl::MutexGuard aGuard( m_aMutex );
++        if( mpSpriteCanvas.is() )
++            mpSpriteCanvas->hide(this);
 +    }
 +
-+    uno::Sequence< ::rtl::OUString > SAL_CALL CanvasCustomSprite::getSupportedServiceNames()  throw( uno::RuntimeException )
++    uno::Reference< rendering::XCanvas > SAL_CALL CanvasCustomSprite::getContentCanvas() throw (uno::RuntimeException)
 +    {
-+        uno::Sequence< ::rtl::OUString > aRet(1);
-+        aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
-+        
-+        return aRet;
++        return this;
 +    }
 +}
 diff --git canvas/source/opengl/ogl_canvascustomsprite.hxx canvas/source/opengl/ogl_canvascustomsprite.hxx
 new file mode 100644
-index 0000000..46d897a
+index 0000000..87e14af
 --- /dev/null
 +++ canvas/source/opengl/ogl_canvascustomsprite.hxx
-@@ -0,0 +1,83 @@
+@@ -0,0 +1,97 @@
 +/*************************************************************************
 + *
 + *    OpenOffice.org - a multi-platform office productivity suite
@@ -426,10 +687,9 @@
 +#ifndef OGL_CANVASCUSTOMSPRITE_HXX
 +#define OGL_CANVASCUSTOMSPRITE_HXX
 +
-+#include <cppuhelper/compbase3.hxx>
++#include <cppuhelper/compbase2.hxx>
 +#include <comphelper/uno3.hxx>
 +
-+#include <com/sun/star/lang/XServiceInfo.hpp>
 +#include <com/sun/star/lang/XComponent.hpp>
 +#include <com/sun/star/rendering/XCustomSprite.hpp>
 +#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
@@ -441,18 +701,21 @@
 +#include <canvas/base/basemutexhelper.hxx>
 +
 +#include "ogl_spritecanvas.hxx"
++#include "ogl_canvashelper.hxx"
 +
 +
 +namespace oglcanvas
 +{
-+    typedef ::cppu::WeakComponentImplHelper3< ::com::sun::star::rendering::XCustomSprite,
-+                                              ::com::sun::star::rendering::XCanvas,
-+                                              ::com::sun::star::lang::XServiceInfo > CanvasCustomSpriteBaseT;
++    typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::rendering::XCustomSprite,
++                                              ::com::sun::star::rendering::XCanvas > CanvasCustomSpriteBase_Base;
++    typedef ::canvas::CanvasBase< ::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >, 
++                                    CanvasHelper, 
++                                    ::osl::MutexGuard,
++                                    ::cppu::OWeakObject >                          CanvasCustomSpriteBaseT;
 +
 +    /* Definition of CanvasCustomSprite class */
 +
-+    class CanvasCustomSprite : public ::comphelper::OBaseMutex, 
-+                               public CanvasCustomSpriteBaseT
++    class CanvasCustomSprite : public CanvasCustomSpriteBaseT
 +    {
 +    public:
 +        /** Create a custom sprite
@@ -474,29 +737,41 @@
 +
 +        virtual void SAL_CALL disposing();
 +
-+        // XServiceInfo
-+        virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
-+        virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
-+        virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()  throw( ::com::sun::star::uno::RuntimeException );
++        // XSprite
++        virtual void SAL_CALL setAlpha( double alpha ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
++        virtual void SAL_CALL move( const ::com::sun::star::geometry::RealPoint2D&  aNewPos, const ::com::sun::star::rendering::ViewState&  viewState, const ::com::sun::star::rendering::RenderState& renderState ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
++        virtual void SAL_CALL transform( const ::com::sun::star::geometry::AffineMatrix2D& aTransformation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
++        virtual void SAL_CALL clip( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& aClip ) throw (::com::sun::star::uno::RuntimeException);
++        virtual void SAL_CALL setPriority( double nPriority ) throw (::com::sun::star::uno::RuntimeException);
++        virtual void SAL_CALL show() throw (::com::sun::star::uno::RuntimeException);
++        virtual void SAL_CALL hide() throw (::com::sun::star::uno::RuntimeException);
++
++        // XCustomSprite
++        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas > SAL_CALL getContentCanvas() throw (::com::sun::star::uno::RuntimeException);
 +
-+        // Sprite
-+        virtual void redraw() const;
++        double getPriority() const;
 +
 +    private:
 +        /** MUST hold here, too, since CanvasHelper only contains a
 +            raw pointer (without refcounting) 
 +        */
-+        SpriteCanvasRef mpSpriteCanvas;
++        SpriteCanvasRef                              mpSpriteCanvas;
++        const ::com::sun::star::geometry::RealSize2D maSize;
++
++        ::com::sun::star::geometry::AffineMatrix2D   maTransformation;
++        ::basegfx::B2DPoint                          maPosition;
++        double                                       mfAlpha;
++        double                                       mfPriority;
 +    };
 +}
 +
 +#endif
 diff --git canvas/source/opengl/ogl_canvasfont.cxx canvas/source/opengl/ogl_canvasfont.cxx
 new file mode 100644
-index 0000000..86dd5e9
+index 0000000..9473fb3
 --- /dev/null
 +++ canvas/source/opengl/ogl_canvasfont.cxx
-@@ -0,0 +1,109 @@
+@@ -0,0 +1,88 @@
 +/*************************************************************************
 + *
 + *    OpenOffice.org - a multi-platform office productivity suite
@@ -580,27 +855,6 @@
 +        return rendering::FontMetrics();
 +    }
 +
-+#define SERVICE_NAME "com.sun.star.rendering.CanvasFont"
-+#define IMPLEMENTATION_NAME "DummyCanvas::CanvasFont"
-+
-+    ::rtl::OUString SAL_CALL CanvasFont::getImplementationName() throw( uno::RuntimeException )
-+    {
-+        return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) );
-+    }
-+
-+    sal_Bool SAL_CALL CanvasFont::supportsService( const ::rtl::OUString& ServiceName ) throw( uno::RuntimeException )
-+    {
-+        return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME ) );
-+    }
-+
-+    uno::Sequence< ::rtl::OUString > SAL_CALL CanvasFont::getSupportedServiceNames()  throw( uno::RuntimeException )
-+    {
-+        uno::Sequence< ::rtl::OUString > aRet(1);
-+        aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
-+        
-+        return aRet;
-+    }
-+
 +    const ::com::sun::star::geometry::Matrix2D& CanvasFont::getFontMatrix() const
 +    {
 +        return maFontMatrix;
@@ -608,10 +862,10 @@
 +}
 diff --git canvas/source/opengl/ogl_canvasfont.hxx canvas/source/opengl/ogl_canvasfont.hxx
 new file mode 100644
-index 0000000..2bf74ea
+index 0000000..3c84f11
 --- /dev/null
 +++ canvas/source/opengl/ogl_canvasfont.hxx
-@@ -0,0 +1,79 @@
+@@ -0,0 +1,72 @@
 +/*************************************************************************
 + *
 + *    OpenOffice.org - a multi-platform office productivity suite
@@ -632,10 +886,9 @@
 +
 +#include <comphelper/implementationreference.hxx>
 +
-+#include <cppuhelper/compbase2.hxx>
++#include <cppuhelper/compbase1.hxx>
 +#include <comphelper/broadcasthelper.hxx>
 +
-+#include <com/sun/star/lang/XServiceInfo.hpp>
 +#include <com/sun/star/rendering/XCanvas.hpp>
 +#include <com/sun/star/rendering/XCanvasFont.hpp>
 +
@@ -651,8 +904,7 @@
 +{
 +    class SpriteCanvas;
 +
-+    typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::rendering::XCanvasFont,
-+                         					  ::com::sun::star::lang::XServiceInfo > CanvasFontBaseT;
++    typedef ::cppu::WeakComponentImplHelper1< ::com::sun::star::rendering::XCanvasFont > CanvasFontBaseT;
 +
 +    class CanvasFont : public ::comphelper::OBaseMutex, 
 +                       public CanvasFontBaseT,
@@ -677,11 +929,6 @@
 +        virtual ::com::sun::star::uno::Sequence< double > SAL_CALL getAvailableSizes(  ) throw (::com::sun::star::uno::RuntimeException);
 +        virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getExtraFontProperties(  ) throw (::com::sun::star::uno::RuntimeException);
 +
-+        // XServiceInfo
-+        virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
-+        virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
-+        virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()  throw( ::com::sun::star::uno::RuntimeException );
-+
 +		const ::com::sun::star::geometry::Matrix2D& getFontMatrix() const;
 +
 +    private:
@@ -693,10 +940,10 @@
 +#endif
 diff --git canvas/source/opengl/ogl_canvashelper.cxx canvas/source/opengl/ogl_canvashelper.cxx
 new file mode 100644
-index 0000000..1ab72de
+index 0000000..168ae2d
 --- /dev/null
 +++ canvas/source/opengl/ogl_canvashelper.cxx
-@@ -0,0 +1,766 @@
+@@ -0,0 +1,705 @@
 +/*************************************************************************
 + *
 + *    OpenOffice.org - a multi-platform office productivity suite
@@ -765,6 +1012,8 @@
 +       there are display lists, which at least keep the data on the
 +       server, or even better, vertex buffers, which copy geometry
 +       data over en bloc.
++
++       Text: http://www.opengl.org/resources/features/fontsurvey/
 +     */
 +
 +    struct CanvasHelper::Action
@@ -949,7 +1198,7 @@
 +                              GL_UNSIGNED_BYTE,
 +                              &rPixelData[0]);
 +            glEnable(GL_TEXTURE_2D);
-+            glBegin(GL_QUADS);
++            glBegin(GL_TRIANGLE_STRIP);
 +            glTexCoord2f(0,0); glVertex2d(0,0);
 +            glTexCoord2f(1,0); glVertex2d(rPixelSize.Width, 0);
 +            glTexCoord2f(1,1); glVertex2d(rPixelSize.Width, rPixelSize.Height);
@@ -964,12 +1213,22 @@
 +
 +    CanvasHelper::CanvasHelper() :
 +        mpDevice( NULL ),
-+        mpRecordedActions( new std::vector<Action>() )
++        mpRecordedActions()
++    {}
++
++    CanvasHelper::~CanvasHelper()
 +    {}
 +
++    CanvasHelper& CanvasHelper::operator=( const CanvasHelper& rSrc )
++    {
++        mpDevice = rSrc.mpDevice;
++        mpRecordedActions = rSrc.mpRecordedActions;
++    }
++
 +    void CanvasHelper::disposing()
 +    {
-+        mpRecordedActions.reset( new std::vector<Action>() );
++        RecordVectorT aThrowaway;
++        mpRecordedActions.swap( aThrowaway );
 +        mpDevice = NULL;
 +    }
 +
@@ -1269,94 +1528,7 @@
 +                // TODO(F1): handle non-integer case
 +            }
 +        }
-+#if 0
-+        if( mpDevice )
-+        {
-+            int pixmapAttribs[] = 
-+                { 
-+                    GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT,
-+                    GLX_TEXTURE_FORMAT_EXT, GLX_TEXTURE_FORMAT_RGB_EXT,
-+                    GLX_MIPMAP_TEXTURE_EXT, True,
-+                    None 
-+                };
 +
-+            uno::Reference< beans::XFastPropertySet > xPropSet( xBitmap, 
-+                                                                uno::UNO_QUERY );
-+            uno::Sequence< uno::Any > aBmpProps;
-+            if( (xPropSet->getFastPropertyValue(1) >>= aBmpProps) ) 
-+            {
-+                Pixmap aXPixmap(-1);
-+                aBmpProps[1] >>= aXPixmap;
-+                GLXPixmap aGlPixmap = glXCreatePixmap( mpDevice->getDisplay(), 
-+                                                       mpDevice->getFBConfig(), 
-+                                                       aXPixmap, 
-+                                                       pixmapAttribs );
-+                
-+                glDeleteTextures( 1, texID );
-+                glGenTextures( 1, texID );
-+                glBindTexture( GL_TEXTURE_2D, *texID );
-+                glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
-+                glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
-+
-+#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
-+                unx::PFNGLXBINDTEXIMAGEEXTPROC myglXBindTexImageEXT = (unx::PFNGLXBINDTEXIMAGEEXTPROC) unx::glXGetProcAddress( (const GLubyte*) "glXBindTexImageEXT" );
-+
-+                if( usePixmap ) {
-+                    if( mbGenerateMipmap )
-+                        glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, True);
-+                    myglXBindTexImageEXT (GLWin.dpy, pixmap, GLX_FRONT_LEFT_EXT, NULL);
-+                    if( mbGenerateMipmap && useMipmap ) {
-+                        OSL_TRACE("use mipmaps");
-+                        glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
-+                        glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR); //TRILINEAR FILTERING
-+                    } else {
-+                        glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
-+                        glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
-+                    }
-+                } else {
-+#endif
-+                    if( !pFormat )
-+                    {
-+                        // force-convert color to ARGB8888 int color space  
-+                        uno::Sequence<sal_Int8> tempBytes(
-+                            SlideBitmapLayout.ColorSpace->convertToIntegerColorSpace(
-+                                data,
-+                                canvas::tools::getStdColorSpace()));
-+                        gluBuild2DMipmaps(GL_TEXTURE_2D, 
-+                                          4, 
-+                                          SlideSize.Width, 
-+                                          SlideSize.Height, 
-+                                          GL_RGBA, 
-+                                          GL_UNSIGNED_BYTE,
-+                                          &tempBytes[0]);
-+                        glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
-+                        glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR); //TRILINEAR FILTERING
-+
-+                        //anistropic filtering (to make texturing not suck when looking at polygons from oblique angles)
-+                        GLfloat largest_supported_anisotropy;
-+                        glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &largest_supported_anisotropy);
-+                        glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy);
-+                    } else {
-+                        if( pTransition && !cbBrokenTexturesATI && !useMipmap) {
-+                            glTexImage2D( GL_TEXTURE_2D, 0, pFormat->nInternalFormat, SlideSize.Width, SlideSize.Height, 0, pFormat->eFormat, pFormat->eType, &data[0] );
-+                            glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
-+                            glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
-+                        } else {
-+                            gluBuild2DMipmaps( GL_TEXTURE_2D, pFormat->nInternalFormat, SlideSize.Width, SlideSize.Height, pFormat->eFormat, pFormat->eType, &data[0] );
-+                            glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
-+                            glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR ); //TRILINEAR FILTERING
-+
-+                            //anistropic filtering (to make texturing not suck when looking at polygons from oblique angles)
-+                            GLfloat largest_supported_anisotropy;
-+                            glGetFloatv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &largest_supported_anisotropy );
-+                            glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy );
-+                        }
-+                    }
-+#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
-+                }
-+#endif
-+        }
-+#endif
 +        // TODO(P1): Provide caching here.
 +        return uno::Reference< rendering::XCachedPrimitive >(NULL);
 +    }
@@ -1462,13 +1634,27 @@
 +    void CanvasHelper::flush() const
 +    {
 +    }
++
++    bool CanvasHelper::renderRecordedActions() const
++    {
++        std::vector<Action>::const_iterator aCurr(mpRecordedActions->begin());
++        const std::vector<Action>::const_iterator aEnd(mpRecordedActions->end());
++        while( aCurr != aEnd )
++            if( !aCurr->maFunction( *this,
++                                    aCurr->maTransform,
++                                    aCurr->meSrcBlendMode,
++                                    aCurr->meDstBlendMode,
++                                    aCurr->maARGBColor,
++                                    aCurr->maPolyPoly ) )
++                return false;
++    }
 +}
 diff --git canvas/source/opengl/ogl_canvashelper.hxx canvas/source/opengl/ogl_canvashelper.hxx
 new file mode 100644
-index 0000000..f66e7fe
+index 0000000..74efbc5
 --- /dev/null
 +++ canvas/source/opengl/ogl_canvashelper.hxx
-@@ -0,0 +1,208 @@
+@@ -0,0 +1,227 @@
 +/*************************************************************************
 + *
 + *    OpenOffice.org - a multi-platform office productivity suite
@@ -1492,18 +1678,21 @@
 +#include <basegfx/vector/b2isize.hxx>
 +#include <basegfx/vector/b2dsize.hxx>
 +
-+#include <boost/utility.hpp>
-+#include <boost/shared_ptr.hpp>
++#include <o3tl/cow_wrapper.hxx>
 +#include <vector>
 +
 +namespace oglcanvas
 +{
 +    /** Helper class for basic canvas functionality. */
-+    class CanvasHelper : private ::boost::noncopyable
++    class CanvasHelper
 +    {
 +    public:
 +        CanvasHelper();
 +
++        // outline because of incomplete type Action 
++        ~CanvasHelper();
++        CanvasHelper& operator=( const CanvasHelper& );
++
 +        /// Release all references
 +        void disposing();
 +
@@ -1660,8 +1849,18 @@
 +        */
 +        void modifying() {}
 +
++        /** Write out recorded actions
++         */
++        bool renderRecordedActions() const;
++
 +    private:
++        // declared, but not defined
++        CanvasHelper( const CanvasHelper& );
++
 +        struct Action;
++        typedef o3tl::cow_wrapper< std::vector<Action>,
++                                   o3tl::ThreadSafeRefCountingPolicy > RecordVectorT;
++
 +        void setupGraphicsState( Action&                                         o_action,
 +                                 const ::com::sun::star::rendering::ViewState&   viewState, 
 +                                 const ::com::sun::star::rendering::RenderState& renderState );
@@ -1672,17 +1871,23 @@
 +            potential circular references for spritecanvas.
 +         */
 +        ::com::sun::star::rendering::XGraphicDevice* mpDevice;
-+        ::boost::shared_ptr< std::vector<Action> >   mpRecordedActions; 
++
++        /** Ptr to array of recorded render calls
++
++            Gets shared copy-on-write, when this CanvasHelper is
++            copied (used e.g. for CanvasBitmap)
++         */
++        RecordVectorT                                mpRecordedActions;
 +    };
 +}
 +
 +#endif
 diff --git canvas/source/opengl/ogl_spritecanvas.cxx canvas/source/opengl/ogl_spritecanvas.cxx
 new file mode 100644
-index 0000000..e3036da
+index 0000000..55d0429
 --- /dev/null
 +++ canvas/source/opengl/ogl_spritecanvas.cxx
-@@ -0,0 +1,190 @@
+@@ -0,0 +1,204 @@
 +/*************************************************************************
 + *
 + *    OpenOffice.org - a multi-platform office productivity suite
@@ -1719,6 +1924,8 @@
 +#include <cppuhelper/implementationentry.hxx>
 +#include <comphelper/servicedecl.hxx>
 +
++#include "ogl_canvascustomsprite.hxx"
++
 +#include <GL/gl.h>
 +#include <GL/glext.h>
 +
@@ -1733,7 +1940,8 @@
 +    SpriteCanvas::SpriteCanvas( const uno::Sequence< uno::Any >&                aArguments,
 +                                const uno::Reference< uno::XComponentContext >& rxContext ) :
 +        maArguments(aArguments),
-+        mxComponentContext( rxContext )
++        mxComponentContext( rxContext ),
++        maActiveSprites()
 +    {
 +    }
 +
@@ -1820,15 +2028,16 @@
 +    }
 +
 +    uno::Reference< rendering::XCustomSprite > SAL_CALL SpriteCanvas::createCustomSprite( 
-+        const geometry::RealSize2D& /*spriteSize*/ ) throw (lang::IllegalArgumentException, 
-+                                                            uno::RuntimeException)
++        const geometry::RealSize2D& spriteSize ) throw (lang::IllegalArgumentException, 
++                                                        uno::RuntimeException)
 +    {
-+        return uno::Reference< rendering::XCustomSprite >();
++        return uno::Reference< rendering::XCustomSprite >( 
++            new CanvasCustomSprite(spriteSize, this) );
 +    }
 +
 +    uno::Reference< rendering::XSprite > SAL_CALL SpriteCanvas::createClonedSprite( 
-+        const uno::Reference< rendering::XSprite >& /*original*/ ) throw (lang::IllegalArgumentException, 
-+                                                                          uno::RuntimeException)
++        const uno::Reference< rendering::XSprite >& original ) throw (lang::IllegalArgumentException, 
++                                                                      uno::RuntimeException)
 +    {
 +        return uno::Reference< rendering::XSprite >();
 +    }
@@ -1856,6 +2065,16 @@
 +        return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SPRITECANVAS_SERVICE_NAME ) );
 +    }
 +
++    void SpriteCanvas::show( const uno::Reference< rendering::XSprite >& xSprite )
++    {
++        maActiveSprites.insert(xSprite);
++    }
++
++    void SpriteCanvas::hide( const uno::Reference< rendering::XSprite >& xSprite )
++    {
++        maActiveSprites.erase(xSprite);
++    }
++
 +    static uno::Reference<uno::XInterface> initCanvas( SpriteCanvas* pCanvas )
 +    {
 +        uno::Reference<uno::XInterface> xRet(static_cast<cppu::OWeakObject*>(pCanvas));
@@ -1875,10 +2094,10 @@
 +COMPHELPER_SERVICEDECL_EXPORTS1(oglcanvas::oglSpriteCanvasDecl);
 diff --git canvas/source/opengl/ogl_spritecanvas.hxx canvas/source/opengl/ogl_spritecanvas.hxx
 new file mode 100644
-index 0000000..2030cc4
+index 0000000..8ac8dca
 --- /dev/null
 +++ canvas/source/opengl/ogl_spritecanvas.hxx
-@@ -0,0 +1,117 @@
+@@ -0,0 +1,125 @@
 +/*************************************************************************
 + *
 + *    OpenOffice.org - a multi-platform office productivity suite
@@ -1919,6 +2138,8 @@
 +#include "ogl_spritedevicehelper.hxx"
 +#include "ogl_canvashelper.hxx"
 +
++#include <set>
++
 +
 +namespace oglcanvas
 +{
@@ -1987,9 +2208,15 @@
 +        // XServiceName
 +        virtual ::rtl::OUString SAL_CALL getServiceName(  ) throw (::com::sun::star::uno::RuntimeException);
 +
++        void show( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite >& );
++        void hide( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite >& );
++
 +    private:
-+        ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > maArguments;
++        ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >                maArguments;
 +        ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxComponentContext;
++        std::set< 
++            ::com::sun::star::uno::Reference<
++                ::com::sun::star::rendering::XSprite > >                             maActiveSprites;
 +    };
 +
 +    typedef ::rtl::Reference< SpriteCanvas > SpriteCanvasRef;
@@ -2332,10 +2559,10 @@
 +#endif
 diff --git canvas/source/opengl/ogl_textlayout.cxx canvas/source/opengl/ogl_textlayout.cxx
 new file mode 100644
-index 0000000..7ee4abe
+index 0000000..87d1a02
 --- /dev/null
 +++ canvas/source/opengl/ogl_textlayout.cxx
-@@ -0,0 +1,244 @@
+@@ -0,0 +1,222 @@
 +/*************************************************************************
 + *
 + *    OpenOffice.org - a multi-platform office productivity suite
@@ -2557,35 +2784,13 @@
 +
 +        return true;
 +    }
-+
-+
-+#define SERVICE_NAME "com.sun.star.rendering.TextLayout"
-+#define IMPLEMENTATION_NAME "DummyCanvas::TextLayout"
-+
-+    ::rtl::OUString SAL_CALL TextLayout::getImplementationName() throw( uno::RuntimeException )
-+    {
-+        return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) );
-+    }
-+
-+    sal_Bool SAL_CALL TextLayout::supportsService( const ::rtl::OUString& ServiceName ) throw( uno::RuntimeException )
-+    {
-+        return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SERVICE_NAME ) );
-+    }
-+
-+    uno::Sequence< ::rtl::OUString > SAL_CALL TextLayout::getSupportedServiceNames()  throw( uno::RuntimeException )
-+    {
-+        uno::Sequence< ::rtl::OUString > aRet(1);
-+        aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
-+        
-+        return aRet;
-+    }
 +}
 diff --git canvas/source/opengl/ogl_textlayout.hxx canvas/source/opengl/ogl_textlayout.hxx
 new file mode 100644
-index 0000000..3c63485
+index 0000000..f822a19
 --- /dev/null
 +++ canvas/source/opengl/ogl_textlayout.hxx
-@@ -0,0 +1,90 @@
+@@ -0,0 +1,83 @@
 +/*************************************************************************
 + *
 + *    OpenOffice.org - a multi-platform office productivity suite
@@ -2604,10 +2809,9 @@
 +#ifndef OGL_TEXTLAYOUT_HXX
 +#define OGL_TEXTLAYOUT_HXX
 +
-+#include <cppuhelper/compbase2.hxx>
++#include <cppuhelper/compbase1.hxx>
 +#include <comphelper/broadcasthelper.hxx>
 +
-+#include <com/sun/star/lang/XServiceInfo.hpp>
 +#include <com/sun/star/rendering/XTextLayout.hpp>
 +
 +#include <basegfx/vector/b2isize.hxx>
@@ -2621,8 +2825,7 @@
 +
 +namespace oglcanvas
 +{
-+    typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::rendering::XTextLayout,
-+                         					  ::com::sun::star::lang::XServiceInfo > TextLayoutBaseT;
++    typedef ::cppu::WeakComponentImplHelper1< ::com::sun::star::rendering::XTextLayout > TextLayoutBaseT;
 +
 +    class TextLayout : public ::comphelper::OBaseMutex, 
 +                       public TextLayoutBaseT,
@@ -2656,11 +2859,6 @@
 +        virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > SAL_CALL getFont(  ) throw (::com::sun::star::uno::RuntimeException);
 +        virtual ::com::sun::star::rendering::StringContext SAL_CALL getText(  ) throw (::com::sun::star::uno::RuntimeException);
 +        
-+        // XServiceInfo
-+        virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
-+        virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
-+        virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()  throw( ::com::sun::star::uno::RuntimeException );
-+
 +        bool draw( const ::com::sun::star::rendering::ViewState&         rViewState, 
 +				   const ::com::sun::star::rendering::RenderState&       rRenderState,
 +				   const ::com::sun::star::uno::Reference< 
@@ -2677,7 +2875,7 @@
 +
 +#endif
 diff --git offapi/com/sun/star/rendering/XSpriteCanvas.idl offapi/com/sun/star/rendering/XSpriteCanvas.idl
-index b3717b2..b658d06 100644
+index b3717b2..85a3ca8 100644
 --- offapi/com/sun/star/rendering/XSpriteCanvas.idl
 +++ offapi/com/sun/star/rendering/XSpriteCanvas.idl
 @@ -33,7 +33,7 @@
@@ -2710,3 +2908,15 @@
  {
  	/** Create a sprite object from the specified animation
  		sequence. A sprite is a back-buffered object with its own,
+@@ -117,9 +117,8 @@ interface XSpriteCanvas : XBitmapCanvas
+         object.
+ 
+         The cloned sprite always shows the same content as its
+-        original. Furthermore, cloned copies of a hidden original are
+-        never visible, although cloned copies of a visible original
+-        can of course be invisible.
++        original, but of course the sprite position, visibility, alpha
++        etc. can be modified independently.
+ 
+         @param original
+         The original sprite to copy the content from. This sprite must



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]