Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1653)

Unified Diff: android_webview/browser/aw_browser_main_parts.cc

Issue 1253553002: Add switch to use ipc command buffer in Android WebView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | android_webview/common/aw_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/aw_browser_main_parts.cc
diff --git a/android_webview/browser/aw_browser_main_parts.cc b/android_webview/browser/aw_browser_main_parts.cc
index ef6941c8a25fb47aba8acf5125dc10fe1ced9232..85fa1ea28c0b899fd84dcbfbe6980aece1830a01 100644
--- a/android_webview/browser/aw_browser_main_parts.cc
+++ b/android_webview/browser/aw_browser_main_parts.cc
@@ -10,12 +10,15 @@
#include "android_webview/browser/aw_result_codes.h"
#include "android_webview/browser/deferred_gpu_command_service.h"
#include "android_webview/common/aw_resource.h"
+#include "android_webview/common/aw_switches.h"
#include "base/android/apk_assets.h"
#include "base/android/build_info.h"
#include "base/android/locale_utils.h"
#include "base/android/memory_pressure_listener_android.h"
+#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
+#include "content/public/browser/android/synchronous_compositor.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
@@ -108,7 +111,12 @@ void AwBrowserMainParts::PreMainMessageLoopRun() {
media::SetMediaClientAndroid(
new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping()));
- gfx::GLSurface::InitializeOneOff();
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUseIpcCommandBuffer)) {
+ content::SynchronousCompositor::SetUseIpcCommandBuffer();
+ } else {
+ gfx::GLSurface::InitializeOneOff();
+ }
// This is needed for WebView Classic backwards compatibility
// See crbug.com/298495
« no previous file with comments | « no previous file | android_webview/common/aw_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698