diff options
author | David Tardon <dtardon@redhat.com> | 2011-05-17 10:03:46 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-05-18 06:06:35 +0200 |
commit | 87fbe86b7140a77cc6e38f063b08af9213078ca3 (patch) | |
tree | cc3dec63d481f9774ec1d7089a4c8c828c44a53f /vcl/test | |
parent | eaea49187f4ea29bba32042ef8aeced45304773b (diff) |
generalize ScopedBitmapAccess and simplify usage
It can be used for AlphaMask too now.
Diffstat (limited to 'vcl/test')
-rw-r--r-- | vcl/test/canvasbitmaptest.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/vcl/test/canvasbitmaptest.cxx b/vcl/test/canvasbitmaptest.cxx index 3763fb5b9d02..aa3d524fdf6c 100644 --- a/vcl/test/canvasbitmaptest.cxx +++ b/vcl/test/canvasbitmaptest.cxx @@ -173,8 +173,7 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp, int nDepth = nOriginalDepth; { - ScopedBitmapReadAccess pAcc( aContainedBmp.AcquireReadAccess(), - aContainedBmp ); + Bitmap::ScopedReadAccess pAcc( aContainedBmp ); nDepth = pAcc->GetBitCount(); } @@ -324,8 +323,7 @@ void checkBitmapImport( const rtl::Reference<VclCanvasBitmap>& xBmp, int nDepth = nOriginalDepth; { - ScopedBitmapReadAccess pAcc( aContainedBmp.AcquireReadAccess(), - aContainedBmp ); + Bitmap::ScopedReadAccess pAcc( aContainedBmp ); nDepth = pAcc->GetBitCount(); } @@ -888,8 +886,7 @@ void TestWindow::Paint( const Rectangle& ) Bitmap aBitmap(Size(200,200),nDepth); aBitmap.Erase(COL_WHITE); { - ScopedBitmapWriteAccess pAcc(aBitmap.AcquireWriteAccess(), - aBitmap); + Bitmap::ScopedWriteAccess pAcc(aBitmap); if( pAcc.get() ) { BitmapColor aBlack(0); @@ -919,8 +916,7 @@ void TestWindow::Paint( const Rectangle& ) Bitmap aMask(Size(200,200),1); aMask.Erase(COL_WHITE); { - ScopedBitmapWriteAccess pAcc(aMask.AcquireWriteAccess(), - aMask); + Bitmap::ScopedWriteAccess pAcc(aMask); if( pAcc.get() ) { pAcc->SetFillColor(COL_BLACK); |