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

Side by Side Diff: cc/resources/managed_memory_policy.h

Issue 13051003: cpplint.py pass on cc/(base|debug|quads|resources)/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix prioritized_resource_unittest Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/layer_tiling_data.cc ('k') | cc/resources/managed_memory_policy.cc » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 #ifndef CC_RESOURCES_MANAGED_MEMORY_POLICY_H_ 5 #ifndef CC_RESOURCES_MANAGED_MEMORY_POLICY_H_
6 #define CC_RESOURCES_MANAGED_MEMORY_POLICY_H_ 6 #define CC_RESOURCES_MANAGED_MEMORY_POLICY_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 #include "cc/resources/tile_priority.h" 10 #include "cc/resources/tile_priority.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 struct CC_EXPORT ManagedMemoryPolicy { 14 struct CC_EXPORT ManagedMemoryPolicy {
15 enum PriorityCutoff { 15 enum PriorityCutoff {
16 CUTOFF_ALLOW_NOTHING, 16 CUTOFF_ALLOW_NOTHING,
17 CUTOFF_ALLOW_REQUIRED_ONLY, 17 CUTOFF_ALLOW_REQUIRED_ONLY,
18 CUTOFF_ALLOW_NICE_TO_HAVE, 18 CUTOFF_ALLOW_NICE_TO_HAVE,
19 CUTOFF_ALLOW_EVERYTHING, 19 CUTOFF_ALLOW_EVERYTHING,
20 }; 20 };
21 21
22 ManagedMemoryPolicy(size_t bytes_limit_when_visible); 22 explicit ManagedMemoryPolicy(size_t bytes_limit_when_visible);
23 ManagedMemoryPolicy(size_t bytes_limit_when_visible, 23 ManagedMemoryPolicy(size_t bytes_limit_when_visible,
24 PriorityCutoff priority_cutoff_when_visible, 24 PriorityCutoff priority_cutoff_when_visible,
25 size_t bytes_limit_when_not_visible, 25 size_t bytes_limit_when_not_visible,
26 PriorityCutoff priority_cutoff_when_not_visible); 26 PriorityCutoff priority_cutoff_when_not_visible);
27 bool operator==(const ManagedMemoryPolicy&) const; 27 bool operator==(const ManagedMemoryPolicy&) const;
28 bool operator!=(const ManagedMemoryPolicy&) const; 28 bool operator!=(const ManagedMemoryPolicy&) const;
29 29
30 size_t bytes_limit_when_visible; 30 size_t bytes_limit_when_visible;
31 PriorityCutoff priority_cutoff_when_visible; 31 PriorityCutoff priority_cutoff_when_visible;
32 size_t bytes_limit_when_not_visible; 32 size_t bytes_limit_when_not_visible;
33 PriorityCutoff priority_cutoff_when_not_visible; 33 PriorityCutoff priority_cutoff_when_not_visible;
34 34
35 static int PriorityCutoffToValue(PriorityCutoff priority_cutoff); 35 static int PriorityCutoffToValue(PriorityCutoff priority_cutoff);
36 static TileMemoryLimitPolicy PriorityCutoffToTileMemoryLimitPolicy( 36 static TileMemoryLimitPolicy PriorityCutoffToTileMemoryLimitPolicy(
37 PriorityCutoff priority_cutoff); 37 PriorityCutoff priority_cutoff);
38 }; 38 };
39 39
40 } // namespace cc 40 } // namespace cc
41 41
42 #endif // CC_RESOURCES_MANAGED_MEMORY_POLICY_H_ 42 #endif // CC_RESOURCES_MANAGED_MEMORY_POLICY_H_
OLDNEW
« no previous file with comments | « cc/resources/layer_tiling_data.cc ('k') | cc/resources/managed_memory_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698