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 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "cc/paint/draw_image.h" | |
13 #include "cc/raster/tile_task.h" | 14 #include "cc/raster/tile_task.h" |
14 #include "cc/tiles/tile_draw_info.h" | 15 #include "cc/tiles/tile_draw_info.h" |
15 #include "ui/gfx/geometry/axis_transform2d.h" | 16 #include "ui/gfx/geometry/axis_transform2d.h" |
16 #include "ui/gfx/geometry/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
17 #include "ui/gfx/geometry/size.h" | 18 #include "ui/gfx/geometry/size.h" |
18 | 19 |
19 namespace cc { | 20 namespace cc { |
20 | 21 |
21 class PictureLayerTiling; | 22 class PictureLayerTiling; |
22 class TileManager; | 23 class TileManager; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 | 111 |
111 bool HasRasterTask() const { return !!raster_task_.get(); } | 112 bool HasRasterTask() const { return !!raster_task_.get(); } |
112 | 113 |
113 void set_solid_color_analysis_performed(bool performed) { | 114 void set_solid_color_analysis_performed(bool performed) { |
114 is_solid_color_analysis_performed_ = performed; | 115 is_solid_color_analysis_performed_ = performed; |
115 } | 116 } |
116 bool is_solid_color_analysis_performed() const { | 117 bool is_solid_color_analysis_performed() const { |
117 return is_solid_color_analysis_performed_; | 118 return is_solid_color_analysis_performed_; |
118 } | 119 } |
119 | 120 |
121 bool set_raster_task_scheduled_with_checker_images(bool has_checker_images) { | |
122 bool previous_raster_task_scheduled_with_checker_images = | |
vmpstr
2017/04/18 00:20:00
just call it 'return_value' or maybe even just mak
Khushal
2017/04/19 06:16:41
Changed it to |previous_value|. The call-site was
| |
123 raster_task_scheduled_with_checker_images_; | |
124 raster_task_scheduled_with_checker_images_ = has_checker_images; | |
125 return previous_raster_task_scheduled_with_checker_images; | |
126 } | |
127 bool raster_task_scheduled_with_checker_images() const { | |
128 return raster_task_scheduled_with_checker_images_; | |
129 } | |
130 | |
120 const PictureLayerTiling* tiling() const { return tiling_; } | 131 const PictureLayerTiling* tiling() const { return tiling_; } |
121 void set_tiling(const PictureLayerTiling* tiling) { tiling_ = tiling; } | 132 void set_tiling(const PictureLayerTiling* tiling) { tiling_ = tiling; } |
122 | 133 |
123 private: | 134 private: |
124 friend class TileManager; | 135 friend class TileManager; |
125 friend class FakeTileManager; | 136 friend class FakeTileManager; |
126 friend class FakePictureLayerImpl; | 137 friend class FakePictureLayerImpl; |
127 | 138 |
128 // Methods called by by tile manager. | 139 // Methods called by by tile manager. |
129 Tile(TileManager* tile_manager, | 140 Tile(TileManager* tile_manager, |
(...skipping 21 matching lines...) Expand all Loading... | |
151 | 162 |
152 Id id_; | 163 Id id_; |
153 | 164 |
154 // The rect bounding the changes in this Tile vs the previous tile it | 165 // The rect bounding the changes in this Tile vs the previous tile it |
155 // replaced. | 166 // replaced. |
156 gfx::Rect invalidated_content_rect_; | 167 gfx::Rect invalidated_content_rect_; |
157 // The |id_| of the Tile that was invalidated and replaced by this tile. | 168 // The |id_| of the Tile that was invalidated and replaced by this tile. |
158 Id invalidated_id_; | 169 Id invalidated_id_; |
159 | 170 |
160 unsigned scheduled_priority_; | 171 unsigned scheduled_priority_; |
172 | |
173 // Set to true if there is a raster task scheduled for this tile that will | |
174 // rasterize a resource with checker images. | |
175 bool raster_task_scheduled_with_checker_images_ = false; | |
161 scoped_refptr<TileTask> raster_task_; | 176 scoped_refptr<TileTask> raster_task_; |
162 | 177 |
163 DISALLOW_COPY_AND_ASSIGN(Tile); | 178 DISALLOW_COPY_AND_ASSIGN(Tile); |
164 }; | 179 }; |
165 | 180 |
166 } // namespace cc | 181 } // namespace cc |
167 | 182 |
168 #endif // CC_TILES_TILE_H_ | 183 #endif // CC_TILES_TILE_H_ |
OLD | NEW |