summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2010-03-19 13:26:35 -0400
committerMike Reed <reed@google.com>2010-03-19 15:50:35 -0400
commitb1767e30bfb2da61d9ac83dd2d9963045232acb6 (patch)
tree52c56ee6bdb3f9ffb7be8297bb453d3a47317701 /WebKit
parente8e125506184d70116d3a16023a64d9ed4953196 (diff)
downloadexternal_webkit-b1767e30bfb2da61d9ac83dd2d9963045232acb6.zip
external_webkit-b1767e30bfb2da61d9ac83dd2d9963045232acb6.tar.gz
external_webkit-b1767e30bfb2da61d9ac83dd2d9963045232acb6.tar.bz2
use picture recording flag to speed up clipPath (and avoid asserts in very large edgelists)
override (and no-op) clipPath() in IsEmptyCanvas, same reasons as above. Change-Id: I70b1565a11c1e314fdde507c1b2118b9aba651e6
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/jni/PictureSet.cpp8
-rw-r--r--WebKit/android/jni/WebViewCore.cpp2
2 files changed, 8 insertions, 2 deletions
diff --git a/WebKit/android/jni/PictureSet.cpp b/WebKit/android/jni/PictureSet.cpp
index 22f57a3..55d36b4 100644
--- a/WebKit/android/jni/PictureSet.cpp
+++ b/WebKit/android/jni/PictureSet.cpp
@@ -355,7 +355,13 @@ public:
mEmpty = false;
mPicture->abortPlayback();
}
-
+
+ virtual bool clipPath(const SkPath&, SkRegion::Op) {
+ // this can be expensive to actually do, and doesn't affect the
+ // question of emptiness, so we make it a no-op
+ return true;
+ }
+
virtual void commonDrawBitmap(const SkBitmap& bitmap,
const SkMatrix& , const SkPaint& ) {
if (bitmap.width() <= 1 || bitmap.height() <= 1)
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 529f1d6..a0e4642 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -787,7 +787,7 @@ SkPicture* WebViewCore::rebuildPicture(const SkIRect& inval)
int width = view->contentsWidth();
int height = view->contentsHeight();
SkPicture* picture = new SkPicture();
- SkAutoPictureRecord arp(picture, width, height);
+ SkAutoPictureRecord arp(picture, width, height, PICT_RECORD_FLAGS);
SkAutoMemoryUsageProbe mup(__FUNCTION__);
SkCanvas* recordingCanvas = arp.getRecordingCanvas();