diff options
author | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-22 22:50:28 +0000 |
---|---|---|
committer | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-22 22:50:28 +0000 |
commit | a0a008420151bf3f117f294250e35641af25f213 (patch) | |
tree | 7cd0378a4d4b0570d1654a695b97c0957568aff6 /cc/renderer.h | |
parent | 6c12c50736a7f2cce5d8776c9d64b85e3435aec6 (diff) | |
download | chromium_src-a0a008420151bf3f117f294250e35641af25f213.zip chromium_src-a0a008420151bf3f117f294250e35641af25f213.tar.gz chromium_src-a0a008420151bf3f117f294250e35641af25f213.tar.bz2 |
Conditionalize memory allocation limit based on visibility
Replace the single value with a ManagedMemoryPolicy structure
which has the limit in bytes when visible and when not visible,
and also has a priority cutoff when visible and when not visible.
In CCRendererClient, separate the methods for specifying and
enforcing a memory policy. This is so that one may decrease the
consumption of a renderer that has grown over time, without
disallowing growth in the future.
BUG=134750
Review URL: https://chromiumcodereview.appspot.com/11196038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163420 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/renderer.h')
-rw-r--r-- | cc/renderer.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cc/renderer.h b/cc/renderer.h index 6ac38e2..a1cb51d 100644 --- a/cc/renderer.h +++ b/cc/renderer.h @@ -6,6 +6,7 @@ #define CCRenderer_h #include "CCLayerTreeHost.h" +#include "managed_memory_policy.h" #include "FloatQuad.h" #include "base/basictypes.h" #include "cc/render_pass.h" @@ -21,7 +22,8 @@ public: virtual void didLoseContext() = 0; virtual void onSwapBuffersComplete() = 0; virtual void setFullRootLayerDamage() = 0; - virtual void setMemoryAllocationLimitBytes(size_t) = 0; + virtual void setManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; + virtual void enforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) = 0; protected: virtual ~CCRendererClient() { } }; |