summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-11-10 09:20:02 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-11-10 09:20:02 -0800
commit9074815a647bc5401963370e16b71e758fc3f550 (patch)
treed4da4ec201cb32f66cc71ecaa56e5df6c3af717b /Source/WebKit/android
parent20f46fec910aa17f0c59a1fe69348bf271afbf44 (diff)
parentd355e69574bd6cae6a03fbfeee0c7da61aa7a98c (diff)
downloadexternal_webkit-9074815a647bc5401963370e16b71e758fc3f550.zip
external_webkit-9074815a647bc5401963370e16b71e758fc3f550.tar.gz
external_webkit-9074815a647bc5401963370e16b71e758fc3f550.tar.bz2
Merge "Support pausing drawing" into ics-mr1
Diffstat (limited to 'Source/WebKit/android')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 60bdd3e..d852790 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -204,6 +204,7 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl, WTF::String drawableDir)
m_ringAnimationEnd = 0;
m_baseLayer = 0;
m_glDrawFunctor = 0;
+ m_isDrawingPaused = false;
m_buttonSkin = drawableDir.isEmpty() ? 0 : new RenderSkinButton(drawableDir);
#if USE(ACCELERATED_COMPOSITING)
m_glWebViewState = 0;
@@ -542,7 +543,7 @@ bool drawGL(WebCore::IntRect& viewRect, WebCore::IntRect* invalRect, WebCore::In
}
}
if (ret || m_glWebViewState->currentPictureCounter() != pic)
- return true;
+ return !m_isDrawingPaused;
#endif
return false;
}
@@ -1544,6 +1545,7 @@ BaseLayerAndroid* getBaseLayer() {
return m_baseLayer;
}
+ bool m_isDrawingPaused;
private: // local state for WebView
// private to getFrameCache(); other functions operate in a different thread
CachedRoot* m_frameCacheUI; // navigation data ready for use
@@ -2703,6 +2705,12 @@ static int nativeGetBackgroundColor(JNIEnv* env, jobject obj)
return SK_ColorWHITE;
}
+static void nativeSetPauseDrawing(JNIEnv *env, jobject obj, jint nativeView,
+ jboolean pause)
+{
+ ((WebView*)nativeView)->m_isDrawingPaused = pause;
+}
+
/*
* JNI registration
*/
@@ -2915,6 +2923,8 @@ static JNINativeMethod gJavaWebViewMethods[] = {
(void*) nativeGetProperty },
{ "nativeOnTrimMemory", "(I)V",
(void*) nativeOnTrimMemory },
+ { "nativeSetPauseDrawing", "(IZ)V",
+ (void*) nativeSetPauseDrawing },
};
int registerWebView(JNIEnv* env)