summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/android/ScrollViewAndroid.cpp
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2010-08-24 10:52:43 -0400
committerCary Clark <cary@android.com>2010-08-24 15:33:14 -0400
commit016ea440f1b61a966483fc809a078dd28b784e46 (patch)
tree07052cb749cb1352f7b27e13a17cd7f4f6244463 /WebCore/platform/android/ScrollViewAndroid.cpp
parentc570a147a94b126d4172c30914f53dea17b4c8f5 (diff)
downloadexternal_webkit-016ea440f1b61a966483fc809a078dd28b784e46.zip
external_webkit-016ea440f1b61a966483fc809a078dd28b784e46.tar.gz
external_webkit-016ea440f1b61a966483fc809a078dd28b784e46.tar.bz2
communicate drawing pause to webkit to pause gif animation
Gif frames continue even if the webkit changes aren't drawn. When we suspend drawing, suspend the gif animation as well. This is accomplished by fooling webkit into thinking the browser window is offscreen. When the webkit drawing is resumed, invalidate the entire content so the gif animations start up once more. requires companion change in frameworks/base Change-Id: I78846214048b038cd8d0401dad103d451cd5a269 http://b/2621902
Diffstat (limited to 'WebCore/platform/android/ScrollViewAndroid.cpp')
-rw-r--r--WebCore/platform/android/ScrollViewAndroid.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/WebCore/platform/android/ScrollViewAndroid.cpp b/WebCore/platform/android/ScrollViewAndroid.cpp
index dec3183..aefa64a 100644
--- a/WebCore/platform/android/ScrollViewAndroid.cpp
+++ b/WebCore/platform/android/ScrollViewAndroid.cpp
@@ -141,4 +141,12 @@ void ScrollView::platformOffscreenContentRectangle(const IntRect& vis, const Int
}
#endif
+bool ScrollView::platformIsOffscreen() const
+{
+ /* other platforms override platformIsOffscreen when the browser
+ window is no longer on screen. We override it to prevent gif
+ animations from queuing up subsequent frames during dragging. */
+ return android::WebViewCore::getWebViewCore(this)->drawIsPaused();
+}
+
} // namespace WebCore