initial cut at damage tracking support

This commit is contained in:
Michael Meeks
2011-07-12 13:22:10 +01:00
parent 22f299b12e
commit a206e2afb0
2 changed files with 117 additions and 34 deletions

View File

@@ -60,6 +60,11 @@ typedef boost::shared_ptr< const std::vector<Color> > PaletteMemorySharedVecto
struct ImplBitmapDevice; struct ImplBitmapDevice;
class BitmapDeviceDamageTracker {
public:
virtual void damaged (const basegfx::B2IRange& rDamageRect) = 0;
};
/** Definition of BitmapDevice interface /** Definition of BitmapDevice interface
Use the createBitmapDevice() factory method to create instances. Use the createBitmapDevice() factory method to create instances.
@@ -108,6 +113,8 @@ public:
*/ */
RawMemorySharedArray getBuffer() const; RawMemorySharedArray getBuffer() const;
BitmapDeviceDamageTracker *getDamageTracker() const;
/** Get pointer to palette /** Get pointer to palette
The returned pointer is const on purpose, since the The returned pointer is const on purpose, since the
@@ -541,7 +548,8 @@ protected:
sal_Int32 nScanlineStride, sal_Int32 nScanlineStride,
sal_uInt8* pFirstScanline, sal_uInt8* pFirstScanline,
const RawMemorySharedArray& rMem, const RawMemorySharedArray& rMem,
const PaletteMemorySharedVector& rPalette ); const PaletteMemorySharedVector& rPalette,
BitmapDeviceDamageTracker* pDamage = NULL );
virtual ~BitmapDevice(); virtual ~BitmapDevice();
@@ -641,7 +649,8 @@ private:
*/ */
BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize, BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize,
bool bTopDown, bool bTopDown,
sal_Int32 nScanlineFormat ); sal_Int32 nScanlineFormat,
BitmapDeviceDamageTracker* pDamage = NULL );
/** Factory method to create a BitmapDevice for given scanline format /** Factory method to create a BitmapDevice for given scanline format
with the given palette with the given palette

View File

@@ -273,6 +273,7 @@ namespace
dest_iterator_type maBegin; dest_iterator_type maBegin;
typename accessor_traits::color_lookup maColorLookup; typename accessor_traits::color_lookup maColorLookup;
BitmapDeviceDamageTracker *mpDamage;
to_uint32_functor maToUInt32Converter; to_uint32_functor maToUInt32Converter;
dest_accessor_type maAccessor; dest_accessor_type maAccessor;
colorblend_accessor_type maColorBlendAccessor; colorblend_accessor_type maColorBlendAccessor;
@@ -288,6 +289,7 @@ namespace
raw_maskedxor_accessor_type maRawMaskedXorAccessor; raw_maskedxor_accessor_type maRawMaskedXorAccessor;
raw_maskedmask_accessor_type maRawMaskedMaskAccessor; raw_maskedmask_accessor_type maRawMaskedMaskAccessor;
// ------------------------------------------------------- // -------------------------------------------------------
BitmapRenderer( const basegfx::B2IRange& rBounds, BitmapRenderer( const basegfx::B2IRange& rBounds,
@@ -298,11 +300,14 @@ namespace
raw_accessor_type rawAccessor, raw_accessor_type rawAccessor,
dest_accessor_type accessor, dest_accessor_type accessor,
const RawMemorySharedArray& rMem, const RawMemorySharedArray& rMem,
const PaletteMemorySharedVector& rPalette ) : const PaletteMemorySharedVector& rPalette,
BitmapDeviceDamageTracker* pDamage ) :
BitmapDevice( rBounds, nScanlineFormat, BitmapDevice( rBounds, nScanlineFormat,
nScanlineStride, pFirstScanline, rMem, rPalette ), nScanlineStride, pFirstScanline, rMem, rPalette,
pDamage ),
maBegin( begin ), maBegin( begin ),
maColorLookup(), maColorLookup(),
mpDamage( pDamage ),
maToUInt32Converter(), maToUInt32Converter(),
maAccessor( accessor ), maAccessor( accessor ),
maColorBlendAccessor( accessor ), maColorBlendAccessor( accessor ),
@@ -320,6 +325,32 @@ namespace
{} {}
private: private:
void damaged( const basegfx::B2IRange& rDamageRect ) const
{
if( mpDamage )
mpDamage->damaged( rDamageRect );
}
void damagedPointSize( const basegfx::B2IPoint& rPoint,
const basegfx::B2IRange& rSize ) const
{
if( mpDamage ) {
basegfx::B2IPoint aLower( rPoint.getX() + rSize.getWidth(),
rPoint.getY() + rSize.getHeight() );
damaged( basegfx::B2IRange( rPoint, aLower ) );
}
}
void damagedPixel( const basegfx::B2IPoint& rDamagePoint ) const
{
if( !mpDamage )
return;
basegfx::B2IPoint aEnd( rDamagePoint.getX() + 1,
rDamagePoint.getY() + 1 );
damaged( basegfx::B2IRange( rDamagePoint, aEnd ) );
}
boost::shared_ptr<BitmapRenderer> getCompatibleBitmap( const BitmapDeviceSharedPtr& bmp ) const boost::shared_ptr<BitmapRenderer> getCompatibleBitmap( const BitmapDeviceSharedPtr& bmp ) const
{ {
return boost::dynamic_pointer_cast< BitmapRenderer >( bmp ); return boost::dynamic_pointer_cast< BitmapRenderer >( bmp );
@@ -373,6 +404,7 @@ namespace
maColorLookup( maColorLookup(
maAccessor, maAccessor,
fillColor) ); fillColor) );
damaged( rBounds );
} }
virtual void setPixel_i( const basegfx::B2IPoint& rPt, virtual void setPixel_i( const basegfx::B2IPoint& rPt,
@@ -388,6 +420,7 @@ namespace
else else
maAccessor.set( pixelColor, maAccessor.set( pixelColor,
pixel ); pixel );
damagedPixel(rPt);
} }
virtual void setPixel_i( const basegfx::B2IPoint& rPt, virtual void setPixel_i( const basegfx::B2IPoint& rPt,
@@ -411,6 +444,7 @@ namespace
else else
maMaskedAccessor.set( pixelColor, maMaskedAccessor.set( pixelColor,
aIter ); aIter );
damagedPixel(rPt);
} }
virtual Color getPixel_i(const basegfx::B2IPoint& rPt ) virtual Color getPixel_i(const basegfx::B2IPoint& rPt )
@@ -443,6 +477,9 @@ namespace
col, col,
begin, begin,
rawAcc ); rawAcc );
// FIXME: perhaps this needs pushing up the stack a bit
// to make more complex polygons more efficient ...
damaged( basegfx::B2IRange( rPt1, rPt2 ) );
} }
template< typename Iterator, typename Accessor, typename RawAcc > template< typename Iterator, typename Accessor, typename RawAcc >
@@ -593,6 +630,12 @@ namespace
rBounds, rBounds,
aPoly, aPoly,
basegfx::FillRule_EVEN_ODD ); basegfx::FillRule_EVEN_ODD );
if( mpDamage )
{
basegfx::B2DRange const aPolyBounds( basegfx::tools::getRange(aPoly) );
damaged( basegfx::fround( aPolyBounds ) );
}
} }
virtual void fillPolyPolygon_i(const basegfx::B2DPolyPolygon& rPoly, virtual void fillPolyPolygon_i(const basegfx::B2DPolyPolygon& rPoly,
@@ -648,6 +691,7 @@ namespace
acc, acc,
rDstRect), rDstRect),
rSrcBitmap.get() == this ); rSrcBitmap.get() == this );
damaged( rDstRect );
} }
template< typename Iterator, typename Acc > template< typename Iterator, typename Acc >
@@ -666,6 +710,7 @@ namespace
destIterRange(begin, destIterRange(begin,
acc, acc,
rDstRect)); rDstRect));
damaged( rDstRect );
} }
virtual void drawBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap, virtual void drawBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap,
@@ -695,6 +740,7 @@ namespace
maBegin, maBegin,
maAccessor); maAccessor);
} }
damaged( rDstRect );
} }
virtual void drawBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap, virtual void drawBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap,
@@ -725,6 +771,7 @@ namespace
getMaskedIter(rClip), getMaskedIter(rClip),
maMaskedAccessor); maMaskedAccessor);
} }
damaged( rDstRect );
} }
virtual void drawMaskedColor_i(Color aSrcColor, virtual void drawMaskedColor_i(Color aSrcColor,
@@ -773,6 +820,7 @@ namespace
maGenericColorBlendAccessor, maGenericColorBlendAccessor,
rDstPoint) ); rDstPoint) );
} }
damagedPointSize( rDstPoint, rSrcRect );
} }
virtual void drawMaskedColor_i(Color aSrcColor, virtual void drawMaskedColor_i(Color aSrcColor,
@@ -835,6 +883,7 @@ namespace
maGenericMaskedColorBlendAccessor, maGenericMaskedColorBlendAccessor,
rDstPoint) ); rDstPoint) );
} }
damagedPointSize( rDstPoint, rSrcRect );
} }
template< typename Iterator, typename Acc > template< typename Iterator, typename Acc >
@@ -865,6 +914,7 @@ namespace
FastMask >::type(acc), FastMask >::type(acc),
rDstRect), rDstRect),
rSrcBitmap.get() == this); rSrcBitmap.get() == this);
damaged( rDstRect );
} }
template< typename Iterator, typename Acc > template< typename Iterator, typename Acc >
@@ -898,6 +948,7 @@ namespace
Masks::clipmask_polarity, Masks::clipmask_polarity,
NoFastMask >::type(acc), NoFastMask >::type(acc),
rDstRect)); rDstRect));
damaged( rDstRect );
} }
virtual void drawMaskedBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap, virtual void drawMaskedBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap,
@@ -933,6 +984,7 @@ namespace
maBegin, maBegin,
maAccessor); maAccessor);
} }
damaged( rDstRect );
} }
virtual void drawMaskedBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap, virtual void drawMaskedBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap,
@@ -969,6 +1021,7 @@ namespace
getMaskedIter(rClip), getMaskedIter(rClip),
maMaskedAccessor); maMaskedAccessor);
} }
damaged( rDstRect );
} }
}; };
} // namespace } // namespace
@@ -981,6 +1034,8 @@ struct ImplBitmapDevice
*/ */
RawMemorySharedArray mpMem; RawMemorySharedArray mpMem;
BitmapDeviceDamageTracker *mpDamage;
/// Palette memory plus deleter (might be NULL) /// Palette memory plus deleter (might be NULL)
PaletteMemorySharedVector mpPalette; PaletteMemorySharedVector mpPalette;
@@ -1037,10 +1092,12 @@ BitmapDevice::BitmapDevice( const basegfx::B2IRange& rBounds,
sal_Int32 nScanlineStride, sal_Int32 nScanlineStride,
sal_uInt8* pFirstScanline, sal_uInt8* pFirstScanline,
const RawMemorySharedArray& rMem, const RawMemorySharedArray& rMem,
const PaletteMemorySharedVector& rPalette ) : const PaletteMemorySharedVector& rPalette,
BitmapDeviceDamageTracker* pDamage ) :
mpImpl( new ImplBitmapDevice ) mpImpl( new ImplBitmapDevice )
{ {
mpImpl->mpMem = rMem; mpImpl->mpMem = rMem;
mpImpl->mpDamage = pDamage;
mpImpl->mpPalette = rPalette; mpImpl->mpPalette = rPalette;
mpImpl->maBounds = rBounds; mpImpl->maBounds = rBounds;
mpImpl->maLineClipRect = basegfx::B2IRange( rBounds.getMinX(), mpImpl->maLineClipRect = basegfx::B2IRange( rBounds.getMinX(),
@@ -1059,7 +1116,6 @@ BitmapDevice::~BitmapDevice()
basegfx::B2IVector BitmapDevice::getSize() const basegfx::B2IVector BitmapDevice::getSize() const
{ {
return basegfx::B2IVector( return basegfx::B2IVector(
mpImpl->maBounds.getMaxX() - mpImpl->maBounds.getMinX(), mpImpl->maBounds.getMaxX() - mpImpl->maBounds.getMinX(),
mpImpl->maBounds.getMaxY() - mpImpl->maBounds.getMinY() ); mpImpl->maBounds.getMaxY() - mpImpl->maBounds.getMinY() );
@@ -1091,6 +1147,11 @@ PaletteMemorySharedVector BitmapDevice::getPalette() const
return mpImpl->mpPalette; return mpImpl->mpPalette;
} }
BitmapDeviceDamageTracker *BitmapDevice::getDamageTracker() const
{
return mpImpl->mpDamage;
}
sal_Int32 BitmapDevice::getPaletteEntryCount() const sal_Int32 BitmapDevice::getPaletteEntryCount() const
{ {
return mpImpl->mpPalette ? mpImpl->mpPalette->size() : 0; return mpImpl->mpPalette ? mpImpl->mpPalette->size() : 0;
@@ -1641,8 +1702,8 @@ BitmapDeviceSharedPtr createRenderer(
typename FormatTraits::accessor_selector::template wrap_accessor< typename FormatTraits::accessor_selector::template wrap_accessor<
typename FormatTraits::raw_accessor_type>::type const& rAccessor, typename FormatTraits::raw_accessor_type>::type const& rAccessor,
boost::shared_array< sal_uInt8 > pMem, boost::shared_array< sal_uInt8 > pMem,
const PaletteMemorySharedVector& pPal ) const PaletteMemorySharedVector& pPal,
BitmapDeviceDamageTracker* pDamage )
#else #else
template< class FormatTraits, class MaskTraits, class Accessor > template< class FormatTraits, class MaskTraits, class Accessor >
@@ -1654,7 +1715,8 @@ BitmapDeviceSharedPtr createRenderer(
typename FormatTraits::raw_accessor_type const& rRawAccessor, typename FormatTraits::raw_accessor_type const& rRawAccessor,
Accessor const& rAccessor, Accessor const& rAccessor,
boost::shared_array< sal_uInt8 > pMem, boost::shared_array< sal_uInt8 > pMem,
const PaletteMemorySharedVector& pPal ) const PaletteMemorySharedVector& pPal,
BitmapDeviceDamageTracker* pDamage )
#endif #endif
{ {
@@ -1676,7 +1738,8 @@ BitmapDeviceSharedPtr createRenderer(
rRawAccessor, rRawAccessor,
rAccessor, rAccessor,
pMem, pMem,
pPal )); pPal,
pDamage ));
} }
/// Create standard grey level palette /// Create standard grey level palette
@@ -1707,7 +1770,8 @@ BitmapDeviceSharedPtr createRenderer(
sal_Int32 nScanlineStride, sal_Int32 nScanlineStride,
sal_uInt8* pFirstScanline, sal_uInt8* pFirstScanline,
boost::shared_array< sal_uInt8 > pMem, boost::shared_array< sal_uInt8 > pMem,
const PaletteMemorySharedVector& pPal ) const PaletteMemorySharedVector& pPal,
BitmapDeviceDamageTracker* pDamage )
{ {
return createRenderer<FormatTraits, return createRenderer<FormatTraits,
MaskTraits>(rBounds, MaskTraits>(rBounds,
@@ -1719,7 +1783,8 @@ BitmapDeviceSharedPtr createRenderer(
wrap_accessor< wrap_accessor<
typename FormatTraits::raw_accessor_type>::type(), typename FormatTraits::raw_accessor_type>::type(),
pMem, pMem,
pPal); pPal,
pDamage);
} }
template< class FormatTraits, class MaskTraits > template< class FormatTraits, class MaskTraits >
@@ -1730,7 +1795,8 @@ BitmapDeviceSharedPtr createRenderer(
sal_uInt8* pFirstScanline, sal_uInt8* pFirstScanline,
boost::shared_array< sal_uInt8 > pMem, boost::shared_array< sal_uInt8 > pMem,
PaletteMemorySharedVector pPal, PaletteMemorySharedVector pPal,
int nBitsPerPixel ) int nBitsPerPixel,
BitmapDeviceDamageTracker* pDamage )
{ {
pPal = createStandardPalette(pPal, pPal = createStandardPalette(pPal,
1UL << nBitsPerPixel); 1UL << nBitsPerPixel);
@@ -1748,7 +1814,8 @@ BitmapDeviceSharedPtr createRenderer(
&pPal->at(0), &pPal->at(0),
pPal->size()), pPal->size()),
pMem, pMem,
pPal); pPal,
pDamage);
} }
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@@ -1784,7 +1851,8 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
sal_Int32 nScanlineFormat, sal_Int32 nScanlineFormat,
boost::shared_array< sal_uInt8 > pMem, boost::shared_array< sal_uInt8 > pMem,
PaletteMemorySharedVector pPal, PaletteMemorySharedVector pPal,
const basegfx::B2IRange* pSubset ) const basegfx::B2IRange* pSubset,
BitmapDeviceDamageTracker* pDamage )
{ {
if( nScanlineFormat <= Format::NONE || if( nScanlineFormat <= Format::NONE ||
nScanlineFormat > Format::MAX ) nScanlineFormat > Format::MAX )
@@ -1852,24 +1920,24 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
case Format::ONE_BIT_MSB_GREY: case Format::ONE_BIT_MSB_GREY:
return createRenderer<PixelFormatTraits_GREY1_MSB,StdMasks>( return createRenderer<PixelFormatTraits_GREY1_MSB,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal ); pFirstScanline, pMem, pPal, pDamage );
case Format::ONE_BIT_LSB_GREY: case Format::ONE_BIT_LSB_GREY:
return createRenderer<PixelFormatTraits_GREY1_LSB,StdMasks>( return createRenderer<PixelFormatTraits_GREY1_LSB,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal ); pFirstScanline, pMem, pPal, pDamage );
case Format::ONE_BIT_MSB_PAL: case Format::ONE_BIT_MSB_PAL:
return createRenderer<PixelFormatTraits_PAL1_MSB,StdMasks>( return createRenderer<PixelFormatTraits_PAL1_MSB,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal, pFirstScanline, pMem, pPal,
bitsPerPixel[nScanlineFormat] ); bitsPerPixel[nScanlineFormat], pDamage );
case Format::ONE_BIT_LSB_PAL: case Format::ONE_BIT_LSB_PAL:
return createRenderer<PixelFormatTraits_PAL1_LSB,StdMasks>( return createRenderer<PixelFormatTraits_PAL1_LSB,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal, pFirstScanline, pMem, pPal,
bitsPerPixel[nScanlineFormat] ); bitsPerPixel[nScanlineFormat], pDamage );
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
@@ -1878,24 +1946,24 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
case Format::FOUR_BIT_MSB_GREY: case Format::FOUR_BIT_MSB_GREY:
return createRenderer<PixelFormatTraits_GREY4_MSB,StdMasks>( return createRenderer<PixelFormatTraits_GREY4_MSB,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal ); pFirstScanline, pMem, pPal, pDamage );
case Format::FOUR_BIT_LSB_GREY: case Format::FOUR_BIT_LSB_GREY:
return createRenderer<PixelFormatTraits_GREY4_LSB,StdMasks>( return createRenderer<PixelFormatTraits_GREY4_LSB,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal ); pFirstScanline, pMem, pPal, pDamage );
case Format::FOUR_BIT_MSB_PAL: case Format::FOUR_BIT_MSB_PAL:
return createRenderer<PixelFormatTraits_PAL4_MSB,StdMasks>( return createRenderer<PixelFormatTraits_PAL4_MSB,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal, pFirstScanline, pMem, pPal,
bitsPerPixel[nScanlineFormat] ); bitsPerPixel[nScanlineFormat], pDamage );
case Format::FOUR_BIT_LSB_PAL: case Format::FOUR_BIT_LSB_PAL:
return createRenderer<PixelFormatTraits_PAL4_LSB,StdMasks>( return createRenderer<PixelFormatTraits_PAL4_LSB,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal, pFirstScanline, pMem, pPal,
bitsPerPixel[nScanlineFormat] ); bitsPerPixel[nScanlineFormat], pDamage );
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
@@ -1904,13 +1972,13 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
case Format::EIGHT_BIT_GREY: case Format::EIGHT_BIT_GREY:
return createRenderer<PixelFormatTraits_GREY8,StdMasks>( return createRenderer<PixelFormatTraits_GREY8,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal ); pFirstScanline, pMem, pPal, pDamage );
case Format::EIGHT_BIT_PAL: case Format::EIGHT_BIT_PAL:
return createRenderer<PixelFormatTraits_PAL8,StdMasks>( return createRenderer<PixelFormatTraits_PAL8,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal, pFirstScanline, pMem, pPal,
bitsPerPixel[nScanlineFormat] ); bitsPerPixel[nScanlineFormat], pDamage );
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
@@ -1919,12 +1987,12 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
case Format::SIXTEEN_BIT_LSB_TC_MASK: case Format::SIXTEEN_BIT_LSB_TC_MASK:
return createRenderer<PixelFormatTraits_RGB16_565_LSB,StdMasks>( return createRenderer<PixelFormatTraits_RGB16_565_LSB,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal ); pFirstScanline, pMem, pPal, pDamage );
case Format::SIXTEEN_BIT_MSB_TC_MASK: case Format::SIXTEEN_BIT_MSB_TC_MASK:
return createRenderer<PixelFormatTraits_RGB16_565_MSB,StdMasks>( return createRenderer<PixelFormatTraits_RGB16_565_MSB,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal ); pFirstScanline, pMem, pPal, pDamage );
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
@@ -1932,7 +2000,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
case Format::TWENTYFOUR_BIT_TC_MASK: case Format::TWENTYFOUR_BIT_TC_MASK:
return createRenderer<PixelFormatTraits_BGR24,StdMasks>( return createRenderer<PixelFormatTraits_BGR24,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal ); pFirstScanline, pMem, pPal, pDamage );
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
@@ -1941,12 +2009,12 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
case Format::THIRTYTWO_BIT_TC_MASK: case Format::THIRTYTWO_BIT_TC_MASK:
return createRenderer<PixelFormatTraits_RGB32_888,StdMasks>( return createRenderer<PixelFormatTraits_RGB32_888,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal ); pFirstScanline, pMem, pPal, pDamage );
case Format::THIRTYTWO_BIT_TC_MASK_ARGB: case Format::THIRTYTWO_BIT_TC_MASK_ARGB:
return createRenderer<PixelFormatTraits_BGR32_888,StdMasks>( return createRenderer<PixelFormatTraits_BGR32_888,StdMasks>(
aBounds, nScanlineFormat, nScanlineStride, aBounds, nScanlineFormat, nScanlineStride,
pFirstScanline, pMem, pPal ); pFirstScanline, pMem, pPal, pDamage );
} }
// TODO(F3): other formats not yet implemented // TODO(F3): other formats not yet implemented
@@ -1957,14 +2025,16 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& r
BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize, BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize,
bool bTopDown, bool bTopDown,
sal_Int32 nScanlineFormat ) sal_Int32 nScanlineFormat,
BitmapDeviceDamageTracker* pDamage )
{ {
return createBitmapDeviceImpl( rSize, return createBitmapDeviceImpl( rSize,
bTopDown, bTopDown,
nScanlineFormat, nScanlineFormat,
boost::shared_array< sal_uInt8 >(), boost::shared_array< sal_uInt8 >(),
PaletteMemorySharedVector(), PaletteMemorySharedVector(),
NULL ); NULL,
pDamage );
} }
BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize, BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize,
@@ -1977,6 +2047,7 @@ BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize
nScanlineFormat, nScanlineFormat,
boost::shared_array< sal_uInt8 >(), boost::shared_array< sal_uInt8 >(),
rPalette, rPalette,
NULL,
NULL ); NULL );
} }
@@ -1991,6 +2062,7 @@ BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize
nScanlineFormat, nScanlineFormat,
rMem, rMem,
rPalette, rPalette,
NULL,
NULL ); NULL );
} }
@@ -2002,7 +2074,8 @@ BitmapDeviceSharedPtr subsetBitmapDevice( const BitmapDeviceSharedPtr& rProt
rProto->getScanlineFormat(), rProto->getScanlineFormat(),
rProto->getBuffer(), rProto->getBuffer(),
rProto->getPalette(), rProto->getPalette(),
&rSubset ); &rSubset,
rProto->getDamageTracker() );
} }
BitmapDeviceSharedPtr cloneBitmapDevice( const basegfx::B2IVector& rSize, BitmapDeviceSharedPtr cloneBitmapDevice( const basegfx::B2IVector& rSize,
@@ -2013,7 +2086,8 @@ BitmapDeviceSharedPtr cloneBitmapDevice( const basegfx::B2IVector& rSize,
rProto->getScanlineFormat(), rProto->getScanlineFormat(),
boost::shared_array< sal_uInt8 >(), boost::shared_array< sal_uInt8 >(),
rProto->getPalette(), rProto->getPalette(),
NULL ); NULL,
rProto->getDamageTracker() );
} }
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------