summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/android
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-11-10 12:31:44 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-11-10 12:31:44 -0800
commit4b2ef0f288e7c6c4602f621b7a0e9feed304b70e (patch)
tree7d9cc1b60be8b1b75e916252e8b54217e2735447 /WebCore/platform/android
parentaf1255496788b347a21a5db0e63c011c992c83b8 (diff)
parent025ac4e283bb4b48f580d48541224e3996dc6f84 (diff)
downloadexternal_webkit-4b2ef0f288e7c6c4602f621b7a0e9feed304b70e.zip
external_webkit-4b2ef0f288e7c6c4602f621b7a0e9feed304b70e.tar.gz
external_webkit-4b2ef0f288e7c6c4602f621b7a0e9feed304b70e.tar.bz2
Merge change I3a493eb3 into eclair-mr2
* changes: capture offscreen invalidates in webkit
Diffstat (limited to 'WebCore/platform/android')
-rw-r--r--WebCore/platform/android/ScrollViewAndroid.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/WebCore/platform/android/ScrollViewAndroid.cpp b/WebCore/platform/android/ScrollViewAndroid.cpp
index 274c04f..9149deb 100644
--- a/WebCore/platform/android/ScrollViewAndroid.cpp
+++ b/WebCore/platform/android/ScrollViewAndroid.cpp
@@ -30,6 +30,7 @@
#include "FloatRect.h"
#include "FrameView.h"
#include "IntRect.h"
+#include "SkRegion.h"
#include "WebCoreFrameBridge.h"
#include "WebCoreViewBridge.h"
#include "WebViewCore.h"
@@ -96,9 +97,20 @@ void ScrollView::platformRepaintContentRectangle(const IntRect &rect, bool now)
}
#ifdef ANDROID_CAPTURE_OFFSCREEN_PAINTS
-void ScrollView::platformOffscreenContentRectangle(const IntRect& rect)
+/*
+ Compute the offscreen parts of the drawn rectangle by subtracting
+ vis from rect. This can compute up to four rectangular slices.
+*/
+void ScrollView::platformOffscreenContentRectangle(const IntRect& vis,
+ const IntRect& rect)
{
- android::WebViewCore::getWebViewCore(this)->offInvalidate(rect);
+ SkRegion rectRgn = SkRegion(rect);
+ rectRgn.op(vis, SkRegion::kDifference_Op);
+ SkRegion::Iterator iter(rectRgn);
+ for (; !iter.done(); iter.next()) {
+ const SkIRect& diff = iter.rect();
+ android::WebViewCore::getWebViewCore(this)->offInvalidate(diff);
+ }
}
#endif