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

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

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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/tiles/tile_manager_unittest.cc ('k') | cc/trees/blocking_task_runner.h » ('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_TILES_TILE_PRIORITY_H_ 5 #ifndef CC_TILES_TILE_PRIORITY_H_
6 #define CC_TILES_TILE_PRIORITY_H_ 6 #define CC_TILES_TILE_PRIORITY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include <limits> 11 #include <limits>
12 #include <memory>
12 #include <string> 13 #include <string>
13 14
14 #include "base/memory/scoped_ptr.h"
15 #include "base/trace_event/trace_event_argument.h" 15 #include "base/trace_event/trace_event_argument.h"
16 #include "cc/base/cc_export.h" 16 #include "cc/base/cc_export.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 LAST_TREE = 1 29 LAST_TREE = 1
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(WhichTree tree); 32 std::unique_ptr<base::Value> WhichTreeAsValue(WhichTree tree);
33 33
34 enum TileResolution { 34 enum TileResolution {
35 LOW_RESOLUTION = 0 , 35 LOW_RESOLUTION = 0 ,
36 HIGH_RESOLUTION = 1, 36 HIGH_RESOLUTION = 1,
37 NON_IDEAL_RESOLUTION = 2, 37 NON_IDEAL_RESOLUTION = 2,
38 }; 38 };
39 std::string TileResolutionToString(TileResolution resolution); 39 std::string TileResolutionToString(TileResolution resolution);
40 40
41 struct CC_EXPORT TilePriority { 41 struct CC_EXPORT TilePriority {
42 enum PriorityBin { NOW, SOON, EVENTUALLY }; 42 enum PriorityBin { NOW, SOON, EVENTUALLY };
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool operator!=(const GlobalStateThatImpactsTilePriority& other) const { 119 bool operator!=(const GlobalStateThatImpactsTilePriority& other) const {
120 return !(*this == other); 120 return !(*this == other);
121 } 121 }
122 122
123 void AsValueInto(base::trace_event::TracedValue* dict) const; 123 void AsValueInto(base::trace_event::TracedValue* dict) const;
124 }; 124 };
125 125
126 } // namespace cc 126 } // namespace cc
127 127
128 #endif // CC_TILES_TILE_PRIORITY_H_ 128 #endif // CC_TILES_TILE_PRIORITY_H_
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager_unittest.cc ('k') | cc/trees/blocking_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698