summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni/PictureSet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android/jni/PictureSet.cpp')
-rw-r--r--Source/WebKit/android/jni/PictureSet.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/WebKit/android/jni/PictureSet.cpp b/Source/WebKit/android/jni/PictureSet.cpp
index 181256c..98d7438 100644
--- a/Source/WebKit/android/jni/PictureSet.cpp
+++ b/Source/WebKit/android/jni/PictureSet.cpp
@@ -83,13 +83,19 @@ PictureSet::PictureSet()
PictureSet::PictureSet(SkPicture* picture)
{
- if (!picture)
+ mBaseArea = mAdditionalArea = 0;
+ if (!picture) {
+ mWidth = mHeight = 0;
return;
+ }
+ mWidth = picture->width();
+ mHeight = picture->height();
+ mBaseArea = mWidth * mHeight;
Pictures pictureAndBounds;
pictureAndBounds.mPicture = picture;
SkSafeRef(pictureAndBounds.mPicture);
pictureAndBounds.mEmpty = false;
- pictureAndBounds.mArea.setRect(0, 0, picture->width(), picture->height());
+ pictureAndBounds.mArea.setRect(0, 0, mWidth, mHeight);
pictureAndBounds.mSplit = false;
pictureAndBounds.mBase = true;
pictureAndBounds.mElapsed = 0;