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_RESOURCES_TILE_H_ | 5 #ifndef CC_RESOURCES_TILE_H_ |
6 #define CC_RESOURCES_TILE_H_ | 6 #define CC_RESOURCES_TILE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "cc/base/ref_counted_managed.h" | 9 #include "cc/base/ref_counted_managed.h" |
10 #include "cc/resources/managed_tile_state.h" | 10 #include "cc/resources/managed_tile_state.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 NOTREACHED(); | 78 NOTREACHED(); |
79 return false; | 79 return false; |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 // TODO(vmpstr): Move this to the iterators. | 83 // TODO(vmpstr): Move this to the iterators. |
84 bool required_for_activation() const { return required_for_activation_; } | 84 bool required_for_activation() const { return required_for_activation_; } |
85 void set_required_for_activation(bool is_required) { | 85 void set_required_for_activation(bool is_required) { |
86 required_for_activation_ = is_required; | 86 required_for_activation_ = is_required; |
87 } | 87 } |
| 88 bool required_for_draw() const { return required_for_draw_; } |
| 89 void set_required_for_draw(bool is_required) { |
| 90 required_for_draw_ = is_required; |
| 91 } |
88 | 92 |
89 bool use_picture_analysis() const { | 93 bool use_picture_analysis() const { |
90 return !!(flags_ & USE_PICTURE_ANALYSIS); | 94 return !!(flags_ & USE_PICTURE_ANALYSIS); |
91 } | 95 } |
92 | 96 |
93 bool HasResources() const { return managed_state_.draw_info.has_resource(); } | 97 bool HasResources() const { return managed_state_.draw_info.has_resource(); } |
94 bool NeedsRaster() const { | 98 bool NeedsRaster() const { |
95 return managed_state_.draw_info.mode() == | 99 return managed_state_.draw_info.mode() == |
96 ManagedTileState::DrawInfo::PICTURE_PILE_MODE || | 100 ManagedTileState::DrawInfo::PICTURE_PILE_MODE || |
97 !managed_state_.draw_info.IsReadyToDraw(); | 101 !managed_state_.draw_info.IsReadyToDraw(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 171 |
168 TilePriority priority_[NUM_TREES]; | 172 TilePriority priority_[NUM_TREES]; |
169 ManagedTileState managed_state_; | 173 ManagedTileState managed_state_; |
170 int layer_id_; | 174 int layer_id_; |
171 int source_frame_number_; | 175 int source_frame_number_; |
172 int flags_; | 176 int flags_; |
173 bool is_shared_; | 177 bool is_shared_; |
174 int tiling_i_index_; | 178 int tiling_i_index_; |
175 int tiling_j_index_; | 179 int tiling_j_index_; |
176 bool required_for_activation_; | 180 bool required_for_activation_; |
| 181 bool required_for_draw_; |
177 | 182 |
178 Id id_; | 183 Id id_; |
179 static Id s_next_id_; | 184 static Id s_next_id_; |
180 | 185 |
181 DISALLOW_COPY_AND_ASSIGN(Tile); | 186 DISALLOW_COPY_AND_ASSIGN(Tile); |
182 }; | 187 }; |
183 | 188 |
184 } // namespace cc | 189 } // namespace cc |
185 | 190 |
186 #endif // CC_RESOURCES_TILE_H_ | 191 #endif // CC_RESOURCES_TILE_H_ |
OLD | NEW |