summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-10-22 11:48:08 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-11-27 09:55:10 +0100
commit99bff8cf8f199cd5899134f12b499ce4ee9a4e82 (patch)
treef4c346d85d531aad00cc1667c871fdc69b6a70b4 /vcl
parentfb6a2d3afb67481565c666c10eee0a875808d803 (diff)
add GUI and configuration options for Skia
Pretty much a copy&paste of OpenGL. There are no settings for choosing which backend Skia should use, as the plan is that simply the "best" one will be selected. Change-Id: I44fa876ab85de98de482a6ed9f814024334686ce
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/strings.hrc1
-rw-r--r--vcl/skia/SkiaHelper.cxx10
-rw-r--r--vcl/source/app/svapp.cxx5
3 files changed, 11 insertions, 5 deletions
diff --git a/vcl/inc/strings.hrc b/vcl/inc/strings.hrc
index 7e936fc711a2..d8f73a587722 100644
--- a/vcl/inc/strings.hrc
+++ b/vcl/inc/strings.hrc
@@ -125,6 +125,7 @@
#define SV_APP_OSVERSION NC_("SV_APP_OSVERSION", "OS: ")
#define SV_APP_UIRENDER NC_("SV_APP_UIRENDER", "UI render: ")
#define SV_APP_GL NC_("SV_APP_GL", "GL")
+#define SV_APP_SKIA NC_("SV_APP_SKIA", "Skia")
#define SV_APP_DEFAULT NC_("SV_APP_DEFAULT", "default")
#define SV_MSGBOX_INFO NC_("SV_MSGBOX_INFO", "Information")
diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index 278d19bd8d52..bc643bd546b1 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -10,6 +10,8 @@
#include <vcl/skia/SkiaHelper.hxx>
#include <vcl/svapp.hxx>
+#include <desktop/crashreport.hxx>
+#include <officecfg/Office/Common.hxx>
#include <config_features.h>
@@ -54,8 +56,7 @@ bool SkiaHelper::isVCLSkiaEnabled()
*/
bSet = true;
- bForceSkia = !!getenv(
- "SAL_FORCESKIA"); // TODO SKIA || officecfg::Office::Common::VCL::ForceOpenGL::get();
+ bForceSkia = !!getenv("SAL_FORCESKIA") || officecfg::Office::Common::VCL::ForceSkia::get();
bool bRet = false;
bool bSupportsVCLSkia = supportsVCLSkia();
@@ -70,7 +71,8 @@ bool SkiaHelper::isVCLSkiaEnabled()
bEnable = bEnableSkiaEnv;
- // TODO SKIA if (officecfg::Office::Common::VCL::UseOpenGL::get())
+ if (officecfg::Office::Common::VCL::UseSkia::get())
+ bEnable = false;
// Force disable in safe mode
if (Application::IsSafeModeEnabled())
@@ -79,7 +81,7 @@ bool SkiaHelper::isVCLSkiaEnabled()
bRet = bEnable;
}
- // TODO SKIA CrashReporter::AddKeyValue("UseOpenGL", OUString::boolean(bRet));
+ CrashReporter::addKeyValue("UseSkia", OUString::boolean(bRet), CrashReporter::Write);
return bRet;
}
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 3dcfc82ec00a..4b97754bebbe 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -49,6 +49,7 @@
#if HAVE_FEATURE_OPENGL
#include <vcl/opengl/OpenGLWrapper.hxx>
#endif
+#include <vcl/skia/SkiaHelper.hxx>
#include <salinst.hxx>
#include <salframe.hxx>
@@ -1147,12 +1148,14 @@ OUString Application::GetHWOSConfInfo()
aDetails.append( "; " );
aDetails.append( VclResId(SV_APP_UIRENDER) );
-// TODO SKIA
#if HAVE_FEATURE_OPENGL
if ( OpenGLWrapper::isVCLOpenGLEnabled() )
aDetails.append( VclResId(SV_APP_GL) );
else
#endif
+ if ( SkiaHelper::isVCLSkiaEnabled() )
+ aDetails.append( VclResId(SV_APP_SKIA) );
+ else
aDetails.append( VclResId(SV_APP_DEFAULT) );
aDetails.append( "; " );