1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef INCLUDED_CANVAS_SOURCE_OPENGL_OGL_CANVASBITMAP_HXX
11 #define INCLUDED_CANVAS_SOURCE_OPENGL_OGL_CANVASBITMAP_HXX
13 #include <cppuhelper/compbase2.hxx>
15 #include <com/sun/star/rendering/XBitmapCanvas.hpp>
16 #include <com/sun/star/rendering/XIntegerBitmap.hpp>
18 #include <canvas/base/integerbitmapbase.hxx>
19 #include <canvas/base/basemutexhelper.hxx>
20 #include <basegfx/vector/b2isize.hxx>
22 #include <boost/shared_ptr.hpp>
24 #include "ogl_bitmapcanvashelper.hxx"
25 #include "ogl_spritecanvas.hxx"
28 /* Definition of CanvasBitmap class */
32 typedef ::cppu::WeakComponentImplHelper2
< ::com::sun::star::rendering::XBitmapCanvas
,
33 ::com::sun::star::rendering::XIntegerBitmap
> CanvasBitmapBase_Base
;
34 typedef ::canvas::IntegerBitmapBase
<
35 canvas::BitmapCanvasBase2
<
36 ::canvas::BaseMutexHelper
< CanvasBitmapBase_Base
>,
39 ::cppu::OWeakObject
> > CanvasBitmapBaseT
;
41 class CanvasBitmap
: public CanvasBitmapBaseT
44 /** Create a canvas bitmap for the given surface
50 Reference device, with which bitmap should be compatible
52 CanvasBitmap( const ::com::sun::star::geometry::IntegerSize2D
& rSize
,
53 const SpriteCanvasRef
& rDevice
,
54 SpriteDeviceHelper
& rDeviceHelper
,
57 /** Create verbatim copy (including all recorded actions)
59 CanvasBitmap( const CanvasBitmap
& rSrc
);
61 /// Dispose all internal references
62 virtual void disposeThis() SAL_OVERRIDE
;
64 /** Write out recorded actions
66 bool renderRecordedActions() const;
69 /** MUST hold here, too, since CanvasHelper only contains a
70 raw pointer (without refcounting)
72 SpriteCanvasRef mpDevice
;
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */