From a206e2afb0c4edcaacce9d42b3b15350ec8c25dc Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 12 Jul 2011 13:22:10 +0100 Subject: initial cut at damage tracking support --- basebmp/inc/basebmp/bitmapdevice.hxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'basebmp/inc') diff --git a/basebmp/inc/basebmp/bitmapdevice.hxx b/basebmp/inc/basebmp/bitmapdevice.hxx index e026f3165fbb..5a5436432169 100644 --- a/basebmp/inc/basebmp/bitmapdevice.hxx +++ b/basebmp/inc/basebmp/bitmapdevice.hxx @@ -60,6 +60,11 @@ typedef boost::shared_ptr< const std::vector > PaletteMemorySharedVecto struct ImplBitmapDevice; +class BitmapDeviceDamageTracker { + public: + virtual void damaged (const basegfx::B2IRange& rDamageRect) = 0; +}; + /** Definition of BitmapDevice interface Use the createBitmapDevice() factory method to create instances. @@ -108,6 +113,8 @@ public: */ RawMemorySharedArray getBuffer() const; + BitmapDeviceDamageTracker *getDamageTracker() const; + /** Get pointer to palette The returned pointer is const on purpose, since the @@ -541,7 +548,8 @@ protected: sal_Int32 nScanlineStride, sal_uInt8* pFirstScanline, const RawMemorySharedArray& rMem, - const PaletteMemorySharedVector& rPalette ); + const PaletteMemorySharedVector& rPalette, + BitmapDeviceDamageTracker* pDamage = NULL ); virtual ~BitmapDevice(); @@ -641,7 +649,8 @@ private: */ BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize, bool bTopDown, - sal_Int32 nScanlineFormat ); + sal_Int32 nScanlineFormat, + BitmapDeviceDamageTracker* pDamage = NULL ); /** Factory method to create a BitmapDevice for given scanline format with the given palette -- cgit