NEW 114496
[Texmap] Remove unnecessary TiledBackingStore code.
https://bugs.webkit.org/show_bug.cgi?id=114496
Summary [Texmap] Remove unnecessary TiledBackingStore code.
JungJik Lee
Reported 2013-04-12 00:40:38 PDT
TBS removes tiles outside m_rect in resizeEdgeTiles function. However before calling resizeEdgeTiles, setKeepRect does same thing. In setKeepRect, TBS remove tiles outside keepRect. And m_rect includes m_keepRect. So TBS does same thing twice. I think that it is better to remove the unnecessary code in resizeEdgeTiles.
Attachments
ProposedPatch (2.20 KB, patch)
2013-04-12 01:04 PDT, JungJik Lee
no flags
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2 (855.52 KB, application/zip)
2013-04-12 05:41 PDT, Build Bot
no flags
Patch (2.38 KB, patch)
2013-04-13 00:11 PDT, JungJik Lee
jturcotte: review-
jturcotte: commit-queue-
JungJik Lee
Comment 1 2013-04-12 00:49:05 PDT
(In reply to comment #0) > TBS removes tiles outside m_rect in resizeEdgeTiles function. > However before calling resizeEdgeTiles, setKeepRect does same thing. > In setKeepRect, TBS remove tiles outside keepRect. And m_rect includes m_keepRect. So TBS does same thing twice. I think that it is better to remove the unnecessary code in resizeEdgeTiles. I understood wrongly. Removing tiles in resizeEdgeTiles is not working currently, not doing same thing twice. I'll file a removing patch.
JungJik Lee
Comment 2 2013-04-12 01:04:17 PDT
Created attachment 197729 [details] ProposedPatch
Build Bot
Comment 3 2013-04-12 05:41:36 PDT
Comment on attachment 197729 [details] ProposedPatch Attachment 197729 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/131023 New failing tests: fast/repaint/japanese-rl-selection-repaint-in-regions.html
Build Bot
Comment 4 2013-04-12 05:41:38 PDT
Created attachment 197750 [details] Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-11 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.2
JungJik Lee
Comment 5 2013-04-13 00:11:00 PDT
JungJik Lee
Comment 6 2013-04-13 00:21:03 PDT
(In reply to comment #5) > Created an attachment (id=197921) [details] > Patch I think it's not the failure of the layout test owing of this patch. I filled the patch again.
Jocelyn Turcotte
Comment 7 2013-04-15 04:37:53 PDT
Comment on attachment 197921 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=197921&action=review > Source/WebCore/platform/graphics/TiledBackingStore.cpp:447 > IntRect expectedTileRect = tileRectForCoordinate(tileCoordinate); The return value of tileRectForCoordinate is intersected with m_rect while, as best as I can read the code, m_keepRect isn't. This means that if the page's content size is shrunk, your patch wouldn't remove tiles that fall outside the new content rect anymore since setKeepRect doesn't handle this case. I have to admit that TiledBackingStore is very badly tested and for this reason, unless there is great gain in doing this kind of lossy refactoring, the risk is usually not worth it. r- assuming that what I'm saying is correct. Let me know if you think I'm missing something.
JungJik Lee
Comment 8 2013-04-15 05:18:27 PDT
Comment on attachment 197921 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=197921&action=review >> Source/WebCore/platform/graphics/TiledBackingStore.cpp:447 >> IntRect expectedTileRect = tileRectForCoordinate(tileCoordinate); > > The return value of tileRectForCoordinate is intersected with m_rect while, as best as I can read the code, m_keepRect isn't. > This means that if the page's content size is shrunk, your patch wouldn't remove tiles that fall outside the new content rect anymore since setKeepRect doesn't handle this case. > > I have to admit that TiledBackingStore is very badly tested and for this reason, unless there is great gain in doing this kind of lossy refactoring, the risk is usually not worth it. > > r- assuming that what I'm saying is correct. Let me know if you think I'm missing something. if the page's content size is shrunk, m_keepRect will also be shrunk, because keepRect is intersected with m_rect at last in computeCoverAndKeepRect. so I think setKeepRect will handle the case before calling resizeEdgeTiles. And I understood it's not easy to test TiledBackingStore. However In mobile platform, we can get lot's of gain by adjusting the TBS drawing area. Maybe this refactoring does not help to gain the performance. I'm still think the redundant code is unnecessary.
Note You need to log in before you can comment on or make changes to this bug.