diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2023-12-04 11:17:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-12-07 09:32:14 +0100 |
commit | a214ac677481883d31800bc2b67fd3a9c504319d (patch) | |
tree | 97598a97a7b0745acaf4dc4e7587871794011227 /vcl/backendtest | |
parent | 7101c620857cb885076b85cd1447e50d30cab528 (diff) |
simplify and modernise ScopedBitmapAccess
(*) Make all of it use a "Scoped" paradigm
(*) pass by value, no need to allocate on heap
(*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods.
(*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places.
Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/backendtest')
-rw-r--r-- | vcl/backendtest/outputdevice/bitmap.cxx | 6 | ||||
-rw-r--r-- | vcl/backendtest/outputdevice/common.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/backendtest/outputdevice/bitmap.cxx b/vcl/backendtest/outputdevice/bitmap.cxx index 9ea1a6f08d84..517be3968eb4 100644 --- a/vcl/backendtest/outputdevice/bitmap.cxx +++ b/vcl/backendtest/outputdevice/bitmap.cxx @@ -11,7 +11,7 @@ #include <test/outputdevice.hxx> #include <vcl/bitmapex.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> -#include <bitmap/BitmapWriteAccess.hxx> +#include <vcl/BitmapWriteAccess.hxx> namespace vcl::test { @@ -104,7 +104,7 @@ Bitmap OutputDeviceTestBitmap::setupDrawBitmapExWithAlpha(vcl::PixelFormat aBitm AlphaMask aAlpha(aBitmapSize); { - AlphaScopedWriteAccess aWriteAccess(aAlpha); + BitmapScopedWriteAccess aWriteAccess(aAlpha); aWriteAccess->Erase(COL_ALPHA_TRANSPARENT); aWriteAccess->SetLineColor(Color(0xBB, 0xBB, 0xBB)); aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8)); @@ -153,7 +153,7 @@ BitmapEx OutputDeviceTestBitmap::setupDrawBlend(vcl::PixelFormat aBitmapFormat) AlphaMask aAlpha(aBitmapSize); { - AlphaScopedWriteAccess aWriteAccess(aAlpha); + BitmapScopedWriteAccess aWriteAccess(aAlpha); aWriteAccess->Erase(COL_ALPHA_TRANSPARENT); aWriteAccess->SetLineColor(Color(0xBB, 0xBB, 0xBB)); aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8)); diff --git a/vcl/backendtest/outputdevice/common.cxx b/vcl/backendtest/outputdevice/common.cxx index 38c616bf3c93..bd8b905f647f 100644 --- a/vcl/backendtest/outputdevice/common.cxx +++ b/vcl/backendtest/outputdevice/common.cxx @@ -10,7 +10,7 @@ #include <test/outputdevice.hxx> -#include <bitmap/BitmapWriteAccess.hxx> +#include <vcl/BitmapWriteAccess.hxx> #include <salgdi.hxx> #include <map> |