OSDN Git Service

Add API for WebView OffscreenPreRaster setting.
authorHui Shu <hush@google.com>
Tue, 3 Mar 2015 19:38:41 +0000 (11:38 -0800)
committerHui Shu <hush@google.com>
Thu, 12 Mar 2015 23:04:07 +0000 (16:04 -0700)
BUG: 19592029
Change-Id: Ic903b823e5f7830e2cf2d4f3dd9a5458334648a3

api/current.txt
api/system-current.txt
core/java/android/webkit/WebSettings.java

index 00afda2..5c7b6c6 100644 (file)
@@ -36940,6 +36940,7 @@ package android.webkit {
     method public abstract int getMinimumFontSize();
     method public abstract int getMinimumLogicalFontSize();
     method public abstract int getMixedContentMode();
+    method public abstract boolean getOffscreenPreRaster();
     method public abstract deprecated android.webkit.WebSettings.PluginState getPluginState();
     method public abstract java.lang.String getSansSerifFontFamily();
     method public abstract boolean getSaveFormData();
@@ -36986,6 +36987,7 @@ package android.webkit {
     method public abstract void setMinimumLogicalFontSize(int);
     method public abstract void setMixedContentMode(int);
     method public abstract void setNeedInitialFocus(boolean);
+    method public abstract void setOffscreenPreRaster(boolean);
     method public abstract deprecated void setPluginState(android.webkit.WebSettings.PluginState);
     method public abstract deprecated void setRenderPriority(android.webkit.WebSettings.RenderPriority);
     method public abstract void setSansSerifFontFamily(java.lang.String);
index 4992d8d..b335299 100644 (file)
@@ -30893,8 +30893,8 @@ package android.telecom {
     method public void unregisterPhoneAccount(android.telecom.PhoneAccountHandle);
     field public static final java.lang.String ACTION_CHANGE_PHONE_ACCOUNTS = "android.telecom.action.CHANGE_PHONE_ACCOUNTS";
     field public static final java.lang.String ACTION_CONNECTION_SERVICE_CONFIGURE = "android.telecom.action.CONNECTION_SERVICE_CONFIGURE";
-    field public static final java.lang.String ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS = "android.telecom.action.SHOW_CALL_ACCESSIBILITY_SETTINGS";
     field public static final java.lang.String ACTION_PHONE_ACCOUNT_REGISTERED = "android.telecom.action.PHONE_ACCOUNT_REGISTERED";
+    field public static final java.lang.String ACTION_SHOW_CALL_ACCESSIBILITY_SETTINGS = "android.telecom.action.SHOW_CALL_ACCESSIBILITY_SETTINGS";
     field public static final java.lang.String ACTION_SHOW_CALL_SETTINGS = "android.telecom.action.SHOW_CALL_SETTINGS";
     field public static final java.lang.String ACTION_SHOW_RESPOND_VIA_SMS_SETTINGS = "android.telecom.action.SHOW_RESPOND_VIA_SMS_SETTINGS";
     field public static final char DTMF_CHARACTER_PAUSE = 44; // 0x002c ','
@@ -39165,6 +39165,7 @@ package android.webkit {
     method public abstract int getMinimumLogicalFontSize();
     method public abstract int getMixedContentMode();
     method public abstract deprecated boolean getNavDump();
+    method public abstract boolean getOffscreenPreRaster();
     method public abstract deprecated android.webkit.WebSettings.PluginState getPluginState();
     method public abstract deprecated boolean getPluginsEnabled();
     method public abstract java.lang.String getSansSerifFontFamily();
@@ -39217,6 +39218,7 @@ package android.webkit {
     method public abstract void setMixedContentMode(int);
     method public abstract deprecated void setNavDump(boolean);
     method public abstract void setNeedInitialFocus(boolean);
+    method public abstract void setOffscreenPreRaster(boolean);
     method public abstract deprecated void setPluginState(android.webkit.WebSettings.PluginState);
     method public abstract deprecated void setPluginsEnabled(boolean);
     method public abstract deprecated void setRenderPriority(android.webkit.WebSettings.RenderPriority);
index 1d2c311..c06175e 100644 (file)
@@ -1330,4 +1330,25 @@ public abstract class WebSettings {
      */
     @SystemApi
     public abstract boolean getVideoOverlayForEmbeddedEncryptedVideoEnabled();
+
+    /**
+     * Sets whether this WebView should raster tiles when it is
+     * offscreen but attached to a window. Turning this on can avoid
+     * rendering artifacts when animating an offscreen WebView on-screen.
+     * Offscreen WebViews in this mode use more memory. The default value is
+     * false.
+     * Please follow these guidelines to limit memory usage:
+     * - WebView size should be not be larger than the device screen size.
+     * - Limit use of this mode to a small number of WebViews. Use it for
+     *   visible WebViews and WebViews about to be animated to visible.
+     */
+    public abstract void setOffscreenPreRaster(boolean enabled);
+
+    /**
+     * Gets whether this WebView should raster tiles when it is
+     * offscreen but attached to a window.
+     * @return true if this WebView will raster tiles when it is
+     * offscreen but attached to a window.
+     */
+    public abstract boolean getOffscreenPreRaster();
 }