summaryrefslogtreecommitdiff
path: root/vcl/qa
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2019-11-16 03:19:48 +1100
committerXisco Faulí <xiscofauli@libreoffice.org>2019-11-18 16:18:53 +0100
commita693c35634e8d44793f5f0fe91adea135e012434 (patch)
tree33ca15add91a15d90f6be24ee91b58b3edfb4e51 /vcl/qa
parent28444a2cf7ac637a0161733121c59de82bc7e4db (diff)
tdf#128847 - vcl: fix colorspace names for MacOS
kCGColorSpaceGenericGray is deprecated and should be kCGColorSpaceGenericGrayGamma2_2, and kCGColorSpaceGenericRGB is similary deprecated and now should be kCGColorSpaceSRGB. This fixes the "color skew" issue found in a variety of tests. Change-Id: I8088b2377e03cde3f8e03e9d3778a40fc3081c4a Reviewed-on: https://gerrit.libreoffice.org/82809 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 3a8d16ba8ca7ef7349e893f2bf1c7e12d9a8d7ae) Reviewed-on: https://gerrit.libreoffice.org/83081 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'vcl/qa')
-rw-r--r--vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx22
-rw-r--r--vcl/qa/cppunit/outdev.cxx4
2 files changed, 6 insertions, 20 deletions
diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
index bc8bdc6c06a1..71bfc40265b5 100644
--- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
+++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx
@@ -71,11 +71,9 @@ void BitmapRenderTest::testTdf104141()
// Check drawing results: ensure that it contains transparent
// (greenish) pixels
-#if !defined MACOSX //TODO: on Mac colors are drifted, so exact compare fails
const Color aColor = pVDev->GetPixel(Point(21, 21));
CPPUNIT_ASSERT(aColor.GetGreen() > 10 * aColor.GetRed()
&& aColor.GetGreen() > 10 * aColor.GetBlue());
-#endif
}
void BitmapRenderTest::testTdf113918()
@@ -188,10 +186,7 @@ void BitmapRenderTest::testAlphaVirtualDevice()
aColor = pAlphaVirtualDevice->GetPixel(Point(1, 1));
// Read back the opaque pixel
-#ifdef MACOSX
- // Oh no... what we input is not the same as what we get out!
- CPPUNIT_ASSERT_EQUAL(Color(0x002Cff44), aColor);
-#elif defined _WIN32
+#if defined _WIN32
CPPUNIT_ASSERT_LESS(6, deltaColor(Color(0x0022ff55), aColor));
#else
CPPUNIT_ASSERT_EQUAL(Color(0x0022ff55), aColor);
@@ -203,10 +198,7 @@ void BitmapRenderTest::testAlphaVirtualDevice()
CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Height());
aColor = aBitmap.GetPixelColor(1, 1);
-#ifdef MACOSX
- // Oh no... what we input is not the same as what we get out!
- CPPUNIT_ASSERT_EQUAL(Color(0x002Cff44), aColor);
-#elif defined _WIN32
+#if defined _WIN32
CPPUNIT_ASSERT_LESS(6, deltaColor(Color(0x0022ff55), aColor));
#else
CPPUNIT_ASSERT_EQUAL(Color(0x0022ff55), aColor);
@@ -217,10 +209,7 @@ void BitmapRenderTest::testAlphaVirtualDevice()
aColor = pAlphaVirtualDevice->GetPixel(Point(0, 0));
// Read back the semi-transparent pixel
-#ifdef MACOSX
- // Oh no... what we input is not the same as what we get out!
- CPPUNIT_ASSERT_EQUAL(Color(0x342CFF44), aColor);
-#elif defined _WIN32
+#if defined _WIN32
CPPUNIT_ASSERT_LESS(6, deltaColor(Color(0x4422FF55), aColor));
#else
CPPUNIT_ASSERT_EQUAL(Color(0x4422FF55), aColor);
@@ -232,10 +221,7 @@ void BitmapRenderTest::testAlphaVirtualDevice()
CPPUNIT_ASSERT_EQUAL(long(4), aBitmap.GetSizePixel().Height());
aColor = aBitmap.GetPixelColor(0, 0);
-#ifdef MACOSX
- // Oh no... what we input is not the same as what we get out!
- CPPUNIT_ASSERT_EQUAL(Color(0x342CFF44), aColor);
-#elif defined _WIN32
+#if defined _WIN32
CPPUNIT_ASSERT_LESS(6, deltaColor(Color(0x4422FF55), aColor));
#else
CPPUNIT_ASSERT_EQUAL(Color(0x4422FF55), aColor);
diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx
index e6a6b8f1c5f6..f4a27b0b0558 100644
--- a/vcl/qa/cppunit/outdev.cxx
+++ b/vcl/qa/cppunit/outdev.cxx
@@ -100,7 +100,7 @@ void VclOutdevTest::testVirtualDevice()
#endif
CPPUNIT_ASSERT_EQUAL(COL_WHITE, pVDev->GetPixel(Point(0,0)));
-#if defined LINUX //TODO: various failures on Mac and Windows tinderboxes
+#if !defined _WIN32 //TODO: various failures on Windows tinderboxes
CPPUNIT_ASSERT_EQUAL(COL_BLUE, pVDev->GetPixel(Point(1,2)));
CPPUNIT_ASSERT_EQUAL(COL_RED, pVDev->GetPixel(Point(31,30)));
#endif
@@ -109,7 +109,7 @@ void VclOutdevTest::testVirtualDevice()
// Gotcha: y and x swap for BitmapReadAccess: deep joy.
Bitmap::ScopedReadAccess pAcc(aBmp);
CPPUNIT_ASSERT_EQUAL(COL_WHITE, static_cast<Color>(pAcc->GetPixel(0,0)));
-#if defined LINUX //TODO: various failures on Mac and Windows tinderboxes
+#if !defined _WIN32 //TODO: various failures on Windows tinderboxes
CPPUNIT_ASSERT_EQUAL(COL_BLUE, static_cast<Color>(pAcc->GetPixel(2,1)));
CPPUNIT_ASSERT_EQUAL(COL_RED, static_cast<Color>(pAcc->GetPixel(30,31)));
#endif