Bug 73344 - [chromium] TextureManager LRU list is not fully honor the order tiles are used
Summary: [chromium] TextureManager LRU list is not fully honor the order tiles are used
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Grace Kloba
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 11:28 PST by Grace Kloba
Modified: 2011-11-30 18:49 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.10 KB, patch)
2011-11-29 15:03 PST, Grace Kloba
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grace Kloba 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.
Comment 1 Grace Kloba 2011-11-29 15:03:17 PST
Created attachment 117052 [details]
Patch
Comment 2 James Robinson 2011-11-29 16:50:18 PST
Comment on attachment 117052 [details]
Patch

Looks reasonable, although a test would be nice. Enne?
Comment 3 Adrienne Walker 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.
Comment 4 James Robinson 2011-11-30 16:34:08 PST
Comment on attachment 117052 [details]
Patch

R=me then
Comment 5 James Robinson 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 :/
Comment 6 WebKit Review Bot 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>
Comment 7 WebKit Review Bot 2011-11-30 18:49:10 PST
All reviewed patches have been landed.  Closing bug.