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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 Id previous_tile_id) { | 97 Id previous_tile_id) { |
98 invalidated_content_rect_ = invalid_content_rect; | 98 invalidated_content_rect_ = invalid_content_rect; |
99 invalidated_id_ = previous_tile_id; | 99 invalidated_id_ = previous_tile_id; |
100 } | 100 } |
101 | 101 |
102 Id invalidated_id() const { return invalidated_id_; } | 102 Id invalidated_id() const { return invalidated_id_; } |
103 const gfx::Rect& invalidated_content_rect() const { | 103 const gfx::Rect& invalidated_content_rect() const { |
104 return invalidated_content_rect_; | 104 return invalidated_content_rect_; |
105 } | 105 } |
106 | 106 |
| 107 bool HasRasterTask() const { return !!raster_task_.get(); } |
| 108 |
107 private: | 109 private: |
108 friend class TileManager; | 110 friend class TileManager; |
109 friend class FakeTileManager; | 111 friend class FakeTileManager; |
110 friend class FakePictureLayerImpl; | 112 friend class FakePictureLayerImpl; |
111 | 113 |
112 // Methods called by by tile manager. | 114 // Methods called by by tile manager. |
113 Tile(TileManager* tile_manager, | 115 Tile(TileManager* tile_manager, |
114 const CreateInfo& info, | 116 const CreateInfo& info, |
115 int layer_id, | 117 int layer_id, |
116 int source_frame_number, | 118 int source_frame_number, |
117 int flags); | 119 int flags); |
118 ~Tile(); | 120 ~Tile(); |
119 | 121 |
120 bool HasRasterTask() const { return !!raster_task_.get(); } | |
121 | |
122 TileManager* const tile_manager_; | 122 TileManager* const tile_manager_; |
123 const gfx::Rect content_rect_; | 123 const gfx::Rect content_rect_; |
124 const gfx::Rect enclosing_layer_rect_; | 124 const gfx::Rect enclosing_layer_rect_; |
125 const float contents_scale_; | 125 const float contents_scale_; |
126 | 126 |
127 TileDrawInfo draw_info_; | 127 TileDrawInfo draw_info_; |
128 | 128 |
129 const int layer_id_; | 129 const int layer_id_; |
130 const int source_frame_number_; | 130 const int source_frame_number_; |
131 const int flags_; | 131 const int flags_; |
(...skipping 15 matching lines...) Expand all Loading... |
147 scoped_refptr<RasterTask> raster_task_; | 147 scoped_refptr<RasterTask> raster_task_; |
148 | 148 |
149 DISALLOW_COPY_AND_ASSIGN(Tile); | 149 DISALLOW_COPY_AND_ASSIGN(Tile); |
150 }; | 150 }; |
151 | 151 |
152 using ScopedTilePtr = scoped_ptr<Tile, Tile::Deleter>; | 152 using ScopedTilePtr = scoped_ptr<Tile, Tile::Deleter>; |
153 | 153 |
154 } // namespace cc | 154 } // namespace cc |
155 | 155 |
156 #endif // CC_TILES_TILE_H_ | 156 #endif // CC_TILES_TILE_H_ |
OLD | NEW |