(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.
Created attachment 121372 [details] patch (updated based on the patch in bug 72078)
Nice catch. Calling reduceMemoryToLimit when setting limits really seems like the wrong thing to be doing.
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 on attachment 121372 [details] patch (updated based on the patch in bug 72078) Thanks for review. Try to cq+ by myself.
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>
All reviewed patches have been landed. Closing bug.