Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Unified Diff: cc/managed_memory_policy.h

Issue 11637022: Send memory management policies to the tile manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix clang build Created 7 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layer_tree_host_impl.cc ('k') | cc/managed_memory_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/managed_memory_policy.h
diff --git a/cc/managed_memory_policy.h b/cc/managed_memory_policy.h
index 83769372b40ccdf28491755811a97c6b18a01111..00b42efeb7782453ef7ca1810c7fe198309e0d90 100644
--- a/cc/managed_memory_policy.h
+++ b/cc/managed_memory_policy.h
@@ -7,22 +7,33 @@
#include "base/basictypes.h"
#include "cc/cc_export.h"
+#include "cc/tile_priority.h"
namespace cc {
struct CC_EXPORT ManagedMemoryPolicy {
+ enum PriorityCutoff {
+ CUTOFF_ALLOW_NOTHING,
+ CUTOFF_ALLOW_REQUIRED_ONLY,
+ CUTOFF_ALLOW_NICE_TO_HAVE,
+ CUTOFF_ALLOW_EVERYTHING,
+ };
+
ManagedMemoryPolicy(size_t bytesLimitWhenVisible);
ManagedMemoryPolicy(size_t bytesLimitWhenVisible,
- int priorityCutoffWhenVisible,
+ PriorityCutoff priorityCutoffWhenVisible,
size_t bytesLimitWhenNotVisible,
- int priorityCutoffWhenNotVisible);
+ PriorityCutoff priorityCutoffWhenNotVisible);
bool operator==(const ManagedMemoryPolicy&) const;
bool operator!=(const ManagedMemoryPolicy&) const;
size_t bytesLimitWhenVisible;
- int priorityCutoffWhenVisible;
+ PriorityCutoff priorityCutoffWhenVisible;
size_t bytesLimitWhenNotVisible;
- int priorityCutoffWhenNotVisible;
+ PriorityCutoff priorityCutoffWhenNotVisible;
+
+ static int priorityCutoffToValue(PriorityCutoff priorityCutoff);
+ static TileMemoryLimitPolicy priorityCutoffToTileMemoryLimitPolicy(PriorityCutoff priorityCutoff);
};
} // namespace cc
« no previous file with comments | « cc/layer_tree_host_impl.cc ('k') | cc/managed_memory_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698