[chromium] Recycle tile-sized textures during commit to prevent reallocations
https://bugs.webkit.org/show_bug.cgi?id=70645

Patch by Grace Kloba <[email protected]> on 2011-12-02
Reviewed by James Robinson.

Currently texture request is capped by the high limit while we reclaim the
textures in each commit. This triggers new tiles always allocated when scrolling.
The proposal is to recycle the texture during request if the total used memory
is about to exceed the reclaim limit.

* platform/graphics/chromium/ManagedTexture.cpp:
(WebCore::ManagedTexture::reserve):
* platform/graphics/chromium/TextureManager.cpp:
(WebCore::TextureManager::setMemoryLimitBytes):
(WebCore::TextureManager::replaceTexture):
(WebCore::TextureManager::requestTexture):
* platform/graphics/chromium/TextureManager.h:

git-svn-id: svn://svn.chromium.org/blink/trunk@101854 bbb929c8-8fbe-4397-9dbb-9b2b20218538
4 files changed
tree: c43df9c3185fd4fc2d4ae7915056ee29910c4ff6
  1. third_party/