summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2011-07-29 12:34:50 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-29 12:34:50 -0700
commit3eee18782bb578265a87b400bcc2341a5777d887 (patch)
tree9a198e034583d8d7ee652917bf6bc10f11cb3d1a
parent41de3848279b856c181609fb4d7599466e4cd695 (diff)
parent31adf671737521438499be855043296f33e1c3a6 (diff)
downloadpackages_apps_Browser-3eee18782bb578265a87b400bcc2341a5777d887.zip
packages_apps_Browser-3eee18782bb578265a87b400bcc2341a5777d887.tar.gz
packages_apps_Browser-3eee18782bb578265a87b400bcc2341a5777d887.tar.bz2
Merge "Add a runtime switch between Raster and Ganesh rendering modes."
-rw-r--r--res/values/strings.xml2
-rw-r--r--res/xml/debug_preferences.xml9
-rw-r--r--src/com/android/browser/BrowserSettings.java8
-rw-r--r--src/com/android/browser/PreferenceKeys.java1
4 files changed, 18 insertions, 2 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6c1b102..56152da 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -567,6 +567,8 @@
<!-- Do not tranlsate. Development option -->
<string name="pref_development_hardware_accel" translatable="false">Enable OpenGL Rendering</string>
<!-- Do not tranlsate. Development option -->
+ <string name="pref_development_hardware_accel_skia" translatable="false">Enable HW Accelerated Skia</string>
+ <!-- Do not tranlsate. Development option -->
<string name="pref_development_visual_indicator" translatable="false">Enable Visual Indicator</string>
<!-- Do not tranlsate. Development option -->
<string name="js_engine_flags" translatable="false">Set JS flags</string>
diff --git a/res/xml/debug_preferences.xml b/res/xml/debug_preferences.xml
index 1fc4f4c..2d15ab2 100644
--- a/res/xml/debug_preferences.xml
+++ b/res/xml/debug_preferences.xml
@@ -22,6 +22,11 @@
android:defaultValue="true"
android:title="@string/pref_development_hardware_accel" />
+ <CheckBoxPreference
+ android:key="enable_hardware_accel_skia"
+ android:defaultValue="false"
+ android:title="@string/pref_development_hardware_accel_skia" />
+
<ListPreference
android:key="user_agent"
android:title="@string/pref_development_uastring"
@@ -29,13 +34,13 @@
android:entryValues="@array/pref_development_ua_values"
android:defaultValue="0"/>
- <!-- The javascript console is enabled by default when the user has
- also enabled debug mode by navigating to about:debug. -->
<CheckBoxPreference
android:key="enable_visual_indicator"
android:defaultValue="false"
android:title="@string/pref_development_visual_indicator" />
+ <!-- The javascript console is enabled by default when the user has
+ also enabled debug mode by navigating to about:debug. -->
<CheckBoxPreference
android:key="javascript_console"
android:defaultValue="true"
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 39abf33..cb86c42 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -224,6 +224,7 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener,
settings.setJavaScriptEnabled(enableJavascript());
settings.setLightTouchEnabled(enableLightTouch());
settings.setNavDump(enableNavDump());
+ settings.setHardwareAccelSkiaEnabled(isSkiaHardwareAccelerated());
settings.setShowVisualIndicator(enableVisualIndicator());
settings.setDefaultTextEncodingName(getDefaultTextEncoding());
settings.setDefaultZoom(getDefaultZoom());
@@ -629,6 +630,13 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener,
return mPrefs.getBoolean(PREF_ENABLE_HARDWARE_ACCEL, true);
}
+ public boolean isSkiaHardwareAccelerated() {
+ if (!isDebugEnabled()) {
+ return false;
+ }
+ return mPrefs.getBoolean(PREF_ENABLE_HARDWARE_ACCEL_SKIA, false);
+ }
+
public int getUserAgent() {
if (!isDebugEnabled()) {
return 0;
diff --git a/src/com/android/browser/PreferenceKeys.java b/src/com/android/browser/PreferenceKeys.java
index ce8ec9f..65218e5 100644
--- a/src/com/android/browser/PreferenceKeys.java
+++ b/src/com/android/browser/PreferenceKeys.java
@@ -48,6 +48,7 @@ public interface PreferenceKeys {
// Keys for debug_preferences.xml
// ----------------------
static final String PREF_ENABLE_HARDWARE_ACCEL = "enable_hardware_accel";
+ static final String PREF_ENABLE_HARDWARE_ACCEL_SKIA = "enable_hardware_accel_skia";
static final String PREF_USER_AGENT = "user_agent";
// ----------------------