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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/output/managed_memory_policy.h" 5 #include "cc/output/managed_memory_policy.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/resources/priority_calculator.h" 8 #include "cc/resources/priority_calculator.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return ALLOW_ABSOLUTE_MINIMUM; 70 return ALLOW_ABSOLUTE_MINIMUM;
71 case MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE: 71 case MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE:
72 return ALLOW_PREPAINT_ONLY; 72 return ALLOW_PREPAINT_ONLY;
73 case MemoryAllocation::CUTOFF_ALLOW_EVERYTHING: 73 case MemoryAllocation::CUTOFF_ALLOW_EVERYTHING:
74 return ALLOW_ANYTHING; 74 return ALLOW_ANYTHING;
75 } 75 }
76 NOTREACHED(); 76 NOTREACHED();
77 return ALLOW_NOTHING; 77 return ALLOW_NOTHING;
78 } 78 }
79 79
80 void ManagedMemoryPolicy::AsValueInto(base::debug::TracedValue* dict) const {
81 dict->SetString("type", "ManagedMemoryPolicy");
82 dict->SetInteger("kDefaultNumResourcesLimit", kDefaultNumResourcesLimit);
83 dict->SetInteger("bytes_limit_when_visible", bytes_limit_when_visible);
84 switch (priority_cutoff_when_visible) {
85 case MemoryAllocation::CUTOFF_ALLOW_NOTHING:
86 dict->SetString("prority_cutoff_when_visible", "CUTOFF_ALLOW_NOTHING");
87 break;
88 case MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY:
89 dict->SetString("prority_cutoff_when_visible",
90 "CUTOFF_ALLOW_REQUIRED_ONLY");
91 break;
92 case MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE:
93 dict->SetString("prority_cutoff_when_visible",
94 "CUTOFF_ALLOW_NICE_TO_HAVE");
95 break;
96 case MemoryAllocation::CUTOFF_ALLOW_EVERYTHING:
97 dict->SetString("prority_cutoff_when_visible", "CUTOFF_ALLOW_EVERYTHING");
98 break;
99 }
100 dict->SetInteger("num_resources_limit", num_resources_limit);
101 }
102
80 } // namespace cc 103 } // namespace cc
OLDNEW
« 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