diff options
author | boliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 22:50:01 +0000 |
---|---|---|
committer | boliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 22:50:01 +0000 |
commit | 56aca707d0ad5ace8c5513dae5e31f964ad8f8be (patch) | |
tree | 914281fe049f47c5c3a2abb77d6815d269a13598 /android_webview/lib/main/aw_main_delegate.cc | |
parent | e842c17b0d0aaf1b389f56c7e12c0fff4b3b10bb (diff) | |
download | chromium_src-56aca707d0ad5ace8c5513dae5e31f964ad8f8be.zip chromium_src-56aca707d0ad5ace8c5513dae5e31f964ad8f8be.tar.gz chromium_src-56aca707d0ad5ace8c5513dae5e31f964ad8f8be.tar.bz2 |
[Android WebView] Turn on accelerated canvas based on View.isHardwareAccelerated
In onAttachedToWindow, check that if the view is hardware accelerated,
then enable hardware accelerated 2d canvas. Similarly disable canvas on
detach.
Note that accelerated 2d canvas is still off by default, but this patch
adds a command line switch to turn it on.
BUG=332273
Review URL: https://codereview.chromium.org/140753006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245648 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/lib/main/aw_main_delegate.cc')
-rw-r--r-- | android_webview/lib/main/aw_main_delegate.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc index 5b79eb6..a172b86 100644 --- a/android_webview/lib/main/aw_main_delegate.cc +++ b/android_webview/lib/main/aw_main_delegate.cc @@ -8,6 +8,7 @@ #include "android_webview/browser/gpu_memory_buffer_factory_impl.h" #include "android_webview/browser/in_process_view_renderer.h" #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" +#include "android_webview/common/aw_switches.h" #include "android_webview/lib/aw_browser_dependency_factory_impl.h" #include "android_webview/native/aw_geolocation_permission_context.h" #include "android_webview/native/aw_quota_manager_bridge_impl.h" @@ -66,8 +67,10 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) { cl->AppendSwitch(switches::kDisableExperimentalWebGL); cl->AppendSwitch(switches::kDisableSharedWorkers); - // Ganesh backed 2D-Canvas is not yet working and causes crashes. - cl->AppendSwitch(switches::kDisableAccelerated2dCanvas); + // Ganesh backed 2D-Canvas integration is being implemented but not ready to + // be turned on by default yet. + if (!cl->HasSwitch(switches::kEnableAccelerated2dCanvas)) + cl->AppendSwitch(switches::kDisableAccelerated2dCanvas); // File system API not supported (requires some new API; internal bug 6930981) cl->AppendSwitch(switches::kDisableFileSystem); |