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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 Id previous_tile_id) { | 98 Id previous_tile_id) { |
99 invalidated_content_rect_ = invalid_content_rect; | 99 invalidated_content_rect_ = invalid_content_rect; |
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 const gfx::ColorSpace color_space() const { return color_space_; } | |
109 | |
108 bool HasRasterTask() const { return !!raster_task_.get(); } | 110 bool HasRasterTask() const { return !!raster_task_.get(); } |
109 | 111 |
110 private: | 112 private: |
111 friend class TileManager; | 113 friend class TileManager; |
112 friend class FakeTileManager; | 114 friend class FakeTileManager; |
113 friend class FakePictureLayerImpl; | 115 friend class FakePictureLayerImpl; |
114 | 116 |
115 // Methods called by by tile manager. | 117 // Methods called by by tile manager. |
116 Tile(TileManager* tile_manager, | 118 Tile(TileManager* tile_manager, |
117 const CreateInfo& info, | 119 const CreateInfo& info, |
120 const gfx::ColorSpace& color_space, | |
ccameron
2016/09/12 23:44:24
This didn't seem appropriate to have as part of Cr
| |
118 int layer_id, | 121 int layer_id, |
119 int source_frame_number, | 122 int source_frame_number, |
120 int flags); | 123 int flags); |
121 ~Tile(); | 124 ~Tile(); |
122 | 125 |
123 TileManager* const tile_manager_; | 126 TileManager* const tile_manager_; |
124 const gfx::Rect content_rect_; | 127 const gfx::Rect content_rect_; |
125 const gfx::Rect enclosing_layer_rect_; | 128 const gfx::Rect enclosing_layer_rect_; |
126 const float contents_scale_; | 129 const float contents_scale_; |
130 const gfx::ColorSpace color_space_; | |
127 | 131 |
128 TileDrawInfo draw_info_; | 132 TileDrawInfo draw_info_; |
129 | 133 |
130 const int layer_id_; | 134 const int layer_id_; |
131 const int source_frame_number_; | 135 const int source_frame_number_; |
132 const int flags_; | 136 const int flags_; |
133 const int tiling_i_index_; | 137 const int tiling_i_index_; |
134 const int tiling_j_index_; | 138 const int tiling_j_index_; |
135 bool required_for_activation_ : 1; | 139 bool required_for_activation_ : 1; |
136 bool required_for_draw_ : 1; | 140 bool required_for_draw_ : 1; |
(...skipping 11 matching lines...) Expand all Loading... | |
148 scoped_refptr<TileTask> raster_task_; | 152 scoped_refptr<TileTask> raster_task_; |
149 | 153 |
150 DISALLOW_COPY_AND_ASSIGN(Tile); | 154 DISALLOW_COPY_AND_ASSIGN(Tile); |
151 }; | 155 }; |
152 | 156 |
153 using ScopedTilePtr = std::unique_ptr<Tile, Tile::Deleter>; | 157 using ScopedTilePtr = std::unique_ptr<Tile, Tile::Deleter>; |
154 | 158 |
155 } // namespace cc | 159 } // namespace cc |
156 | 160 |
157 #endif // CC_TILES_TILE_H_ | 161 #endif // CC_TILES_TILE_H_ |
OLD | NEW |