Bug 75632 - [Chromium] Avoid unnecessary TextureManager::reduceMemoryToLimit()
Summary: [Chromium] Avoid unnecessary TextureManager::reduceMemoryToLimit()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Xianzhu Wang
URL:
Keywords:
Depends on:
Blocks: 72078
  Show dependency treegraph
 
Reported: 2012-01-05 10:49 PST by Xianzhu Wang
Modified: 2012-01-09 12:17 PST (History)
5 users (show)

See Also:


Attachments
patch (updated based on the patch in bug 72078) (26.87 KB, patch)
2012-01-05 17:13 PST, Xianzhu Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xianzhu Wang 2012-01-05 10:49:08 PST
(Split from bug 72078)

Unnecessary TextureManager::reduceMemoryToLimit() will cause some tile textures that are required soon to be unnecessarily removed/replaced, when required texture memory is higher than the reclaim limit but lower than the absolute limit. This will and degrade performance, sometimes significantly.

For example, CCLayerTreeHost::setViewport will be called during scrolling. The original code would call TextureManager::reduceMemoryToLimit(), causing some textures unnecessarily discarded and then recreated repeatedly during scrolling.

It's also unnecessary to call TextureManager::reduceMemoryToLimit() from TextureManager::setPreferredMemoryLimitBytes() because the limit is not a hard limit. The callers should call reduceMemoryToLimit() explicitly if it wants it when setting the preferred memory limit.
Comment 1 Xianzhu Wang 2012-01-05 17:13:48 PST
Created attachment 121372 [details]
patch (updated based on the patch in bug 72078)
Comment 2 Adrienne Walker 2012-01-06 13:33:14 PST
Nice catch.  Calling reduceMemoryToLimit when setting limits really seems like the wrong thing to be doing.
Comment 3 James Robinson 2012-01-06 17:54:27 PST
Comment on attachment 121372 [details]
patch (updated based on the patch in bug 72078)

R=me, great tests! Set cq? when you're ready for this to land.
Comment 4 Xianzhu Wang 2012-01-09 09:51:27 PST
Comment on attachment 121372 [details]
patch (updated based on the patch in bug 72078)

Thanks for review. Try to cq+ by myself.
Comment 5 WebKit Review Bot 2012-01-09 12:16:59 PST
Comment on attachment 121372 [details]
patch (updated based on the patch in bug 72078)

Clearing flags on attachment: 121372

Committed r104474: <http://trac.webkit.org/changeset/104474>
Comment 6 WebKit Review Bot 2012-01-09 12:17:04 PST
All reviewed patches have been landed.  Closing bug.