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

Unified Diff: cc/output/managed_memory_policy.cc

Issue 577643002: Making OutputSurface a begin frame source and vsync source. (Closed)
Patch Set: Created 6 years, 3 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/output/managed_memory_policy.h ('k') | cc/output/output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/managed_memory_policy.cc
diff --git a/cc/output/managed_memory_policy.cc b/cc/output/managed_memory_policy.cc
index 049d2b03f9fcd14768e830c1c931d9a90ffc74da..79b94c3318dbce7c279f4f2b498c68ba93e1f45b 100644
--- a/cc/output/managed_memory_policy.cc
+++ b/cc/output/managed_memory_policy.cc
@@ -77,4 +77,27 @@ ManagedMemoryPolicy::PriorityCutoffToTileMemoryLimitPolicy(
return ALLOW_NOTHING;
}
+void ManagedMemoryPolicy::AsValueInto(base::debug::TracedValue* dict) const {
+ dict->SetString("type", "ManagedMemoryPolicy");
+ dict->SetInteger("kDefaultNumResourcesLimit", kDefaultNumResourcesLimit);
+ dict->SetInteger("bytes_limit_when_visible", bytes_limit_when_visible);
+ switch (priority_cutoff_when_visible) {
+ case MemoryAllocation::CUTOFF_ALLOW_NOTHING:
+ dict->SetString("prority_cutoff_when_visible", "CUTOFF_ALLOW_NOTHING");
+ break;
+ case MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY:
+ dict->SetString("prority_cutoff_when_visible",
+ "CUTOFF_ALLOW_REQUIRED_ONLY");
+ break;
+ case MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE:
+ dict->SetString("prority_cutoff_when_visible",
+ "CUTOFF_ALLOW_NICE_TO_HAVE");
+ break;
+ case MemoryAllocation::CUTOFF_ALLOW_EVERYTHING:
+ dict->SetString("prority_cutoff_when_visible", "CUTOFF_ALLOW_EVERYTHING");
+ break;
+ }
+ dict->SetInteger("num_resources_limit", num_resources_limit);
+}
+
} // namespace cc
« no previous file with comments | « cc/output/managed_memory_policy.h ('k') | cc/output/output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698