summaryrefslogtreecommitdiffstats
path: root/Source/WebKit
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-08-01 13:44:44 -0700
committerChris Craik <ccraik@google.com>2011-08-02 16:48:44 -0700
commitaf33356e96e56310c66b47b6db913e1a61981ca3 (patch)
treec9f98c22fc76dd567deb3b96726eddf8fa44ef65 /Source/WebKit
parentd4f990572c3485cdc15cff48c3bedc6e7cad809b (diff)
downloadexternal_webkit-af33356e96e56310c66b47b6db913e1a61981ca3.zip
external_webkit-af33356e96e56310c66b47b6db913e1a61981ca3.tar.gz
external_webkit-af33356e96e56310c66b47b6db913e1a61981ca3.tar.bz2
Support registering page swap callback, content inval
bug:5062896 Depends on the following frameworks/base change: https://android-git.corp.google.com/g/#change,124879 a WebView may now register a page swap callback and content invalidate to benchmark tile rendering performance Change-Id: I97f6ed05cff12b11266a472163aab1f3b3ddc87e
Diffstat (limited to 'Source/WebKit')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 69d1ee8..eb7562a 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -1449,6 +1449,11 @@ static void copyScrollPositionRecursive(const LayerAndroid* from,
}
#endif
+void registerPageSwapCallback()
+{
+ m_pageSwapCallbackRegistered = true;
+}
+
void setBaseLayer(BaseLayerAndroid* layer, SkRegion& inval, bool showVisualIndicator,
bool isPictureAfterFirstLayout, bool registerPageSwapCallback)
{
@@ -2456,6 +2461,11 @@ static void nativeSetSelectionPointer(JNIEnv *env, jobject obj, jboolean set,
GET_NATIVE_VIEW(env, obj)->setSelectionPointer(set, scale, x, y);
}
+static void nativeRegisterPageSwapCallback(JNIEnv *env, jobject obj)
+{
+ GET_NATIVE_VIEW(env, obj)->registerPageSwapCallback();
+}
+
static void nativeTileProfilingStart(JNIEnv *env, jobject obj)
{
TilesManager::instance()->getProfiler()->start();
@@ -2786,6 +2796,8 @@ static JNINativeMethod gJavaWebViewMethods[] = {
(void*) nativeSetSelectionPointer },
{ "nativeShowCursorTimed", "()V",
(void*) nativeShowCursorTimed },
+ { "nativeRegisterPageSwapCallback", "()V",
+ (void*) nativeRegisterPageSwapCallback },
{ "nativeTileProfilingStart", "()V",
(void*) nativeTileProfilingStart },
{ "nativeTileProfilingStop", "()F",