Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7c7e566 authored by Hui Shu's avatar Hui Shu Committed by Android (Google) Code Review
Browse files

Merge "Add API for WebView OffscreenPreRaster setting."

parents e72dca49 b1ee70b1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -37035,6 +37035,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();
@@ -37081,6 +37082,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);
+2 −0
Original line number Diff line number Diff line
@@ -39266,6 +39266,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();
@@ -39318,6 +39319,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);
+21 −0
Original line number Diff line number Diff line
@@ -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();
}