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

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

Issue 18581004: cc: Remove tile ref counting in tile manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ut compile fix 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
« 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 bool can_use_lcd_text); 33 bool can_use_lcd_text);
33 34
35 Id id() const {
36 return id_;
37 }
38
34 PicturePileImpl* picture_pile() { 39 PicturePileImpl* picture_pile() {
35 return picture_pile_.get(); 40 return picture_pile_.get();
36 } 41 }
37 42
38 const PicturePileImpl* picture_pile() const { 43 const PicturePileImpl* picture_pile() const {
39 return picture_pile_.get(); 44 return picture_pile_.get();
40 } 45 }
41 46
42 const TilePriority& priority(WhichTree tree) const { 47 const TilePriority& priority(WhichTree tree) const {
43 return priority_[tree]; 48 return priority_[tree];
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 gfx::Rect content_rect_; 139 gfx::Rect content_rect_;
135 float contents_scale_; 140 float contents_scale_;
136 gfx::Rect opaque_rect_; 141 gfx::Rect opaque_rect_;
137 142
138 TilePriority priority_[NUM_BIN_PRIORITIES]; 143 TilePriority priority_[NUM_BIN_PRIORITIES];
139 ManagedTileState managed_state_; 144 ManagedTileState managed_state_;
140 int layer_id_; 145 int layer_id_;
141 int source_frame_number_; 146 int source_frame_number_;
142 bool can_use_lcd_text_; 147 bool can_use_lcd_text_;
143 148
149 Id id_;
150 static Id s_next_id_;
151
144 DISALLOW_COPY_AND_ASSIGN(Tile); 152 DISALLOW_COPY_AND_ASSIGN(Tile);
145 }; 153 };
146 154
147 } // namespace cc 155 } // namespace cc
148 156
149 #endif // CC_RESOURCES_TILE_H_ 157 #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