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

Side by Side Diff: android_webview/lib/main/aw_main_delegate.cc

Issue 140753006: [Android WebView] Turn on accelerated canvas based on View.isHardwareAccelerated (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/lib/main/aw_main_delegate.h" 5 #include "android_webview/lib/main/aw_main_delegate.h"
6 6
7 #include "android_webview/browser/aw_content_browser_client.h" 7 #include "android_webview/browser/aw_content_browser_client.h"
8 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h" 8 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h"
9 #include "android_webview/browser/in_process_view_renderer.h" 9 #include "android_webview/browser/in_process_view_renderer.h"
10 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" 10 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h"
11 #include "android_webview/common/aw_switches.h"
11 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" 12 #include "android_webview/lib/aw_browser_dependency_factory_impl.h"
12 #include "android_webview/native/aw_geolocation_permission_context.h" 13 #include "android_webview/native/aw_geolocation_permission_context.h"
13 #include "android_webview/native/aw_quota_manager_bridge_impl.h" 14 #include "android_webview/native/aw_quota_manager_bridge_impl.h"
14 #include "android_webview/native/aw_web_contents_view_delegate.h" 15 #include "android_webview/native/aw_web_contents_view_delegate.h"
15 #include "android_webview/native/aw_web_preferences_populater_impl.h" 16 #include "android_webview/native/aw_web_preferences_populater_impl.h"
16 #include "android_webview/renderer/aw_content_renderer_client.h" 17 #include "android_webview/renderer/aw_content_renderer_client.h"
17 #include "base/command_line.h" 18 #include "base/command_line.h"
18 #include "base/lazy_instance.h" 19 #include "base/lazy_instance.h"
19 #include "base/logging.h" 20 #include "base/logging.h"
20 #include "base/memory/scoped_ptr.h" 21 #include "base/memory/scoped_ptr.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 cl->AppendSwitch(cc::switches::kEnableMapImage); 60 cl->AppendSwitch(cc::switches::kEnableMapImage);
60 61
61 // WebView uses the Android system's scrollbars and overscroll glow. 62 // WebView uses the Android system's scrollbars and overscroll glow.
62 cl->AppendSwitch(switches::kHideScrollbars); 63 cl->AppendSwitch(switches::kHideScrollbars);
63 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); 64 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect);
64 65
65 // Not yet supported in single-process mode. 66 // Not yet supported in single-process mode.
66 cl->AppendSwitch(switches::kDisableExperimentalWebGL); 67 cl->AppendSwitch(switches::kDisableExperimentalWebGL);
67 cl->AppendSwitch(switches::kDisableSharedWorkers); 68 cl->AppendSwitch(switches::kDisableSharedWorkers);
68 69
69 // Ganesh backed 2D-Canvas is not yet working and causes crashes. 70 // Ganesh backed 2D-Canvas integration is being implemented but not ready to
70 cl->AppendSwitch(switches::kDisableAccelerated2dCanvas); 71 // be turned on by default yet.
72 if (!cl->HasSwitch(switches::kEnableAccelerated2dCanvas))
73 cl->AppendSwitch(switches::kDisableAccelerated2dCanvas);
71 74
72 // File system API not supported (requires some new API; internal bug 6930981) 75 // File system API not supported (requires some new API; internal bug 6930981)
73 cl->AppendSwitch(switches::kDisableFileSystem); 76 cl->AppendSwitch(switches::kDisableFileSystem);
74 77
75 // Disable compositor touch hit testing for now to mitigate risk of bugs. 78 // Disable compositor touch hit testing for now to mitigate risk of bugs.
76 cl->AppendSwitch(cc::switches::kDisableCompositorTouchHitTesting); 79 cl->AppendSwitch(cc::switches::kDisableCompositorTouchHitTesting);
77 80
78 // Disable WebRTC. 81 // Disable WebRTC.
79 cl->AppendSwitch(switches::kDisableWebRTC); 82 cl->AppendSwitch(switches::kDisableWebRTC);
80 83
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( 146 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate(
144 content::WebContents* web_contents) { 147 content::WebContents* web_contents) {
145 return AwWebContentsViewDelegate::Create(web_contents); 148 return AwWebContentsViewDelegate::Create(web_contents);
146 } 149 }
147 150
148 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() { 151 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() {
149 return new AwWebPreferencesPopulaterImpl(); 152 return new AwWebPreferencesPopulaterImpl();
150 } 153 }
151 154
152 } // namespace android_webview 155 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698