summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-01-11 13:33:45 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-01-11 13:33:45 -0800
commit9cb81f0f8da25a16b61bdd8241ee7170608ab9e8 (patch)
treeddd9cf45c1bad6c0886031332cf14640a7b8820d
parentf6eccb799100e9b8b94bd9e9e33b8a30e63b32f8 (diff)
parentb627d5bd0e9b9a4d02131ef694467bfb62b9fb7f (diff)
downloadexternal_webkit-9cb81f0f8da25a16b61bdd8241ee7170608ab9e8.zip
external_webkit-9cb81f0f8da25a16b61bdd8241ee7170608ab9e8.tar.gz
external_webkit-9cb81f0f8da25a16b61bdd8241ee7170608ab9e8.tar.bz2
am b627d5bd: Fully invalidate the pictureset when content size changes
* commit 'b627d5bd0e9b9a4d02131ef694467bfb62b9fb7f': Fully invalidate the pictureset when content size changes
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp35
1 files changed, 14 insertions, 21 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index b998e99..1e406b1 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -673,10 +673,20 @@ void WebViewCore::recordPictureSet(PictureSet* content)
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;
+ // The invals are not always correct when the content size has changed. For
+ // now, let's just reset the inval so that it invalidates the entire content
+ // -- the pictureset will be fully repainted, tiles will be marked dirty and
+ // will have to be repainted.
+
+ // FIXME: the webkit invals ought to have been enough...
+ if (content->width() != width || content->height() != height) {
+ SkIRect r;
+ r.fLeft = 0;
+ r.fTop = 0;
+ r.fRight = width;
+ r.fBottom = height;
+ m_addInval.setRect(r);
+ }
#endif
content->setDimensions(width, height, &m_addInval);
@@ -700,23 +710,6 @@ void WebViewCore::recordPictureSet(PictureSet* content)
// 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();