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

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

Issue 22875045: cc: Remove unnecessary "default" cases from switch statements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
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 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "cc/resources/picture_pile.h" 13 #include "cc/resources/picture_pile.h"
14 #include "ui/gfx/quad_f.h" 14 #include "ui/gfx/quad_f.h"
15 #include "ui/gfx/rect.h" 15 #include "ui/gfx/rect.h"
16 #include "ui/gfx/size.h" 16 #include "ui/gfx/size.h"
17 17
18 namespace base { 18 namespace base {
19 class Value; 19 class Value;
20 } 20 }
21 21
22 namespace cc { 22 namespace cc {
23 23
24 enum WhichTree { 24 enum WhichTree {
25 // Note: these must be 0 and 1 because we index with them in various places, 25 // Note: these must be 0 and 1 because we index with them in various places,
26 // e.g. in Tile::priority_. 26 // e.g. in Tile::priority_.
27 ACTIVE_TREE = 0, 27 ACTIVE_TREE = 0,
28 PENDING_TREE = 1, 28 PENDING_TREE = 1,
29 NUM_TREES = 2 29 MAX_TREE = PENDING_TREE
30 // Be sure to update WhichTreeAsValue when adding new fields. 30 // Be sure to update WhichTreeAsValue when adding new fields.
31 }; 31 };
32 scoped_ptr<base::Value> WhichTreeAsValue( 32 scoped_ptr<base::Value> WhichTreeAsValue(
33 WhichTree tree); 33 WhichTree tree);
34 34
35 enum TileResolution { 35 enum TileResolution {
36 LOW_RESOLUTION = 0 , 36 LOW_RESOLUTION = 0 ,
37 HIGH_RESOLUTION = 1, 37 HIGH_RESOLUTION = 1,
38 NON_IDEAL_RESOLUTION = 2, 38 NON_IDEAL_RESOLUTION = 2,
39 }; 39 };
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // You might be made visible, but you're not being interacted with. 131 // You might be made visible, but you're not being interacted with.
132 ALLOW_ABSOLUTE_MINIMUM = 1, // Tall. 132 ALLOW_ABSOLUTE_MINIMUM = 1, // Tall.
133 133
134 // You're being interacted with, but we're low on memory. 134 // You're being interacted with, but we're low on memory.
135 ALLOW_PREPAINT_ONLY = 2, // Grande. 135 ALLOW_PREPAINT_ONLY = 2, // Grande.
136 136
137 // You're the only thing in town. Go crazy. 137 // You're the only thing in town. Go crazy.
138 ALLOW_ANYTHING = 3, // Venti. 138 ALLOW_ANYTHING = 3, // Venti.
139 139
140 NUM_TILE_MEMORY_LIMIT_POLICIES = 4, 140 MAX_TILE_MEMORY_LIMIT_POLICY = ALLOW_ANYTHING,
141 141
142 // NOTE: Be sure to update TreePriorityAsValue and kBinPolicyMap when adding 142 // NOTE: Be sure to update TreePriorityAsValue and kBinPolicyMap when adding
143 // or reordering fields. 143 // or reordering fields.
144 }; 144 };
145 scoped_ptr<base::Value> TileMemoryLimitPolicyAsValue( 145 scoped_ptr<base::Value> TileMemoryLimitPolicyAsValue(
146 TileMemoryLimitPolicy policy); 146 TileMemoryLimitPolicy policy);
147 147
148 enum TreePriority { 148 enum TreePriority {
149 SAME_PRIORITY_FOR_BOTH_TREES, 149 SAME_PRIORITY_FOR_BOTH_TREES,
150 SMOOTHNESS_TAKES_PRIORITY, 150 SMOOTHNESS_TAKES_PRIORITY,
(...skipping 19 matching lines...) Expand all
170 size_t num_resources_limit; 170 size_t num_resources_limit;
171 171
172 TreePriority tree_priority; 172 TreePriority tree_priority;
173 173
174 scoped_ptr<base::Value> AsValue() const; 174 scoped_ptr<base::Value> AsValue() const;
175 }; 175 };
176 176
177 } // namespace cc 177 } // namespace cc
178 178
179 #endif // CC_RESOURCES_TILE_PRIORITY_H_ 179 #endif // CC_RESOURCES_TILE_PRIORITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698