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

Side by Side Diff: cc/layers/render_surface_impl.h

Issue 2360003002: cc: Compute SurfacePropertyChanged without depending on owning layer (Closed)
Patch Set: Address review comment Created 4 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
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/render_surface_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_LAYERS_RENDER_SURFACE_IMPL_H_ 5 #ifndef CC_LAYERS_RENDER_SURFACE_IMPL_H_
6 #define CC_LAYERS_RENDER_SURFACE_IMPL_H_ 6 #define CC_LAYERS_RENDER_SURFACE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 LayerImpl* ReplicaMaskLayer(); 154 LayerImpl* ReplicaMaskLayer();
155 bool HasReplicaMask() const; 155 bool HasReplicaMask() const;
156 156
157 const FilterOperations& Filters() const; 157 const FilterOperations& Filters() const;
158 const FilterOperations& BackgroundFilters() const; 158 const FilterOperations& BackgroundFilters() const;
159 gfx::PointF FiltersOrigin() const; 159 gfx::PointF FiltersOrigin() const;
160 gfx::Transform FiltersTransform() const; 160 gfx::Transform FiltersTransform() const;
161 161
162 bool HasCopyRequest() const; 162 bool HasCopyRequest() const;
163 163
164 void ResetPropertyChangedFlag() { surface_property_changed_ = false; } 164 void ResetPropertyChangedFlags();
165 bool SurfacePropertyChanged() const; 165 bool SurfacePropertyChanged() const;
166 bool SurfacePropertyChangedOnlyFromDescendant() const; 166 bool SurfacePropertyChangedOnlyFromDescendant() const;
167 bool AncestorPropertyChanged() const;
168 void NoteAncestorPropertyChanged();
167 169
168 DamageTracker* damage_tracker() const { return damage_tracker_.get(); } 170 DamageTracker* damage_tracker() const { return damage_tracker_.get(); }
169 171
170 RenderPassId GetRenderPassId(); 172 RenderPassId GetRenderPassId();
171 173
172 void AppendRenderPasses(RenderPassSink* pass_sink); 174 void AppendRenderPasses(RenderPassSink* pass_sink);
173 void AppendQuads(RenderPass* render_pass, 175 void AppendQuads(RenderPass* render_pass,
174 const gfx::Transform& draw_transform, 176 const gfx::Transform& draw_transform,
175 const Occlusion& occlusion_in_content_space, 177 const Occlusion& occlusion_in_content_space,
176 SkColor debug_border_color, 178 SkColor debug_border_color,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 220
219 // True if the surface needs to be clipped by clip_rect. 221 // True if the surface needs to be clipped by clip_rect.
220 bool is_clipped : 1; 222 bool is_clipped : 1;
221 }; 223 };
222 224
223 DrawProperties draw_properties_; 225 DrawProperties draw_properties_;
224 226
225 // Is used to calculate the content rect from property trees. 227 // Is used to calculate the content rect from property trees.
226 gfx::Rect accumulated_content_rect_; 228 gfx::Rect accumulated_content_rect_;
227 bool surface_property_changed_ : 1; 229 bool surface_property_changed_ : 1;
230 bool ancestor_property_changed_ : 1;
228 231
229 bool contributes_to_drawn_surface_ : 1; 232 bool contributes_to_drawn_surface_ : 1;
230 233
231 LayerImplList layer_list_; 234 LayerImplList layer_list_;
232 Occlusion occlusion_in_content_space_; 235 Occlusion occlusion_in_content_space_;
233 236
234 // The nearest ancestor target surface that will contain the contents of this 237 // The nearest ancestor target surface that will contain the contents of this
235 // surface, and that ignores outside occlusion. This can point to itself. 238 // surface, and that ignores outside occlusion. This can point to itself.
236 const RenderSurfaceImpl* nearest_occlusion_immune_ancestor_; 239 const RenderSurfaceImpl* nearest_occlusion_immune_ancestor_;
237 240
238 std::unique_ptr<DamageTracker> damage_tracker_; 241 std::unique_ptr<DamageTracker> damage_tracker_;
239 242
240 // For LayerIteratorActions 243 // For LayerIteratorActions
241 int target_render_surface_layer_index_history_; 244 int target_render_surface_layer_index_history_;
242 size_t current_layer_index_history_; 245 size_t current_layer_index_history_;
243 246
244 friend class LayerIterator; 247 friend class LayerIterator;
245 248
246 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); 249 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl);
247 }; 250 };
248 251
249 } // namespace cc 252 } // namespace cc
250 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ 253 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/render_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698