From 718ae556ab28e5ef156cd8b6fa59c47175639e10 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Wed, 26 Jul 2017 11:56:19 +0200 Subject: [PATCH] using the raster paint engine for the SVGs --- examples/automotive/main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/automotive/main.cpp b/examples/automotive/main.cpp index c020fd08..67475c81 100644 --- a/examples/automotive/main.cpp +++ b/examples/automotive/main.cpp @@ -14,6 +14,19 @@ int main( int argc, char** argv ) SkinFactory skinFactory; Qsk::registerSkinFactory( "SampleSkinFactory", &skinFactory ); + /* + When going over QPainter for the SVGs we prefer the raster paint + engine, simply showing better results. Interestingly the OpenGL paint + engine was even slower for the use case of non-complex SVGs. + Looks like its tesselation is not much faster than "pixeling" + those images directly. + */ + qskSetup->setControlFlag( QskSetup::PreferRasterForTextures, true ); + + // Starting with a simple skin made for this example + // CTRL-S allow to rotate through the registered skins and CTRL-T + // changes the colors, when the DefaultSkin is active. + qskSetup->setSkin( "DefaultSkin" ); SkinnyShortcut::enable( SkinnyShortcut::DebugBackground | SkinnyShortcut::Quit );