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

Side by Side Diff: cc/resources/tile_priority.cc

Issue 140673009: CC/GPU: Add a soft limit to the compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use CC Setting. Created 6 years, 10 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/resources/tile_priority.h" 5 #include "cc/resources/tile_priority.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 9
10 namespace { 10 namespace {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 DCHECK(false) << "Unrecognized priority value " << prio; 166 DCHECK(false) << "Unrecognized priority value " << prio;
167 return scoped_ptr<base::Value>(new base::StringValue( 167 return scoped_ptr<base::Value>(new base::StringValue(
168 "<unknown>")); 168 "<unknown>"));
169 } 169 }
170 170
171 scoped_ptr<base::Value> GlobalStateThatImpactsTilePriority::AsValue() const { 171 scoped_ptr<base::Value> GlobalStateThatImpactsTilePriority::AsValue() const {
172 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 172 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
173 state->Set("memory_limit_policy", 173 state->Set("memory_limit_policy",
174 TileMemoryLimitPolicyAsValue(memory_limit_policy).release()); 174 TileMemoryLimitPolicyAsValue(memory_limit_policy).release());
175 state->SetInteger("memory_limit_in_bytes", memory_limit_in_bytes); 175 state->SetInteger("soft_memory_limit_in_bytes", soft_memory_limit_in_bytes);
176 state->SetInteger("hard_memory_limit_in_bytes", hard_memory_limit_in_bytes);
176 state->SetInteger("unused_memory_limit_in_bytes", 177 state->SetInteger("unused_memory_limit_in_bytes",
177 unused_memory_limit_in_bytes); 178 unused_memory_limit_in_bytes);
178 state->SetInteger("num_resources_limit", num_resources_limit); 179 state->SetInteger("num_resources_limit", num_resources_limit);
179 state->Set("tree_priority", TreePriorityAsValue(tree_priority).release()); 180 state->Set("tree_priority", TreePriorityAsValue(tree_priority).release());
180 return state.PassAs<base::Value>(); 181 return state.PassAs<base::Value>();
181 } 182 }
182 183
183 } // namespace cc 184 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698