diff options
-rw-r--r-- | src/core/backing_store_qt.cpp | 5 | ||||
-rw-r--r-- | src/core/gyp_run.pro | 10 | ||||
-rw-r--r-- | src/core/web_engine_context.cpp | 7 |
3 files changed, 22 insertions, 0 deletions
diff --git a/src/core/backing_store_qt.cpp b/src/core/backing_store_qt.cpp index b12f09f18..613dfdbbc 100644 --- a/src/core/backing_store_qt.cpp +++ b/src/core/backing_store_qt.cpp @@ -121,7 +121,12 @@ void BackingStoreQt::PaintToBackingStore(content::RenderProcessHost *process, , copy_rect_dst.width() , copy_rect_dst.height()); +#if defined(OS_ANDROID) + // The received image format is BGRA with Android so we have to swizzle the image data. + painter.drawImage(destination, img.rgbSwapped(), source); +#else painter.drawImage(destination, img, source); +#endif } } diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro index ae964ea1a..258d2f7c2 100644 --- a/src/core/gyp_run.pro +++ b/src/core/gyp_run.pro @@ -8,6 +8,16 @@ GYP_ARGS = "-D qt_cross_compile=0" cross_compile { GYP_ARGS = "-D qt_cross_compile=1 -D os_posix=1" TOOLCHAIN_SYSROOT = $$[QT_SYSROOT] + + linux-android { + CC = $$which($$QMAKE_CC) + ANDROID_TOOLCHAIN = $$dirname(CC) + TOOLCHAIN_SYSROOT = $$ANDROID_BUILD_TOP + + GYP_ARGS += "-D android_src=\"$${ANDROID_BUILD_TOP}\" -D android_toolchain=\"$${ANDROID_TOOLCHAIN}\"" \ + "-D android_ndk_root=\"$${ANDROID_BUILD_TOP}\" -D android_product_out=\"$${ANDROID_PRODUCT_OUT}\"" + } + !isEmpty(TOOLCHAIN_SYSROOT): GYP_ARGS += "-D sysroot=\"$${TOOLCHAIN_SYSROOT}\"" contains(QT_ARCH, "arm") { diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index dbaa948bf..03da61643 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -122,6 +122,13 @@ WebEngineContext::WebEngineContext(WebContentsAdapterClient::RenderingMode rende parsedCommandLine->AppendSwitch(switches::kInProcessGPU); } +#if defined(OS_ANDROID) + // Force single-process mode for now. + parsedCommandLine->AppendSwitch(switches::kSingleProcess); + // This is needed so that we do not assert in single process mode. + parsedCommandLine->AppendSwitch(switches::kEnableThreadedCompositing); +#endif + // Tell Chromium to use EGL instead of GLX if the Qt xcb plugin also does. if (qApp->platformName() == QStringLiteral("xcb") && qApp->platformNativeInterface()->nativeResourceForWindow(QByteArrayLiteral("egldisplay"), 0)) parsedCommandLine->AppendSwitchASCII(switches::kUseGL, gfx::kGLImplementationEGLName); |