Summary: | [Chromium] Ganesh's Texture Cache is too small | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jeff Timanus <twiz> | ||||
Component: | Canvas | Assignee: | Jeff Timanus <twiz> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bsalomon, mdelaney7, nduca, senorblanco, vangelis, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Jeff Timanus
2012-01-19 14:47:31 PST
Created attachment 123201 [details]
Patch
Comment on attachment 123201 [details]
Patch
I would feel more comfortable increasing the cache size if we were able to clear the cache when a tab is hidden like we do for the compositor. In order to do that we may need to switch to using a shared graphics context per webview instead of renderer process or track how many tabs the renderer is dealing with and flush the cache when they are all hidden.
Alternatively, would it be possible to age textures in the cache so that we only evict ones that haven't been used for a while and use this texture limit as a soft limit that can be exceeded if more space is needed to keep the contents of a single frame?
Longer term we need to have a better strategy for doing global tracking of memory like nduca@ suggests.
(In reply to comment #2) > (From update of attachment 123201 [details]) > I would feel more comfortable increasing the cache size if we were able to clear the cache when a tab is hidden like we do for the compositor. In order to do that we may need to switch to using a shared graphics context per webview instead of renderer process or track how many tabs the renderer is dealing with and flush the cache when they are all hidden. > > Alternatively, would it be possible to age textures in the cache so that we only evict ones that haven't been used for a while and use this texture limit as a soft limit that can be exceeded if more space is needed to keep the contents of a single frame? > > Longer term we need to have a better strategy for doing global tracking of memory like nduca@ suggests. We could make the cache size be a hard limit but periodically walk the cache and purge anything that hasn't been used in a while even when we are under-budget. Comment on attachment 123201 [details]
Patch
From the discussion we had offline today, I think we should let this patch through.
The plan is to introduce the capability of explicitly purging the Ganesh texture cache when all of the tabs associated with a render process have been backgrounded/hidden.
Can a reviewer please have a look at this change, and mark it cq+? Comment on attachment 123201 [details]
Patch
OK. r=me
Comment on attachment 123201 [details] Patch Clearing flags on attachment: 123201 Committed r106164: <http://trac.webkit.org/changeset/106164> All reviewed patches have been landed. Closing bug. |