summaryrefslogtreecommitdiffstats
path: root/chrome/common/mru_cache.h
diff options
context:
space:
mode:
authoriyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 05:30:12 +0000
committeriyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 05:30:12 +0000
commitec7dc1160836695462ee7311d4c02f2c2f61350e (patch)
tree9fb3d234403ee1b52ca24f603dbedede952a4948 /chrome/common/mru_cache.h
parente5d478012a5ee0765d35fd62e5090d07f5ae7dde (diff)
downloadchromium_src-ec7dc1160836695462ee7311d4c02f2c2f61350e.zip
chromium_src-ec7dc1160836695462ee7311d4c02f2c2f61350e.tar.gz
chromium_src-ec7dc1160836695462ee7311d4c02f2c2f61350e.tar.bz2
This fixes http://b/issue?id=1257424, which is a need to implement a global backing store cache. The current backing store cache is only used for invisible tabs and every other RenderWidgetHost holds a reference to its backing store.
This CB proposes a change where in we have a global backing store cache, whose size can be controlled based on strategies like available resources etc. At this point the strategy is not implemented and the size is left at 5. We no longer maintain a reference to the backing store in the RenderWidgetHost. Every host queries the global cache for its backing store. The cache provides methods to create the backing store and populate it with the required dib. The other change is to use the renderer dib when the size of the bitmap being painted is the same as the backing store size. This is an attempt to improve performance in operations like scrolling. Bug=1257424 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@422 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/mru_cache.h')
-rw-r--r--chrome/common/mru_cache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/common/mru_cache.h b/chrome/common/mru_cache.h
index 93f8059..cdad761 100644
--- a/chrome/common/mru_cache.h
+++ b/chrome/common/mru_cache.h
@@ -186,6 +186,8 @@ class MRUCacheBase {
reverse_iterator rend() { return ordering_.rend(); }
const_reverse_iterator rend() const { return ordering_.rend(); }
+ bool empty() const { return ordering_.empty(); }
+
private:
PayloadList ordering_;
KeyIndex index_;