summaryrefslogtreecommitdiffstats
path: root/core/java/android/webkit/WebView.java
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-07-28 15:39:43 -0700
committerChris Craik <ccraik@google.com>2011-08-02 16:47:21 -0700
commit555c55ed65056e2236430f92e81c1fb6acd05dcd (patch)
tree6764ebe79aaa1e431d8aa7c4347176cc4333d08e /core/java/android/webkit/WebView.java
parent00451ed2d1f21945766bc0c59e762ef39cb391b8 (diff)
downloadframeworks_base-555c55ed65056e2236430f92e81c1fb6acd05dcd.zip
frameworks_base-555c55ed65056e2236430f92e81c1fb6acd05dcd.tar.gz
frameworks_base-555c55ed65056e2236430f92e81c1fb6acd05dcd.tar.bz2
Added automated performance test to TileBenchmark
bug:5062896 Depends on external/webkit change: https://android-git.corp.google.com/g/#change,125566 Loads pages from SD card, and scrolls through them reporting results. Added contentInvalidateAll hidden WebView method, and made pageSwapCallback extensible. Change-Id: I9f7377aad6fd7c101177dde552a72357c8b4e400
Diffstat (limited to 'core/java/android/webkit/WebView.java')
-rw-r--r--core/java/android/webkit/WebView.java25
1 files changed, 18 insertions, 7 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index f4fd551..7620a63 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -8405,9 +8405,9 @@ public class WebView extends AbsoluteLayout
}
}
- // Called by JNI to invalidate the View, given rectangle coordinates in
- // content space
- private void pageSwapCallback() {
+ /** @hide Called by JNI when pages are swapped (only occurs with hardware
+ * acceleration) */
+ protected void pageSwapCallback() {
if (inEditingMode()) {
didUpdateWebTextViewDimensions(ANYWHERE);
}
@@ -8426,11 +8426,11 @@ public class WebView extends AbsoluteLayout
WebViewCore.ViewState viewState = draw.mViewState;
boolean isPictureAfterFirstLayout = viewState != null;
- // Request a callback on pageSwap (to reposition the webtextview)
- boolean registerPageSwapCallback =
- !mZoomManager.isFixedLengthAnimationInProgress() && inEditingMode();
-
if (updateBaseLayer) {
+ // Request a callback on pageSwap (to reposition the webtextview)
+ boolean registerPageSwapCallback =
+ !mZoomManager.isFixedLengthAnimationInProgress() && inEditingMode();
+
setBaseLayer(draw.mBaseLayer, draw.mInvalRegion,
getSettings().getShowVisualIndicator(),
isPictureAfterFirstLayout, registerPageSwapCallback);
@@ -9084,6 +9084,16 @@ public class WebView extends AbsoluteLayout
}
}
+ /** @hide send content invalidate */
+ protected void contentInvalidateAll() {
+ mWebViewCore.sendMessage(EventHub.CONTENT_INVALIDATE_ALL);
+ }
+
+ /** @hide call pageSwapCallback upon next page swap */
+ protected void registerPageSwapCallback() {
+ nativeRegisterPageSwapCallback();
+ }
+
/**
* Begin collecting per-tile profiling data
*
@@ -9245,6 +9255,7 @@ public class WebView extends AbsoluteLayout
private native void nativeStopGL();
private native Rect nativeSubtractLayers(Rect content);
private native int nativeTextGeneration();
+ private native void nativeRegisterPageSwapCallback();
private native void nativeTileProfilingStart();
private native float nativeTileProfilingStop();
private native void nativeTileProfilingClear();