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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 invalidated_id_ = previous_tile_id; | 100 invalidated_id_ = previous_tile_id; |
101 } | 101 } |
102 | 102 |
103 Id invalidated_id() const { return invalidated_id_; } | 103 Id invalidated_id() const { return invalidated_id_; } |
104 const gfx::Rect& invalidated_content_rect() const { | 104 const gfx::Rect& invalidated_content_rect() const { |
105 return invalidated_content_rect_; | 105 return invalidated_content_rect_; |
106 } | 106 } |
107 | 107 |
108 bool HasRasterTask() const { return !!raster_task_.get(); } | 108 bool HasRasterTask() const { return !!raster_task_.get(); } |
109 | 109 |
110 void set_solid_color_analysis_performed(bool performed) { | |
111 is_solid_color_analysis_performed_ = performed; | |
112 } | |
113 bool is_solid_color_analysis_performed() const { | |
114 return is_solid_color_analysis_performed_; | |
115 } | |
116 | |
110 private: | 117 private: |
111 friend class TileManager; | 118 friend class TileManager; |
112 friend class FakeTileManager; | 119 friend class FakeTileManager; |
113 friend class FakePictureLayerImpl; | 120 friend class FakePictureLayerImpl; |
114 | 121 |
115 // Methods called by by tile manager. | 122 // Methods called by by tile manager. |
116 Tile(TileManager* tile_manager, | 123 Tile(TileManager* tile_manager, |
117 const CreateInfo& info, | 124 const CreateInfo& info, |
118 int layer_id, | 125 int layer_id, |
119 int source_frame_number, | 126 int source_frame_number, |
(...skipping 17 matching lines...) Expand all Loading... | |
137 | 144 |
138 Id id_; | 145 Id id_; |
139 | 146 |
140 // The rect bounding the changes in this Tile vs the previous tile it | 147 // The rect bounding the changes in this Tile vs the previous tile it |
141 // replaced. | 148 // replaced. |
142 gfx::Rect invalidated_content_rect_; | 149 gfx::Rect invalidated_content_rect_; |
143 // The |id_| of the Tile that was invalidated and replaced by this tile. | 150 // The |id_| of the Tile that was invalidated and replaced by this tile. |
144 Id invalidated_id_; | 151 Id invalidated_id_; |
145 | 152 |
146 unsigned scheduled_priority_; | 153 unsigned scheduled_priority_; |
147 | |
148 scoped_refptr<TileTask> raster_task_; | 154 scoped_refptr<TileTask> raster_task_; |
155 bool is_solid_color_analysis_performed_ = false; | |
enne (OOO)
2016/09/14 18:29:33
How about sticking this bool with the other bools
vmpstr
2016/09/14 18:48:12
Done.
| |
149 | 156 |
150 DISALLOW_COPY_AND_ASSIGN(Tile); | 157 DISALLOW_COPY_AND_ASSIGN(Tile); |
151 }; | 158 }; |
152 | 159 |
153 using ScopedTilePtr = std::unique_ptr<Tile, Tile::Deleter>; | 160 using ScopedTilePtr = std::unique_ptr<Tile, Tile::Deleter>; |
154 | 161 |
155 } // namespace cc | 162 } // namespace cc |
156 | 163 |
157 #endif // CC_TILES_TILE_H_ | 164 #endif // CC_TILES_TILE_H_ |
OLD | NEW |