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

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

Issue 19308003: Merge 210713 "cc: Remove tile ref counting in tile manager." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1547/src/
Patch Set: Created 7 years, 5 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/picture_layer_tiling.cc ('k') | cc/resources/tile.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_H_ 5 #ifndef CC_RESOURCES_TILE_H_
6 #define CC_RESOURCES_TILE_H_ 6 #define CC_RESOURCES_TILE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
11 #include "cc/resources/managed_tile_state.h" 11 #include "cc/resources/managed_tile_state.h"
12 #include "cc/resources/raster_mode.h" 12 #include "cc/resources/raster_mode.h"
13 #include "cc/resources/tile_priority.h" 13 #include "cc/resources/tile_priority.h"
14 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 #include "ui/gfx/size.h" 15 #include "ui/gfx/size.h"
16 16
17 namespace cc { 17 namespace cc {
18 18
19 class PicturePileImpl; 19 class PicturePileImpl;
20 class Tile;
21 20
22 class CC_EXPORT Tile : public base::RefCounted<Tile> { 21 class CC_EXPORT Tile : public base::RefCounted<Tile> {
23 public: 22 public:
23 typedef uint64 Id;
24
24 Tile(TileManager* tile_manager, 25 Tile(TileManager* tile_manager,
25 PicturePileImpl* picture_pile, 26 PicturePileImpl* picture_pile,
26 gfx::Size tile_size, 27 gfx::Size tile_size,
27 gfx::Rect content_rect, 28 gfx::Rect content_rect,
28 gfx::Rect opaque_rect, 29 gfx::Rect opaque_rect,
29 float contents_scale, 30 float contents_scale,
30 int layer_id, 31 int layer_id,
31 int source_frame_number); 32 int source_frame_number);
32 33
34 Id id() const {
35 return id_;
36 }
37
33 PicturePileImpl* picture_pile() { 38 PicturePileImpl* picture_pile() {
34 return picture_pile_.get(); 39 return picture_pile_.get();
35 } 40 }
36 41
37 const PicturePileImpl* picture_pile() const { 42 const PicturePileImpl* picture_pile() const {
38 return picture_pile_.get(); 43 return picture_pile_.get();
39 } 44 }
40 45
41 const TilePriority& priority(WhichTree tree) const { 46 const TilePriority& priority(WhichTree tree) const {
42 return priority_[tree]; 47 return priority_[tree];
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 gfx::Rect tile_size_; 141 gfx::Rect tile_size_;
137 gfx::Rect content_rect_; 142 gfx::Rect content_rect_;
138 float contents_scale_; 143 float contents_scale_;
139 gfx::Rect opaque_rect_; 144 gfx::Rect opaque_rect_;
140 145
141 TilePriority priority_[NUM_BIN_PRIORITIES]; 146 TilePriority priority_[NUM_BIN_PRIORITIES];
142 ManagedTileState managed_state_; 147 ManagedTileState managed_state_;
143 int layer_id_; 148 int layer_id_;
144 int source_frame_number_; 149 int source_frame_number_;
145 150
151 Id id_;
152 static Id s_next_id_;
153
146 DISALLOW_COPY_AND_ASSIGN(Tile); 154 DISALLOW_COPY_AND_ASSIGN(Tile);
147 }; 155 };
148 156
149 } // namespace cc 157 } // namespace cc
150 158
151 #endif // CC_RESOURCES_TILE_H_ 159 #endif // CC_RESOURCES_TILE_H_
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/resources/tile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698