summaryrefslogtreecommitdiff
path: root/vcl/backendtest
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-15 10:24:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-15 12:37:35 +0100
commit953a5cb1c8c750df24ed0316349a5916c384296d (patch)
tree26a76707725fad73d9e71486f0723406bae52065 /vcl/backendtest
parentbca14a7126a8cea12eecd248ae84e3d07db9609b (diff)
move Bitmap::ScopedWriteAccess inside vcl
would have liked to make the AcquireWriteAccess methods DLLPRIVATE, but they are needed by the workbench and testing code Change-Id: I22497788eb68dfb84b7e542e5ef53322892a5274 Reviewed-on: https://gerrit.libreoffice.org/51310 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'vcl/backendtest')
-rw-r--r--vcl/backendtest/outputdevice/bitmap.cxx11
-rw-r--r--vcl/backendtest/outputdevice/common.cxx9
2 files changed, 11 insertions, 9 deletions
diff --git a/vcl/backendtest/outputdevice/bitmap.cxx b/vcl/backendtest/outputdevice/bitmap.cxx
index d8836330d5be..dbbb052c122e 100644
--- a/vcl/backendtest/outputdevice/bitmap.cxx
+++ b/vcl/backendtest/outputdevice/bitmap.cxx
@@ -11,6 +11,7 @@
#include <test/outputdevice.hxx>
#include <vcl/bitmapex.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <bitmapwriteaccess.hxx>
namespace vcl {
namespace test {
@@ -20,7 +21,7 @@ Bitmap OutputDeviceTestBitmap::setupDrawTransformedBitmap()
Size aBitmapSize(9, 9);
Bitmap aBitmap(aBitmapSize, 24);
{
- Bitmap::ScopedWriteAccess aWriteAccess(aBitmap);
+ BitmapScopedWriteAccess aWriteAccess(aBitmap);
aWriteAccess->Erase(constFillColor);
aWriteAccess->SetLineColor(COL_YELLOW);
aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8));
@@ -45,7 +46,7 @@ Bitmap OutputDeviceTestBitmap::setupDrawBitmap()
Size aBitmapSize(9, 9);
Bitmap aBitmap(aBitmapSize, 24);
{
- Bitmap::ScopedWriteAccess aWriteAccess(aBitmap);
+ BitmapScopedWriteAccess aWriteAccess(aBitmap);
aWriteAccess->Erase(constFillColor);
aWriteAccess->SetLineColor(COL_YELLOW);
aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8));
@@ -67,7 +68,7 @@ Bitmap OutputDeviceTestBitmap::setupDrawBitmapExWithAlpha()
Size aBitmapSize(9, 9);
Bitmap aBitmap(aBitmapSize, 24);
{
- Bitmap::ScopedWriteAccess aWriteAccess(aBitmap);
+ BitmapScopedWriteAccess aWriteAccess(aBitmap);
aWriteAccess->Erase(COL_WHITE);
aWriteAccess->SetLineColor(Color(0xFF, 0xFF, 0x00));
aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8));
@@ -76,7 +77,7 @@ Bitmap OutputDeviceTestBitmap::setupDrawBitmapExWithAlpha()
AlphaMask aAlpha(aBitmapSize);
{
- AlphaMask::ScopedWriteAccess aWriteAccess(aAlpha);
+ AlphaScopedWriteAccess aWriteAccess(aAlpha);
aWriteAccess->Erase(COL_WHITE);
aWriteAccess->SetLineColor(Color(0x44, 0x44, 0x44));
aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8));
@@ -97,7 +98,7 @@ Bitmap OutputDeviceTestBitmap::setupDrawMask()
Size aBitmapSize(9, 9);
Bitmap aBitmap(aBitmapSize, 24);
{
- Bitmap::ScopedWriteAccess aWriteAccess(aBitmap);
+ BitmapScopedWriteAccess aWriteAccess(aBitmap);
aWriteAccess->Erase(COL_WHITE);
aWriteAccess->SetLineColor(COL_BLACK);
aWriteAccess->DrawRect(tools::Rectangle(0, 0, 8, 8));
diff --git a/vcl/backendtest/outputdevice/common.cxx b/vcl/backendtest/outputdevice/common.cxx
index ac2646498642..9f69a28fabd3 100644
--- a/vcl/backendtest/outputdevice/common.cxx
+++ b/vcl/backendtest/outputdevice/common.cxx
@@ -9,6 +9,7 @@
*/
#include <test/outputdevice.hxx>
+#include <bitmapwriteaccess.hxx>
namespace vcl {
namespace test {
@@ -25,7 +26,7 @@ int deltaColor(BitmapColor aColor1, BitmapColor aColor2)
return std::max(std::max(deltaR, deltaG), deltaB);
}
-void checkValue(Bitmap::ScopedWriteAccess& pAccess, int x, int y, Color aExpected,
+void checkValue(BitmapScopedWriteAccess& pAccess, int x, int y, Color aExpected,
int& nNumberOfQuirks, int& nNumberOfErrors, bool bQuirkMode, int nColorDeltaThresh = 0)
{
const bool bColorize = false;
@@ -53,7 +54,7 @@ void checkValue(Bitmap::ScopedWriteAccess& pAccess, int x, int y, Color aExpecte
TestResult checkRect(Bitmap& rBitmap, int aLayerNumber, Color aExpectedColor)
{
- Bitmap::ScopedWriteAccess pAccess(rBitmap);
+ BitmapScopedWriteAccess pAccess(rBitmap);
long nHeight = pAccess->Height();
long nWidth = pAccess->Width();
@@ -92,7 +93,7 @@ TestResult checkRect(Bitmap& rBitmap, int aLayerNumber, Color aExpectedColor)
TestResult checkHorizontalVerticalDiagonalLines(Bitmap& rBitmap, Color aExpectedColor, int nColorThresh)
{
- Bitmap::ScopedWriteAccess pAccess(rBitmap);
+ BitmapScopedWriteAccess pAccess(rBitmap);
long nWidth = pAccess->Width();
long nHeight = pAccess->Height();
@@ -164,7 +165,7 @@ TestResult checkHorizontalVerticalDiagonalLines(Bitmap& rBitmap, Color aExpected
TestResult checkDiamondLine(Bitmap& rBitmap, int aLayerNumber, Color aExpectedColor)
{
- Bitmap::ScopedWriteAccess pAccess(rBitmap);
+ BitmapScopedWriteAccess pAccess(rBitmap);
long nHeight = pAccess->Height();
long nWidth = pAccess->Width();