| Index: cc/resources/tile_priority.h
|
| diff --git a/cc/resources/tile_priority.h b/cc/resources/tile_priority.h
|
| index 5c92d2f178e6c60540fbfae3814872adb10f03b9..ac4015d57dfdfa23b5350fddf677d7faaa4acfb0 100644
|
| --- a/cc/resources/tile_priority.h
|
| +++ b/cc/resources/tile_priority.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "cc/base/util.h"
|
| #include "cc/resources/picture_pile.h"
|
| #include "ui/gfx/quad_f.h"
|
| #include "ui/gfx/rect.h"
|
| @@ -21,24 +22,17 @@ class Value;
|
|
|
| namespace cc {
|
|
|
| -enum WhichTree {
|
| - // Note: these must be 0 and 1 because we index with them in various places,
|
| - // e.g. in Tile::priority_.
|
| - ACTIVE_TREE = 0,
|
| - PENDING_TREE = 1,
|
| - NUM_TREES = 2
|
| - // Be sure to update WhichTreeAsValue when adding new fields.
|
| -};
|
| -scoped_ptr<base::Value> WhichTreeAsValue(
|
| - WhichTree tree);
|
| +DEFINE_ENUM(WhichTree,
|
| + ACTIVE_TREE,
|
| + PENDING_TREE);
|
| +scoped_ptr<base::Value> WhichTreeAsValue(WhichTree tree);
|
|
|
| enum TileResolution {
|
| - LOW_RESOLUTION = 0 ,
|
| + LOW_RESOLUTION = 0,
|
| HIGH_RESOLUTION = 1,
|
| - NON_IDEAL_RESOLUTION = 2,
|
| + NON_IDEAL_RESOLUTION = 2
|
| };
|
| -scoped_ptr<base::Value> TileResolutionAsValue(
|
| - TileResolution resolution);
|
| +scoped_ptr<base::Value> TileResolutionAsValue(TileResolution resolution);
|
|
|
| struct CC_EXPORT TilePriority {
|
| TilePriority()
|
| @@ -124,24 +118,19 @@ struct CC_EXPORT TilePriority {
|
| gfx::QuadF current_screen_quad;
|
| };
|
|
|
| -enum TileMemoryLimitPolicy {
|
| - // Nothing.
|
| - ALLOW_NOTHING = 0,
|
| -
|
| - // You might be made visible, but you're not being interacted with.
|
| - ALLOW_ABSOLUTE_MINIMUM = 1, // Tall.
|
| -
|
| - // You're being interacted with, but we're low on memory.
|
| - ALLOW_PREPAINT_ONLY = 2, // Grande.
|
| +// NOTE: Be sure to update kBinPolicyMap when adding fields.
|
| +DEFINE_ENUM(TileMemoryLimitPolicy,
|
| + // Nothing.
|
| + ALLOW_NOTHING,
|
|
|
| - // You're the only thing in town. Go crazy.
|
| - ALLOW_ANYTHING = 3, // Venti.
|
| + // You might be made visible, but you're not being interacted with.
|
| + ALLOW_ABSOLUTE_MINIMUM, // Tall.
|
|
|
| - NUM_TILE_MEMORY_LIMIT_POLICIES = 4,
|
| + // You're being interacted with, but we're low on memory.
|
| + ALLOW_PREPAINT_ONLY, // Grande.
|
|
|
| - // NOTE: Be sure to update TreePriorityAsValue and kBinPolicyMap when adding
|
| - // or reordering fields.
|
| -};
|
| + // You're the only thing in town. Go crazy.
|
| + ALLOW_ANYTHING); // Venti.
|
| scoped_ptr<base::Value> TileMemoryLimitPolicyAsValue(
|
| TileMemoryLimitPolicy policy);
|
|
|
| @@ -149,8 +138,6 @@ enum TreePriority {
|
| SAME_PRIORITY_FOR_BOTH_TREES,
|
| SMOOTHNESS_TAKES_PRIORITY,
|
| NEW_CONTENT_TAKES_PRIORITY
|
| -
|
| - // Be sure to update TreePriorityAsValue when adding new fields.
|
| };
|
| scoped_ptr<base::Value> TreePriorityAsValue(TreePriority prio);
|
|
|
|
|