From ed1d8c3200a230e370098d51373046e14beaf25b Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Mon, 19 May 2014 12:44:40 +0200 Subject: Use the same switches for both embedded Linux and Android This also explicitly enables impl-side painting, which is enabled by default on Android, hard-coded behind an #if defined(OS_ANDROID). Change-Id: Iacc6cff82c0f071d1c8901977748d6164fb0a87d Reviewed-by: Zeno Albisser --- src/core/core_gyp_generator.pro | 4 ++++ src/core/web_engine_context.cpp | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/core_gyp_generator.pro b/src/core/core_gyp_generator.pro index 4ac4d0060..211020a8e 100644 --- a/src/core/core_gyp_generator.pro +++ b/src/core/core_gyp_generator.pro @@ -20,6 +20,10 @@ DEFINES += QT_NO_KEYWORDS \ QTWEBENGINECORE_VERSION_STR=\\\"$$MODULE_VERSION\\\" \ BUILDING_CHROMIUM +# Assume that we want mobile touch and low-end hardware behaviors +# whenever we are cross compiling. +cross_compile: DEFINES += QTWEBENGINE_MOBILE_SWITCHES + # Keep Skia happy CONFIG(release, debug|release): DEFINES += NDEBUG diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index e9180bae5..05075b76c 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -138,8 +138,8 @@ WebEngineContext::WebEngineContext() parsedCommandLine->AppendSwitch(switches::kEnableThreadedCompositing); parsedCommandLine->AppendSwitch(switches::kInProcessGPU); -#if defined(OS_ANDROID) - // Required on Android +#if defined(QTWEBENGINE_MOBILE_SWITCHES) + // Inspired from the Android port's default switches parsedCommandLine->AppendSwitch(switches::kEnableOverlayScrollbars); parsedCommandLine->AppendSwitch(switches::kEnableGestureTapHighlight); parsedCommandLine->AppendSwitch(switches::kEnablePinch); @@ -156,6 +156,7 @@ WebEngineContext::WebEngineContext() parsedCommandLine->AppendSwitch(switches::kDisableGpuShaderDiskCache); parsedCommandLine->AppendSwitch(switches::kDisable2dCanvasAntialiasing); parsedCommandLine->AppendSwitch(switches::kEnableDeadlineScheduling); + parsedCommandLine->AppendSwitch(cc::switches::kEnableImplSidePainting); parsedCommandLine->AppendSwitch(cc::switches::kDisableCompositedAntialiasing); parsedCommandLine->AppendSwitchASCII(switches::kProfilerTiming, switches::kProfilerTimingDisabledValue); -- cgit v1.2.3