RESOLVED FIXED 79787
Do not iterate all tiles for resizing when the content didn't change
https://bugs.webkit.org/show_bug.cgi?id=79787
Summary Do not iterate all tiles for resizing when the content didn't change
Kenneth Rohde Christiansen
Reported 2012-02-28 07:12:14 PST
SSIA
Attachments
Patch (1.76 KB, patch)
2012-02-28 07:13 PST, Kenneth Rohde Christiansen
no flags
Patch (2.30 KB, patch)
2012-02-28 08:43 PST, Kenneth Rohde Christiansen
no flags
Patch (2.29 KB, patch)
2012-02-28 08:44 PST, Kenneth Rohde Christiansen
no flags
Patch (2.71 KB, patch)
2012-02-29 01:33 PST, Kenneth Rohde Christiansen
hausmann: review+
Kenneth Rohde Christiansen
Comment 1 2012-02-28 07:13:28 PST
Jocelyn Turcotte
Comment 2 2012-02-28 07:34:48 PST
Comment on attachment 129243 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=129243&action=review > Source/WebCore/platform/graphics/TiledBackingStore.cpp:241 > + if (visibleRect != m_previousVisibleRect) > + didResizeTiles = resizeEdgeTiles(); m_visibleRect and m_previousVisibleRect are both set in coverWithTilesIfNeeded, and then the creation timer is started. So in most case they will be equal and this code will never run, unless the visible rect changed between the timer start and fire which is unlikely.
Jocelyn Turcotte
Comment 3 2012-02-28 07:37:30 PST
(In reply to comment #2) Err, I mean the value of visibleContentsRect() instead of m_visibleRect.
Kenneth Rohde Christiansen
Comment 4 2012-02-28 07:39:50 PST
(In reply to comment #2) > (From update of attachment 129243 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=129243&action=review > > > Source/WebCore/platform/graphics/TiledBackingStore.cpp:241 > > + if (visibleRect != m_previousVisibleRect) > > + didResizeTiles = resizeEdgeTiles(); > > m_visibleRect and m_previousVisibleRect are both set in coverWithTilesIfNeeded, and then the creation timer is started. > So in most case they will be equal and this code will never run, unless the visible rect changed between the timer start and fire which is unlikely. This method (createTiles) is also called as a result of viewport change, which means that they are different.
Noam Rosenthal
Comment 5 2012-02-28 07:41:41 PST
Comment on attachment 129243 [details] Patch I believe this code makes inappropriate use of m_previousVisibleRect.
Kenneth Rohde Christiansen
Comment 6 2012-02-28 07:45:14 PST
Comment on attachment 129243 [details] Patch I need coffee :-) This is wrong!
Kenneth Rohde Christiansen
Comment 7 2012-02-28 08:43:00 PST
Kenneth Rohde Christiansen
Comment 8 2012-02-28 08:44:15 PST
Jocelyn Turcotte
Comment 9 2012-02-28 10:00:08 PST
Comment on attachment 129265 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=129265&action=review > Source/WebCore/platform/graphics/TiledBackingStore.cpp:236 > + const IntRect& visibleRect = visibleContentsRect(); Is it OK to use a reference here? > Source/WebCore/platform/graphics/TiledBackingStore.cpp:246 > + if (contentsSize != m_previousContentsSize) m_previousContentsSize is never assigned, so this patch doesn't do much, unless I'm missing something :/
Noam Rosenthal
Comment 10 2012-02-28 10:02:07 PST
Comment on attachment 129265 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=129265&action=review r- based on jocelyn's comments. >> Source/WebCore/platform/graphics/TiledBackingStore.cpp:236 >> + const IntRect& visibleRect = visibleContentsRect(); > > Is it OK to use a reference here? I think it doesn't add much to use references. Let's use regular assignment.
Kenneth Rohde Christiansen
Comment 11 2012-02-29 01:07:45 PST
(In reply to comment #9) > (From update of attachment 129265 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=129265&action=review > > > Source/WebCore/platform/graphics/TiledBackingStore.cpp:236 > > + const IntRect& visibleRect = visibleContentsRect(); > > Is it OK to use a reference here? > > > Source/WebCore/platform/graphics/TiledBackingStore.cpp:246 > > + if (contentsSize != m_previousContentsSize) > > m_previousContentsSize is never assigned, so this patch doesn't do much, unless I'm missing something :/ I guess my brain wasn't working correctly yesterday. I ofcourse meant to assign it just as we do with the visible rect
Kenneth Rohde Christiansen
Comment 12 2012-02-29 01:33:30 PST
Simon Hausmann
Comment 13 2012-02-29 03:05:29 PST
Comment on attachment 129414 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=129414&action=review > Source/WebCore/ChangeLog:3 > + Do not interate all tiles for resizing when the content didn't change Interate looks like a typo :)
Kenneth Rohde Christiansen
Comment 14 2012-02-29 09:02:11 PST
Landed in 109219.
Note You need to log in before you can comment on or make changes to this bug.