summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-11-18 22:28:19 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-11-20 12:24:51 +0100
commite24bd9abb27801ea8e6d2d275aa23060ae798012 (patch)
tree8c395be13ca067c3bf427c8e0f4bef309882073d /vcl
parent47bc38926f18c9cfa93722e98ab29ce69658c9b8 (diff)
Bitmap::Crop: When the rectangle is entire bitmap, do nothing
It is expensive to rewrite the whole bitmap with the same content. Change-Id: I001210840d535ac54837fff092c90835f9f2f547
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/bitmap.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index ccd914d5b924..c034b2724094 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -784,7 +784,7 @@ bool Bitmap::Crop( const Rectangle& rRectPixel )
aRect.Intersection( Rectangle( Point(), aSizePix ) );
- if( !aRect.IsEmpty() )
+ if( !aRect.IsEmpty() && aSizePix != aRect.GetSize())
{
BitmapReadAccess* pReadAcc = AcquireReadAccess();