summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-06-04 00:48:50 -0700
committerJohn Reck <jreck@google.com>2011-06-04 19:52:34 -0700
commitdfadaafc15c16563aba837f05c778eaa2a433a8b (patch)
tree9802c1cedfe29a2f744d2231af513bd340844e8b /Source/WebKit/android/jni
parentc58299cfe8df6665721cf3a40601d1abca35229e (diff)
downloadexternal_webkit-dfadaafc15c16563aba837f05c778eaa2a433a8b.zip
external_webkit-dfadaafc15c16563aba837f05c778eaa2a433a8b.tar.gz
external_webkit-dfadaafc15c16563aba837f05c778eaa2a433a8b.tar.bz2
Fix issues with setting viewstate before initializing
Allow drawing without a CachedRoot (just skip drawing extras in that case) Initialize PictureSet correctly when using the SkPicture ctor If delay-setting a layer on glWebViewState, set isAfterFirstLayout to true to force the baseLayer update. Change-Id: I9b24fd2e8450acf0138433edce8700c9ec227e52
Diffstat (limited to 'Source/WebKit/android/jni')
-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;