summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni/PictureSet.h
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-03-01 10:44:32 -0800
committerJohn Reck <jreck@google.com>2012-03-01 11:20:41 -0800
commit64e00f75f6cec2df7f1e0f80ba1bb9b833379bd4 (patch)
tree055cac6bacc7621e3216045eb9bf212e1c6eb5a1 /Source/WebKit/android/jni/PictureSet.h
parent0104dd8872053465f6c61881d447239223832be0 (diff)
downloadexternal_webkit-64e00f75f6cec2df7f1e0f80ba1bb9b833379bd4.zip
external_webkit-64e00f75f6cec2df7f1e0f80ba1bb9b833379bd4.tar.gz
external_webkit-64e00f75f6cec2df7f1e0f80ba1bb9b833379bd4.tar.bz2
Minor cleanup in PictureSet
Remove unused variable from add() Switch mArea from SkRegion to SkIRect (we only ever used the region's bounds) Restrict draw's inval checking to within content rect - prevents an issue where after scaling/transforms the canvas clip can end up slightly negative, which results in drawing all the pictures in the list even if we only need to draw a partial inval Change-Id: Ie6e06437af2e326ee7d9286db65858d8886ec15d
Diffstat (limited to 'Source/WebKit/android/jni/PictureSet.h')
-rw-r--r--Source/WebKit/android/jni/PictureSet.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/WebKit/android/jni/PictureSet.h b/Source/WebKit/android/jni/PictureSet.h
index 97d91e0..1d9a14d 100644
--- a/Source/WebKit/android/jni/PictureSet.h
+++ b/Source/WebKit/android/jni/PictureSet.h
@@ -83,8 +83,7 @@ namespace android {
void splitAdd(const SkIRect& rect);
#endif
- void add(const SkRegion& area, SkPicture* picture,
- uint32_t elapsed, bool split);
+ void add(const SkRegion& area, uint32_t elapsed, bool split);
// Update mWidth/mHeight, and adds any additional inval region
void setDimensions(int width, int height, SkRegion* inval = 0);
@@ -97,11 +96,9 @@ namespace android {
#ifdef FAST_PICTURESET
#else
- void add(const SkRegion& area, SkPicture* picture,
- uint32_t elapsed, bool split, bool empty);
+ void add(const SkIRect& area, uint32_t elapsed, bool split, bool empty);
const SkIRect& bounds(size_t i) const {
- return mPictures[i].mArea.getBounds(); }
- bool reuseSubdivided(const SkRegion& );
+ return mPictures[i].mArea; }
void setPicture(size_t i, SkPicture* p);
void setDrawTimes(const PictureSet& );
size_t size() const { return mPictures.size(); }
@@ -123,7 +120,7 @@ namespace android {
int mBucketCountY;
#else
struct Pictures {
- SkRegion mArea;
+ SkIRect mArea;
SkPicture* mPicture;
SkIRect mUnsplit;
uint32_t mElapsed;