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

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

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « cc/resources/tile_manager_unittest.cc ('k') | cc/resources/tile_task_worker_pool_perftest.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 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 #ifndef CC_RESOURCES_TILE_PRIORITY_H_ 5 #ifndef CC_RESOURCES_TILE_PRIORITY_H_
6 #define CC_RESOURCES_TILE_PRIORITY_H_ 6 #define CC_RESOURCES_TILE_PRIORITY_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <limits> 9 #include <limits>
10 #include <string> 10 #include <string>
11 11
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/trace_event/trace_event_argument.h" 13 #include "base/trace_event/trace_event_argument.h"
14 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
15 15
16 namespace base { 16 namespace base {
17 class Value; 17 class Value;
18 } 18 }
19 19
20 namespace cc { 20 namespace cc {
21 21
22 enum WhichTree { 22 enum WhichTree {
23 // Note: these must be 0 and 1 because we index with them in various places, 23 // Note: these must be 0 and 1 because we index with them in various places,
24 // e.g. in Tile::priority_. 24 // e.g. in Tile::priority_.
25 ACTIVE_TREE = 0, 25 ACTIVE_TREE = 0,
26 PENDING_TREE = 1, 26 PENDING_TREE = 1,
27 LAST_TREE = 1 27 NUM_TREES = 2
28 // Be sure to update WhichTreeAsValue when adding new fields. 28 // Be sure to update WhichTreeAsValue when adding new fields.
29 }; 29 };
30 scoped_ptr<base::Value> WhichTreeAsValue(WhichTree tree); 30 scoped_ptr<base::Value> WhichTreeAsValue(WhichTree tree);
31 31
32 enum TileResolution { 32 enum TileResolution {
33 LOW_RESOLUTION = 0 , 33 LOW_RESOLUTION = 0 ,
34 HIGH_RESOLUTION = 1, 34 HIGH_RESOLUTION = 1,
35 NON_IDEAL_RESOLUTION = 2, 35 NON_IDEAL_RESOLUTION = 2,
36 }; 36 };
37 std::string TileResolutionToString(TileResolution resolution); 37 std::string TileResolutionToString(TileResolution resolution);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // You're the only thing in town. Go crazy. 112 // You're the only thing in town. Go crazy.
113 ALLOW_ANYTHING = 3 // Venti. 113 ALLOW_ANYTHING = 3 // Venti.
114 }; 114 };
115 std::string TileMemoryLimitPolicyToString(TileMemoryLimitPolicy policy); 115 std::string TileMemoryLimitPolicyToString(TileMemoryLimitPolicy policy);
116 116
117 enum TreePriority { 117 enum TreePriority {
118 SAME_PRIORITY_FOR_BOTH_TREES, 118 SAME_PRIORITY_FOR_BOTH_TREES,
119 SMOOTHNESS_TAKES_PRIORITY, 119 SMOOTHNESS_TAKES_PRIORITY,
120 NEW_CONTENT_TAKES_PRIORITY, 120 NEW_CONTENT_TAKES_PRIORITY,
121 LAST_TREE_PRIORITY = NEW_CONTENT_TAKES_PRIORITY 121 NUM_TREE_PRIORITIES
122 // Be sure to update TreePriorityAsValue when adding new fields. 122 // Be sure to update TreePriorityAsValue when adding new fields.
123 }; 123 };
124 std::string TreePriorityToString(TreePriority prio); 124 std::string TreePriorityToString(TreePriority prio);
125 125
126 class GlobalStateThatImpactsTilePriority { 126 class GlobalStateThatImpactsTilePriority {
127 public: 127 public:
128 GlobalStateThatImpactsTilePriority() 128 GlobalStateThatImpactsTilePriority()
129 : memory_limit_policy(ALLOW_NOTHING), 129 : memory_limit_policy(ALLOW_NOTHING),
130 soft_memory_limit_in_bytes(0), 130 soft_memory_limit_in_bytes(0),
131 hard_memory_limit_in_bytes(0), 131 hard_memory_limit_in_bytes(0),
(...skipping 18 matching lines...) Expand all
150 bool operator!=(const GlobalStateThatImpactsTilePriority& other) const { 150 bool operator!=(const GlobalStateThatImpactsTilePriority& other) const {
151 return !(*this == other); 151 return !(*this == other);
152 } 152 }
153 153
154 void AsValueInto(base::trace_event::TracedValue* dict) const; 154 void AsValueInto(base::trace_event::TracedValue* dict) const;
155 }; 155 };
156 156
157 } // namespace cc 157 } // namespace cc
158 158
159 #endif // CC_RESOURCES_TILE_PRIORITY_H_ 159 #endif // CC_RESOURCES_TILE_PRIORITY_H_
OLDNEW
« no previous file with comments | « cc/resources/tile_manager_unittest.cc ('k') | cc/resources/tile_task_worker_pool_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698