[Libreoffice-commits] core.git: Branch 'feature/skia' - 2 commits - vcl/inc vcl/qa vcl/skia vcl/unx vcl/win
Luboš Luňák (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 4 13:32:48 UTC 2019
vcl/inc/headless/svpgdi.hxx | 1
vcl/inc/opengl/gdiimpl.hxx | 2
vcl/inc/qt5/Qt5Graphics.hxx | 1
vcl/inc/qt5/Qt5SvpGraphics.hxx | 2
vcl/inc/quartz/salgdi.h | 1
vcl/inc/salgdiimpl.hxx | 2
vcl/inc/unx/genpspgraphics.h | 2
vcl/inc/unx/gtk/gtkgdi.hxx | 4 +
vcl/qa/cppunit/BackendTest.cxx | 82 +++++++++++++++++++++++-----------------
vcl/skia/gdiimpl.cxx | 32 ++++++++++++++-
vcl/unx/generic/gdi/gdiimpl.hxx | 2
vcl/win/gdi/gdiimpl.hxx | 2
12 files changed, 97 insertions(+), 36 deletions(-)
New commits:
commit a9b573abbb91764397fce8e90c455524d5cbf8cb
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Nov 1 13:53:39 2019 +0100
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Nov 4 14:31:29 2019 +0100
implement SalROPColor in Skia
Pretty much copy&pasted from other VCL plugins ... whatever is
actually is.
Change-Id: Ibdd5d6d2106f303127afbbde45d400d02a5de93b
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index df0c2fbf60d2..c36184714adb 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -345,9 +345,37 @@ void SkiaSalGraphicsImpl::SetXORMode(bool bSet, bool bInvertOnly)
(void)bInvertOnly;
}
-void SkiaSalGraphicsImpl::SetROPLineColor(SalROPColor nROPColor) { (void)nROPColor; }
+void SkiaSalGraphicsImpl::SetROPLineColor(SalROPColor nROPColor)
+{
+ switch (nROPColor)
+ {
+ case SalROPColor::N0:
+ mLineColor = Color(0, 0, 0);
+ break;
+ case SalROPColor::N1:
+ mLineColor = Color(0xff, 0xff, 0xff);
+ break;
+ case SalROPColor::Invert:
+ mLineColor = Color(0xff, 0xff, 0xff);
+ break;
+ }
+}
-void SkiaSalGraphicsImpl::SetROPFillColor(SalROPColor nROPColor) { (void)nROPColor; }
+void SkiaSalGraphicsImpl::SetROPFillColor(SalROPColor nROPColor)
+{
+ switch (nROPColor)
+ {
+ case SalROPColor::N0:
+ mFillColor = Color(0, 0, 0);
+ break;
+ case SalROPColor::N1:
+ mFillColor = Color(0xff, 0xff, 0xff);
+ break;
+ case SalROPColor::Invert:
+ mFillColor = Color(0xff, 0xff, 0xff);
+ break;
+ }
+}
void SkiaSalGraphicsImpl::drawPixel(long nX, long nY) { drawPixel(nX, nY, mLineColor); }
commit 5565a870c0c91cc4c260e8816dedda73e392d192
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Oct 31 15:31:06 2019 +0100
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Nov 4 14:31:01 2019 +0100
extend vcl backendtest to more backends
At least the KF5/Qt5 VCL plugins passes fine.
Change-Id: I033ddf6ae9cc663729ca459cdc514dc0fa51ddc2
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index b0e4aac4adad..aa61162d9f2b 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -261,6 +261,7 @@ public:
virtual SystemGraphicsData GetGraphicsData() const override;
+ virtual OUString getRenderBackendName() const override { return "svp"; }
#if ENABLE_CAIRO_CANVAS
virtual bool SupportsCairo() const override;
diff --git a/vcl/inc/opengl/gdiimpl.hxx b/vcl/inc/opengl/gdiimpl.hxx
index 95e3aa261472..2deba40eba53 100644
--- a/vcl/inc/opengl/gdiimpl.hxx
+++ b/vcl/inc/opengl/gdiimpl.hxx
@@ -198,6 +198,8 @@ public:
virtual void freeResources() override;
+ virtual OUString getRenderBackendName() const override { return "opengl"; }
+
const vcl::Region& getClipRegion() const;
virtual bool setClipRegion( const vcl::Region& ) override;
diff --git a/vcl/inc/qt5/Qt5Graphics.hxx b/vcl/inc/qt5/Qt5Graphics.hxx
index a7c7aaa727ac..d11297bf335e 100644
--- a/vcl/inc/qt5/Qt5Graphics.hxx
+++ b/vcl/inc/qt5/Qt5Graphics.hxx
@@ -80,6 +80,7 @@ public:
virtual SalGraphicsImpl* GetImpl() const override;
virtual SystemGraphicsData GetGraphicsData() const override;
virtual bool supportsOperation(OutDevSupportType) const override;
+ virtual OUString getRenderBackendName() const override { return "qt5"; }
#if ENABLE_CAIRO_CANVAS
virtual bool SupportsCairo() const override;
diff --git a/vcl/inc/qt5/Qt5SvpGraphics.hxx b/vcl/inc/qt5/Qt5SvpGraphics.hxx
index 0c2485f2a7ed..895023033468 100644
--- a/vcl/inc/qt5/Qt5SvpGraphics.hxx
+++ b/vcl/inc/qt5/Qt5SvpGraphics.hxx
@@ -46,6 +46,8 @@ public:
#endif // ENABLE_CAIRO_CANVAS
virtual void GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) override;
+
+ virtual OUString getRenderBackendName() const override { return "qt5svp"; }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index 338878e79529..48ae50e2c68c 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -387,6 +387,7 @@ public:
GetTextLayout(int nFallbackLevel) override;
virtual void DrawTextLayout( const GenericSalLayout& ) override;
virtual bool supportsOperation( OutDevSupportType ) const override;
+ virtual OUString getRenderBackendName() const override { return "aqua"; }
virtual SystemGraphicsData
GetGraphicsData() const override;
diff --git a/vcl/inc/salgdiimpl.hxx b/vcl/inc/salgdiimpl.hxx
index 2a314ed207c1..432dbdb7ec0d 100644
--- a/vcl/inc/salgdiimpl.hxx
+++ b/vcl/inc/salgdiimpl.hxx
@@ -50,7 +50,7 @@ public:
virtual void freeResources() = 0;
- virtual OUString getRenderBackendName() const { return OUString(); }
+ virtual OUString getRenderBackendName() const = 0;
virtual bool setClipRegion( const vcl::Region& ) = 0;
//
diff --git a/vcl/inc/unx/genpspgraphics.h b/vcl/inc/unx/genpspgraphics.h
index 73084a4f6a61..69b68431d62c 100644
--- a/vcl/inc/unx/genpspgraphics.h
+++ b/vcl/inc/unx/genpspgraphics.h
@@ -195,6 +195,8 @@ public:
virtual SystemGraphicsData GetGraphicsData() const override;
+ virtual OUString getRenderBackendName() const override { return "genpsp"; }
+
#if ENABLE_CAIRO_CANVAS
virtual bool SupportsCairo() const override;
virtual cairo::SurfaceSharedPtr CreateSurface(const cairo::CairoSurfaceSharedPtr& rSurface) const override;
diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index cd9cf4c5b562..022a72321873 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -131,6 +131,8 @@ public:
virtual void GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) override;
+ virtual OUString getRenderBackendName() const override { return "gtk3svp"; }
+
GtkStyleContext* createStyleContext(gtk_widget_path_iter_set_object_nameFunc set_object_name, GtkControlPart ePart);
GtkStyleContext* createNewContext(GtkControlPart ePart, gtk_widget_path_iter_set_object_nameFunc set_object_name);
GtkStyleContext* createOldContext(GtkControlPart ePart);
@@ -293,6 +295,8 @@ public:
virtual void copyBits( const SalTwoRect& rPosAry,
SalGraphics* pSrcGraphics ) override;
+ virtual OUString getRenderBackendName() const override { return "gtk3"; }
+
protected:
std::unique_ptr<GdkX11Pixmap> NWGetPixmapFromScreen( tools::Rectangle srcRect, int nBgColor = 0 );
diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx
index 928d7746827b..a36c0faa5568 100644
--- a/vcl/qa/cppunit/BackendTest.cxx
+++ b/vcl/qa/cppunit/BackendTest.cxx
@@ -55,6 +55,22 @@ public:
// exist and we need to fix them. Consistent behaviour of our backends
// is of highest priority.
+ static bool assertBackendNameNotEmpty(const OUString& name)
+ {
+ // This ensures that all backends return a valid name.
+ assert(!name.isEmpty());
+ return false;
+ }
+
+// Check whether tests should fail depending on which backend is used
+// (not all work). If you want to disable just a specific test
+// for a specific backend, use something like
+// 'if(SHOULD_ASSERT && aOutDevTest.getRenderBackendName() != "skia")'.
+#define SHOULD_ASSERT \
+ (assertBackendNameNotEmpty(aOutDevTest.getRenderBackendName()) \
+ || aOutDevTest.getRenderBackendName() == "skia" \
+ || aOutDevTest.getRenderBackendName() == "qt5svp")
+
void testDrawRectWithRectangle()
{
vcl::test::OutputDeviceTestRect aOutDevTest;
@@ -62,7 +78,7 @@ public:
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
exportImage("01-01_rectangle_test-rectangle.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -73,7 +89,7 @@ public:
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
exportImage("01-02_rectangle_test-pixel.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -84,7 +100,7 @@ public:
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
exportImage("01-03_rectangle_test-line.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -94,7 +110,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
exportImage("01-04_rectangle_test-polygon.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -104,7 +120,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
exportImage("01-05_rectangle_test-polyline.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -114,7 +130,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
exportImage("01-06_rectangle_test-polyline_b2d.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -124,7 +140,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
exportImage("01-07_rectangle_test-polypolygon.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -134,7 +150,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(false);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangle(aBitmap);
exportImage("01-08_rectangle_test-polypolygon_b2d.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -144,7 +160,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
exportImage("02-01_rectangle_AA_test-rectangle.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -154,7 +170,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
exportImage("02-02_rectangle_AA_test-pixel.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -164,7 +180,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
exportImage("02-03_rectangle_AA_test-line.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -174,7 +190,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
exportImage("02-04_rectangle_AA_test-polygon.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -184,7 +200,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
exportImage("02-05_rectangle_AA_test-polyline.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -194,7 +210,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
exportImage("02-06_rectangle_AA_test-polyline_b2d.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -204,7 +220,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
exportImage("02-07_rectangle_AA_test-polypolygon.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -214,7 +230,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupRectangle(true);
auto eResult = vcl::test::OutputDeviceTestCommon::checkRectangleAA(aBitmap);
exportImage("02-08_rectangle_AA_test-polypolygon_b2d.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -224,7 +240,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupFilledRectangle();
auto eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap);
exportImage("03-01_filled_rectangle_test-rectangle.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -234,7 +250,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupFilledRectangle();
auto eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap);
exportImage("03-02_filled_rectangle_test-polygon.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -244,7 +260,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupFilledRectangle();
auto eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap);
exportImage("03-03_filled_rectangle_test-polypolygon.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -254,7 +270,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupFilledRectangle();
auto eResult = vcl::test::OutputDeviceTestCommon::checkFilledRectangle(aBitmap);
exportImage("03-04_filled_rectangle_test-polypolygon_b2d.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -264,7 +280,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupDiamond();
auto eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
exportImage("04-01_diamond_test-polygon.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -274,7 +290,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupDiamond();
auto eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
exportImage("04-02_diamond_test-line.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -284,7 +300,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupDiamond();
auto eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
exportImage("04-03_diamond_test-polyline.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -294,7 +310,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupDiamond();
auto eResult = vcl::test::OutputDeviceTestCommon::checkDiamond(aBitmap);
exportImage("04-04_diamond_test-polyline_b2d.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -304,7 +320,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupInvert_NONE();
auto eResult = vcl::test::OutputDeviceTestCommon::checkInvertRectangle(aBitmap);
exportImage("05-01_invert_test-rectangle.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -314,7 +330,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupInvert_N50();
auto eResult = vcl::test::OutputDeviceTestCommon::checkInvertN50Rectangle(aBitmap);
exportImage("05-02_invert_N50_test-rectangle.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -324,7 +340,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupInvert_TrackFrame();
auto eResult = vcl::test::OutputDeviceTestCommon::checkInvertTrackFrameRectangle(aBitmap);
exportImage("05-03_invert_TrackFrame_test-rectangle.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -334,7 +350,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupBezier();
auto eResult = vcl::test::OutputDeviceTestCommon::checkBezier(aBitmap);
exportImage("06-01_bezier_test-polyline_b2d.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -344,7 +360,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupAABezier();
auto eResult = vcl::test::OutputDeviceTestCommon::checkBezier(aBitmap);
exportImage("07-01_bezier_AA_test-polyline_b2d.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -354,7 +370,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupDrawBitmap();
exportImage("08-01_bitmap_test.png", aBitmap);
auto eResult = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -364,7 +380,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap();
auto eResult = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap);
exportImage("08-02_transformed_bitmap_test.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -374,7 +390,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupDrawBitmapExWithAlpha();
auto eResult = vcl::test::OutputDeviceTestBitmap::checkBitmapExWithAlpha(aBitmap);
exportImage("08-03_bitmapex_with_alpha_test.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
@@ -384,7 +400,7 @@ public:
Bitmap aBitmap = aOutDevTest.setupDrawMask();
auto eResult = vcl::test::OutputDeviceTestBitmap::checkMask(aBitmap);
exportImage("08-04_mask_test.png", aBitmap);
- if (aOutDevTest.getRenderBackendName() == "skia")
+ if (SHOULD_ASSERT)
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx
index d40c31692ea9..6660e191342d 100644
--- a/vcl/unx/generic/gdi/gdiimpl.hxx
+++ b/vcl/unx/generic/gdi/gdiimpl.hxx
@@ -112,6 +112,8 @@ public:
virtual ~X11SalGraphicsImpl() override;
+ virtual OUString getRenderBackendName() const override { return "gen"; }
+
virtual bool setClipRegion( const vcl::Region& ) override;
//
// get the depth of the device
diff --git a/vcl/win/gdi/gdiimpl.hxx b/vcl/win/gdi/gdiimpl.hxx
index 53fc4224f69d..3b3b1837b930 100644
--- a/vcl/win/gdi/gdiimpl.hxx
+++ b/vcl/win/gdi/gdiimpl.hxx
@@ -70,6 +70,8 @@ public:
virtual void freeResources() override;
+ virtual OUString getRenderBackendName() const override { return "gdi"; }
+
virtual bool setClipRegion( const vcl::Region& ) override;
//
// get the depth of the device
More information about the Libreoffice-commits
mailing list