OLD | NEW |
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_H_ | 5 #ifndef CC_TILES_TILE_H_ |
6 #define CC_TILES_TILE_H_ | 6 #define CC_TILES_TILE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "cc/tiles/tile_draw_info.h" | 9 #include "cc/tiles/tile_draw_info.h" |
10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 Id previous_tile_id) { | 93 Id previous_tile_id) { |
94 invalidated_content_rect_ = invalid_content_rect; | 94 invalidated_content_rect_ = invalid_content_rect; |
95 invalidated_id_ = previous_tile_id; | 95 invalidated_id_ = previous_tile_id; |
96 } | 96 } |
97 | 97 |
98 Id invalidated_id() const { return invalidated_id_; } | 98 Id invalidated_id() const { return invalidated_id_; } |
99 const gfx::Rect& invalidated_content_rect() const { | 99 const gfx::Rect& invalidated_content_rect() const { |
100 return invalidated_content_rect_; | 100 return invalidated_content_rect_; |
101 } | 101 } |
102 | 102 |
| 103 bool HasRasterTask() const { return !!raster_task_.get(); } |
| 104 |
103 private: | 105 private: |
104 friend class TileManager; | 106 friend class TileManager; |
105 friend class FakeTileManager; | 107 friend class FakeTileManager; |
106 friend class FakePictureLayerImpl; | 108 friend class FakePictureLayerImpl; |
107 | 109 |
108 // Methods called by by tile manager. | 110 // Methods called by by tile manager. |
109 Tile(TileManager* tile_manager, | 111 Tile(TileManager* tile_manager, |
110 const CreateInfo& info, | 112 const CreateInfo& info, |
111 int layer_id, | 113 int layer_id, |
112 int source_frame_number, | 114 int source_frame_number, |
113 int flags); | 115 int flags); |
114 ~Tile(); | 116 ~Tile(); |
115 | 117 |
116 bool HasRasterTask() const { return !!raster_task_.get(); } | |
117 | |
118 TileManager* const tile_manager_; | 118 TileManager* const tile_manager_; |
119 const gfx::Rect content_rect_; | 119 const gfx::Rect content_rect_; |
120 const gfx::Rect enclosing_layer_rect_; | 120 const gfx::Rect enclosing_layer_rect_; |
121 const float contents_scale_; | 121 const float contents_scale_; |
122 | 122 |
123 TileDrawInfo draw_info_; | 123 TileDrawInfo draw_info_; |
124 | 124 |
125 const int layer_id_; | 125 const int layer_id_; |
126 const int source_frame_number_; | 126 const int source_frame_number_; |
127 const int flags_; | 127 const int flags_; |
(...skipping 15 matching lines...) Expand all Loading... |
143 scoped_refptr<RasterTask> raster_task_; | 143 scoped_refptr<RasterTask> raster_task_; |
144 | 144 |
145 DISALLOW_COPY_AND_ASSIGN(Tile); | 145 DISALLOW_COPY_AND_ASSIGN(Tile); |
146 }; | 146 }; |
147 | 147 |
148 using ScopedTilePtr = scoped_ptr<Tile, Tile::Deleter>; | 148 using ScopedTilePtr = scoped_ptr<Tile, Tile::Deleter>; |
149 | 149 |
150 } // namespace cc | 150 } // namespace cc |
151 | 151 |
152 #endif // CC_TILES_TILE_H_ | 152 #endif // CC_TILES_TILE_H_ |
OLD | NEW |