RESOLVED FIXED73344
[chromium] TextureManager LRU list is not fully honor the order tiles are used
https://bugs.webkit.org/show_bug.cgi?id=73344
Summary [chromium] TextureManager LRU list is not fully honor the order tiles are used
Grace Kloba
Reported 2011-11-29 11:28:01 PST
Currently TextureManager moves a texture to the end of the list if hasTexture() is called. In the threaded compositing mode, TiledLayerChromium maintains a HashMap of tiles. In TiledLayerChromium::pushPropertiesTo(), it walks through all the tiles in the HashMap and check whether they are valid which calls hasTexture(). This means the order in the TextureManager's LRU list is affected by the order of the tile in the TiledLayerChromium's HashMap. e.g. when a page is scrolled down, we expect the furthest from the new revealed tiles will be reclaimed. Currently some tile in the middle can be reclaimed. The proposed fix is to only move a texture to the end of the list if protectTexture() is called.
Attachments
Patch (2.10 KB, patch)
2011-11-29 15:03 PST, Grace Kloba
no flags
Grace Kloba
Comment 1 2011-11-29 15:03:17 PST
James Robinson
Comment 2 2011-11-29 16:50:18 PST
Comment on attachment 117052 [details] Patch Looks reasonable, although a test would be nice. Enne?
Adrienne Walker
Comment 3 2011-11-30 11:42:07 PST
This seems like a great change. That would certainly explain the "MRU"-like behavior that we've sometimes seen when scrolling.
James Robinson
Comment 4 2011-11-30 16:34:08 PST
Comment on attachment 117052 [details] Patch R=me then
James Robinson
Comment 5 2011-11-30 16:34:59 PST
Also if someone is feeling really ambitious and wants to write some unit tests for TextureManager's LRU-ness that would be awesome. I probably should have done this ages ago, but haven't got around to it :/
WebKit Review Bot
Comment 6 2011-11-30 18:49:05 PST
Comment on attachment 117052 [details] Patch Clearing flags on attachment: 117052 Committed r101586: <http://trac.webkit.org/changeset/101586>
WebKit Review Bot
Comment 7 2011-11-30 18:49:10 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.