diff options
-rw-r--r-- | basebmp/inc/scaleimage.hxx | 22 | ||||
-rw-r--r-- | basebmp/source/bitmapdevice.cxx | 8 | ||||
-rw-r--r-- | include/basebmp/bitmapdevice.hxx | 3 |
3 files changed, 6 insertions, 27 deletions
diff --git a/basebmp/inc/scaleimage.hxx b/basebmp/inc/scaleimage.hxx index 69beaf696243..f3975e9e835e 100644 --- a/basebmp/inc/scaleimage.hxx +++ b/basebmp/inc/scaleimage.hxx @@ -104,10 +104,6 @@ void scaleLine( SourceIter s_begin, @param d_acc Destination accessor - - @param bMustCopy - When true, scaleImage always copies source, even when doing 1:1 - copy */ template< class SourceIter, class SourceAcc, class DestIter, class DestAcc > @@ -116,8 +112,7 @@ void scaleImage( SourceIter s_begin, SourceAcc s_acc, DestIter d_begin, DestIter d_end, - DestAcc d_acc, - bool bMustCopy=false ) + DestAcc d_acc ) { const int src_width ( s_end.x - s_begin.x ); const int src_height( s_end.y - s_begin.y ); @@ -125,9 +120,8 @@ void scaleImage( SourceIter s_begin, const int dest_width ( d_end.x - d_begin.x ); const int dest_height( d_end.y - d_begin.y ); - if( !bMustCopy && - src_width == dest_width && - src_height == dest_height ) + if ( src_width == dest_width && + src_height == dest_height ) { // no scaling involved, can simply copy vigra::copyImage( s_begin, s_end, s_acc, @@ -166,20 +160,14 @@ void scaleImage( SourceIter s_begin, } /** Scale an image, range tuple version - - @param bMustCopy - When true, scaleImage always copies source, even when doing 1:1 - copy */ template< class SourceIter, class SourceAcc, class DestIter, class DestAcc > inline void scaleImage( vigra::triple<SourceIter,SourceIter,SourceAcc> const& src, - vigra::triple<DestIter,DestIter,DestAcc> const& dst, - bool bMustCopy=false ) + vigra::triple<DestIter,DestIter,DestAcc> const& dst ) { scaleImage(src.first,src.second,src.third, - dst.first,dst.second,dst.third, - bMustCopy); + dst.first,dst.second,dst.third); } } diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx index 1e582e7812d4..c0afe86d5f96 100644 --- a/basebmp/source/bitmapdevice.cxx +++ b/basebmp/source/bitmapdevice.cxx @@ -248,8 +248,7 @@ namespace aRect), destIterRange(begin, acc, - aRect), - isSharedBuffer(rSrcBitmap) ); + aRect)); } template< typename Iterator, typename Acc > static @@ -425,11 +424,6 @@ PaletteMemorySharedVector BitmapDevice::getPalette() const return mpImpl->mpPalette; } -bool BitmapDevice::isSharedBuffer( const BitmapDeviceSharedPtr& rOther ) const -{ - return rOther.get()->getBuffer().get() == getBuffer().get(); -} - Color BitmapDevice::getPixel( const basegfx::B2IPoint& rPt ) { if( mpImpl->maBounds.isInside(rPt) ) diff --git a/include/basebmp/bitmapdevice.hxx b/include/basebmp/bitmapdevice.hxx index 5f2756c9d17d..85dc153a4576 100644 --- a/include/basebmp/bitmapdevice.hxx +++ b/include/basebmp/bitmapdevice.hxx @@ -100,9 +100,6 @@ public: */ PaletteMemorySharedVector getPalette() const; - /// Check if this and the other BitmapDevice share a buffer - bool isSharedBuffer( const BitmapDeviceSharedPtr& rOther ) const; - /** Get color value at given pixel */ Color getPixel( const basegfx::B2IPoint& rPt ); |