Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Side by Side Diff: cc/resources/tile.h

Issue 672283003: cc: ReadyToDraw notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 NOTREACHED(); 84 NOTREACHED();
85 return false; 85 return false;
86 } 86 }
87 } 87 }
88 88
89 // TODO(vmpstr): Move this to the iterators. 89 // TODO(vmpstr): Move this to the iterators.
90 bool required_for_activation() const { return required_for_activation_; } 90 bool required_for_activation() const { return required_for_activation_; }
91 void set_required_for_activation(bool is_required) { 91 void set_required_for_activation(bool is_required) {
92 required_for_activation_ = is_required; 92 required_for_activation_ = is_required;
93 } 93 }
94 bool required_for_draw() const { return required_for_draw_; }
reveman 2014/10/24 18:16:31 "required_for_draw" makes it sound like drawing is
ernstm 2014/10/27 21:13:56 It is tiles that are visible, high-res and on the
95 void set_required_for_draw(bool is_required) {
96 required_for_draw_ = is_required;
97 }
94 98
95 bool use_picture_analysis() const { 99 bool use_picture_analysis() const {
96 return !!(flags_ & USE_PICTURE_ANALYSIS); 100 return !!(flags_ & USE_PICTURE_ANALYSIS);
97 } 101 }
98 102
99 bool HasResources() const { return managed_state_.draw_info.has_resource(); } 103 bool HasResources() const { return managed_state_.draw_info.has_resource(); }
100 bool NeedsRaster() const { 104 bool NeedsRaster() const {
101 return managed_state_.draw_info.mode() == 105 return managed_state_.draw_info.mode() ==
102 ManagedTileState::DrawInfo::PICTURE_PILE_MODE || 106 ManagedTileState::DrawInfo::PICTURE_PILE_MODE ||
103 !managed_state_.draw_info.IsReadyToDraw(); 107 !managed_state_.draw_info.IsReadyToDraw();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 177
174 TilePriority priority_[NUM_TREES]; 178 TilePriority priority_[NUM_TREES];
175 ManagedTileState managed_state_; 179 ManagedTileState managed_state_;
176 int layer_id_; 180 int layer_id_;
177 int source_frame_number_; 181 int source_frame_number_;
178 int flags_; 182 int flags_;
179 bool is_shared_; 183 bool is_shared_;
180 int tiling_i_index_; 184 int tiling_i_index_;
181 int tiling_j_index_; 185 int tiling_j_index_;
182 bool required_for_activation_; 186 bool required_for_activation_;
187 bool required_for_draw_;
vmpstr 2014/10/24 18:02:24 Initialize in the ctor please.
ernstm 2014/10/27 21:13:56 Done.
183 188
184 Id id_; 189 Id id_;
185 static Id s_next_id_; 190 static Id s_next_id_;
186 191
187 DISALLOW_COPY_AND_ASSIGN(Tile); 192 DISALLOW_COPY_AND_ASSIGN(Tile);
188 }; 193 };
189 194
190 } // namespace cc 195 } // namespace cc
191 196
192 #endif // CC_RESOURCES_TILE_H_ 197 #endif // CC_RESOURCES_TILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698