• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

external/webkit


Commit MetaInfo

Revisionb627d5bd0e9b9a4d02131ef694467bfb62b9fb7f (tree)
Time2012-01-11 08:22:35
AuthorChris Craik <ccraik@goog...>
CommiterChris Craik

Log Message

Fully invalidate the pictureset when content size changes

bug:5759299

Webkit invals aren't correct when the content size changes (even simply growing
vertically), for now just repaint from scratch in that case.

Change-Id: I408b289bfee1139d6c8f3c7babd963d217cb5bc0

Change Summary

Incremental Difference

--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -673,10 +673,20 @@ void WebViewCore::recordPictureSet(PictureSet* content)
673673 content->clear();
674674
675675 #if USE(ACCELERATED_COMPOSITING)
676- // Detects if the content size has changed
677- bool contentSizeChanged = false;
678- if (content->width() != width || content->height() != height)
679- contentSizeChanged = true;
676+ // The invals are not always correct when the content size has changed. For
677+ // now, let's just reset the inval so that it invalidates the entire content
678+ // -- the pictureset will be fully repainted, tiles will be marked dirty and
679+ // will have to be repainted.
680+
681+ // FIXME: the webkit invals ought to have been enough...
682+ if (content->width() != width || content->height() != height) {
683+ SkIRect r;
684+ r.fLeft = 0;
685+ r.fTop = 0;
686+ r.fRight = width;
687+ r.fBottom = height;
688+ m_addInval.setRect(r);
689+ }
680690 #endif
681691
682692 content->setDimensions(width, height, &m_addInval);
@@ -700,23 +710,6 @@ void WebViewCore::recordPictureSet(PictureSet* content)
700710
701711 // Rebuild the pictureset (webkit repaint)
702712 rebuildPictureSet(content);
703-
704-#if USE(ACCELERATED_COMPOSITING)
705- // We repainted the pictureset, but the invals are not always correct when
706- // the content size did change. For now, let's just reset the
707- // inval we will pass to the UI so that it invalidates the entire
708- // content -- tiles will be marked dirty and will have to be repainted.
709- // FIXME: the webkit invals ought to have been enough...
710- if (contentSizeChanged) {
711- SkIRect r;
712- r.fLeft = 0;
713- r.fTop = 0;
714- r.fRight = width;
715- r.fBottom = height;
716- m_addInval.setRect(r);
717- }
718-#endif
719-
720713 } // WebViewCoreRecordTimeCounter
721714
722715 WebCore::Node* oldFocusNode = currentFocus();