Chromium Code Reviews| Index: android_webview/native/aw_settings.cc |
| diff --git a/android_webview/native/aw_settings.cc b/android_webview/native/aw_settings.cc |
| index 0a1312d6ec34ecccc65a359548e3240994a0f3c2..9ca7e6d8e39152acac33fbbe16623e191e00a7c5 100644 |
| --- a/android_webview/native/aw_settings.cc |
| +++ b/android_webview/native/aw_settings.cc |
| @@ -8,12 +8,14 @@ |
| #include "android_webview/native/aw_contents.h" |
| #include "base/android/jni_android.h" |
| #include "base/android/jni_string.h" |
| +#include "base/command_line.h" |
| #include "base/supports_user_data.h" |
| #include "content/public/browser/navigation_controller.h" |
| #include "content/public/browser/navigation_entry.h" |
| #include "content/public/browser/render_view_host.h" |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/common/content_client.h" |
| +#include "content/public/common/content_switches.h" |
| #include "jni/AwSettings_jni.h" |
| #include "webkit/common/user_agent/user_agent.h" |
| #include "webkit/common/webpreferences.h" |
| @@ -312,6 +314,11 @@ void AwSettings::PopulateWebPreferences(WebPreferences* web_prefs) { |
| Java_AwSettings_getPasswordEchoEnabledLocked(env, obj); |
| web_prefs->spatial_navigation_enabled = |
| Java_AwSettings_getSpatialNavigationLocked(env, obj); |
| + |
| + web_prefs->accelerated_2d_canvas_enabled = |
| + !CommandLine::ForCurrentProcess()->HasSwitch( |
|
mnaganov (inactive)
2014/01/17 09:56:22
I don't really like checking the command line on e
boliu
2014/01/17 14:58:49
I guess that's the right tradeoff. Added an instan
|
| + switches::kDisableAccelerated2dCanvas) && |
| + Java_AwSettings_getEnableSupportedHardwareAcceleratedFeatures(env, obj); |
| } |
| static jlong Init(JNIEnv* env, |