summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2011-10-11 15:44:00 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-10-11 15:44:00 -0700
commit7aaeb23810a4a680d3009c26c67d5520af918900 (patch)
treef265c980d009f5cfef9c7001892878f2a27f72a7
parented563485f68022dd4d6000ae7256e763100a565f (diff)
parentd253060c6edf139871ea630f884cc6631a162854 (diff)
downloadexternal_webkit-7aaeb23810a4a680d3009c26c67d5520af918900.zip
external_webkit-7aaeb23810a4a680d3009c26c67d5520af918900.tar.gz
external_webkit-7aaeb23810a4a680d3009c26c67d5520af918900.tar.bz2
am d253060c: Merge "Fix repaint bug. In some cases when the content size changes, the inval rects we receive from webkit do not fully cover the area that changed. For now, fix this by forcing the invalidation of the entire content (note: we only invalidate the tiles -
* commit 'd253060c6edf139871ea630f884cc6631a162854': Fix repaint bug. In some cases when the content size changes, the inval rects we receive from webkit do not fully cover the area that changed. For now, fix this by forcing the invalidation of the entire content (note: we only invalidate the tiles -- we do not force an actual regeneration of the pictureset for the entire content)
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index 17a8bc5..134408a 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -675,6 +675,13 @@ void WebViewCore::recordPictureSet(PictureSet* content)
if (cacheBuilder().pictureSetDisabled())
content->clear();
+#if USE(ACCELERATED_COMPOSITING)
+ // Detects if the content size has changed
+ bool contentSizeChanged = false;
+ if (content->width() != width || content->height() != height)
+ contentSizeChanged = true;
+#endif
+
content->setDimensions(width, height, &m_addInval);
// Add the current inval rects to the PictureSet, and rebuild it.
@@ -694,8 +701,25 @@ void WebViewCore::recordPictureSet(PictureSet* content)
m_addInval.setRect(r);
}
+ // Rebuild the pictureset (webkit repaint)
rebuildPictureSet(content);
+#if USE(ACCELERATED_COMPOSITING)
+ // We repainted the pictureset, but the invals are not always correct when
+ // the content size did change. For now, let's just reset the
+ // inval we will pass to the UI so that it invalidates the entire
+ // content -- tiles will be marked dirty and will have to be repainted.
+ // FIXME: the webkit invals ought to have been enough...
+ if (contentSizeChanged) {
+ SkIRect r;
+ r.fLeft = 0;
+ r.fTop = 0;
+ r.fRight = width;
+ r.fBottom = height;
+ m_addInval.setRect(r);
+ }
+#endif
+
} // WebViewCoreRecordTimeCounter
WebCore::Node* oldFocusNode = currentFocus();