Smoother scrolling by preparing offscreen tiles (credit: Ben Murdoch)
Change-Id: If8f6aa38174e742e869bce7144de8db84b2f7150
This commit is contained in:
@ -8145,6 +8145,15 @@ public class WebView extends AbsoluteLayout
|
|||||||
nativeDraw(canvas, 0, 0, false);
|
nativeDraw(canvas, 0, 0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable expanded tiles bound for smoother scrolling.
|
||||||
|
*
|
||||||
|
* @hide only used by the Browser
|
||||||
|
*/
|
||||||
|
public void setExpandedTileBounds(boolean enabled) {
|
||||||
|
mWebViewCore.sendMessage(EventHub.SET_EXPANDED_TILE_BOUNDS, enabled ? 1 : 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the time to wait between passing touches to WebCore. See also the
|
* Set the time to wait between passing touches to WebCore. See also the
|
||||||
* TOUCH_SENT_INTERVAL member for further discussion.
|
* TOUCH_SENT_INTERVAL member for further discussion.
|
||||||
|
@ -578,6 +578,8 @@ final class WebViewCore {
|
|||||||
|
|
||||||
private native void nativeSetJsFlags(String flags);
|
private native void nativeSetJsFlags(String flags);
|
||||||
|
|
||||||
|
private native void nativeSetExpandedTileBounds(boolean enabled);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete text from start to end in the focused textfield. If there is no
|
* Delete text from start to end in the focused textfield. If there is no
|
||||||
* focus, or if start == end, silently fail. If start and end are out of
|
* focus, or if start == end, silently fail. If start and end are out of
|
||||||
@ -999,6 +1001,8 @@ final class WebViewCore {
|
|||||||
|
|
||||||
static final int PROXY_CHANGED = 193;
|
static final int PROXY_CHANGED = 193;
|
||||||
|
|
||||||
|
static final int SET_EXPANDED_TILE_BOUNDS = 194;
|
||||||
|
|
||||||
// private message ids
|
// private message ids
|
||||||
private static final int DESTROY = 200;
|
private static final int DESTROY = 200;
|
||||||
|
|
||||||
@ -1558,6 +1562,10 @@ final class WebViewCore {
|
|||||||
mWebView.mPrivateHandler.obtainMessage(WebView.AUTOFILL_COMPLETE, null)
|
mWebView.mPrivateHandler.obtainMessage(WebView.AUTOFILL_COMPLETE, null)
|
||||||
.sendToTarget();
|
.sendToTarget();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EventHub.SET_EXPANDED_TILE_BOUNDS:
|
||||||
|
nativeSetExpandedTileBounds(msg.arg1 == 1);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user