diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2011-09-22 15:34:29 -0700 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2011-09-23 14:26:00 -0700 |
commit | 85de57ad68c831729ebc46b87548ddb1e92ab6a5 (patch) | |
tree | 179e0a0cf8394f23471ec5978f90653d274cf84f /src/com/android/browser | |
parent | 4bc6db35eafbb6f961c6bb08639c0dc211b6419c (diff) | |
download | packages_apps_Browser-85de57ad68c831729ebc46b87548ddb1e92ab6a5.zip packages_apps_Browser-85de57ad68c831729ebc46b87548ddb1e92ab6a5.tar.gz packages_apps_Browser-85de57ad68c831729ebc46b87548ddb1e92ab6a5.tar.bz2 |
UI for switching texture upload mode
For browser, default will be CPU upload until bug 5334978 fix.
bug:5347539
The webkit part is in
https://android-git.corp.google.com/g/#/c/137610/
Change-Id: Iec3a100dc142b28e54145f08a5c76210f8634cba
Diffstat (limited to 'src/com/android/browser')
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 10 | ||||
-rw-r--r-- | src/com/android/browser/PreferenceKeys.java | 1 | ||||
-rw-r--r-- | src/com/android/browser/WebViewProperties.java | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index cfaa18a..2c0b2ec 100644 --- a/src/com/android/browser/BrowserSettings.java +++ b/src/com/android/browser/BrowserSettings.java @@ -268,6 +268,9 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener, settings.setProperty(WebViewProperties.gfxInvertedScreenContrast, Float.toString(getInvertedContrast())); + + settings.setProperty(WebViewProperties.gfxEnableCpuUploadPath, + enableCpuUploadPath() ? "true" : "false"); } /** @@ -672,6 +675,13 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener, return mPrefs.getBoolean(PREF_ENABLE_VISUAL_INDICATOR, false); } + public boolean enableCpuUploadPath() { + if (!isDebugEnabled()) { + return true; + } + return mPrefs.getBoolean(PREF_ENABLE_CPU_UPLOAD_PATH, true); + } + public boolean enableJavascriptConsole() { if (!isDebugEnabled()) { return false; diff --git a/src/com/android/browser/PreferenceKeys.java b/src/com/android/browser/PreferenceKeys.java index f3da937..89fcbfc 100644 --- a/src/com/android/browser/PreferenceKeys.java +++ b/src/com/android/browser/PreferenceKeys.java @@ -68,6 +68,7 @@ public interface PreferenceKeys { static final String PREF_ENABLE_NAV_DUMP = "enable_nav_dump"; static final String PREF_ENABLE_TRACING = "enable_tracing"; static final String PREF_ENABLE_VISUAL_INDICATOR = "enable_visual_indicator"; + static final String PREF_ENABLE_CPU_UPLOAD_PATH = "enable_cpu_upload_path"; static final String PREF_JAVASCRIPT_CONSOLE = "javascript_console"; static final String PREF_JS_ENGINE_FLAGS = "js_engine_flags"; static final String PREF_NORMAL_LAYOUT = "normal_layout"; diff --git a/src/com/android/browser/WebViewProperties.java b/src/com/android/browser/WebViewProperties.java index 9a656d7..c410038 100644 --- a/src/com/android/browser/WebViewProperties.java +++ b/src/com/android/browser/WebViewProperties.java @@ -18,4 +18,5 @@ package com.android.browser; public interface WebViewProperties { static final String gfxInvertedScreen = "inverted"; static final String gfxInvertedScreenContrast = "inverted_contrast"; + static final String gfxEnableCpuUploadPath = "enable_cpu_upload_path"; } |