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

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

Issue 1491033002: Create RenderSurface on Effect Tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@alwayspt
Patch Set: address review comments Created 5 years 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 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_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_LAYER_IMPL_H_
6 #define CC_LAYERS_LAYER_IMPL_H_ 6 #define CC_LAYERS_LAYER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 195
196 bool is_clipped() const { return draw_properties_.is_clipped; } 196 bool is_clipped() const { return draw_properties_.is_clipped; }
197 197
198 void UpdatePropertyTreeTransform(); 198 void UpdatePropertyTreeTransform();
199 void UpdatePropertyTreeTransformIsAnimated(bool is_animated); 199 void UpdatePropertyTreeTransformIsAnimated(bool is_animated);
200 void UpdatePropertyTreeOpacity(); 200 void UpdatePropertyTreeOpacity();
201 void UpdatePropertyTreeScrollOffset(); 201 void UpdatePropertyTreeScrollOffset();
202 202
203 // For compatibility with Layer. 203 // For compatibility with Layer.
204 bool has_render_surface() const { return !!render_surface(); } 204 bool has_render_surface() const { return !!render_surface(); }
205 205 bool force_render_surface() const { return force_render_surface_; }
206 void SetNumDescendantsThatDrawContent(int num_descendants); 206 void SetNumDescendantsThatDrawContent(int num_descendants);
207 void SetClipParent(LayerImpl* ancestor); 207 void SetClipParent(LayerImpl* ancestor);
208 208
209 LayerImpl* clip_parent() { 209 LayerImpl* clip_parent() {
210 return clip_parent_; 210 return clip_parent_;
211 } 211 }
212 const LayerImpl* clip_parent() const { 212 const LayerImpl* clip_parent() const {
213 return clip_parent_; 213 return clip_parent_;
214 } 214 }
215 215
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 } 373 }
374 374
375 bool ShowDebugBorders() const; 375 bool ShowDebugBorders() const;
376 376
377 // These invalidate the host's render surface layer list. The caller 377 // These invalidate the host's render surface layer list. The caller
378 // is responsible for calling set_needs_update_draw_properties on the tree 378 // is responsible for calling set_needs_update_draw_properties on the tree
379 // so that its list can be recreated. 379 // so that its list can be recreated.
380 void ClearRenderSurfaceLayerList(); 380 void ClearRenderSurfaceLayerList();
381 void SetHasRenderSurface(bool has_render_surface); 381 void SetHasRenderSurface(bool has_render_surface);
382 382
383 void SetForceRenderSurface(bool has_render_surface);
384
383 RenderSurfaceImpl* render_surface() const { return render_surface_.get(); } 385 RenderSurfaceImpl* render_surface() const { return render_surface_.get(); }
384 386
385 DrawProperties& draw_properties() { return draw_properties_; } 387 DrawProperties& draw_properties() { return draw_properties_; }
386 const DrawProperties& draw_properties() const { return draw_properties_; } 388 const DrawProperties& draw_properties() const { return draw_properties_; }
387 389
388 gfx::Transform DrawTransform() const; 390 gfx::Transform DrawTransform() const;
389 gfx::Transform ScreenSpaceTransform() const; 391 gfx::Transform ScreenSpaceTransform() const;
390 392
391 // The following are shortcut accessors to get various information from 393 // The following are shortcut accessors to get various information from
392 // draw_properties_ 394 // draw_properties_
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 523
522 void SetDoubleSided(bool double_sided); 524 void SetDoubleSided(bool double_sided);
523 bool double_sided() const { return double_sided_; } 525 bool double_sided() const { return double_sided_; }
524 526
525 void SetTransform(const gfx::Transform& transform); 527 void SetTransform(const gfx::Transform& transform);
526 const gfx::Transform& transform() const { return transform_; } 528 const gfx::Transform& transform() const { return transform_; }
527 bool TransformIsAnimating() const; 529 bool TransformIsAnimating() const;
528 bool HasPotentiallyRunningTransformAnimation() const; 530 bool HasPotentiallyRunningTransformAnimation() const;
529 bool TransformIsAnimatingOnImplOnly() const; 531 bool TransformIsAnimatingOnImplOnly() const;
530 bool HasOnlyTranslationTransforms() const; 532 bool HasOnlyTranslationTransforms() const;
533 bool AnimationsPreserveAxisAlignment() const;
531 void SetTransformAndInvertibility(const gfx::Transform& transform, 534 void SetTransformAndInvertibility(const gfx::Transform& transform,
532 bool transform_is_invertible); 535 bool transform_is_invertible);
533 bool transform_is_invertible() const { return transform_is_invertible_; } 536 bool transform_is_invertible() const { return transform_is_invertible_; }
534 537
535 bool MaximumTargetScale(float* max_scale) const; 538 bool MaximumTargetScale(float* max_scale) const;
536 bool AnimationStartScale(float* start_scale) const; 539 bool AnimationStartScale(float* start_scale) const;
537 540
538 // This includes all animations, even those that are finished but haven't yet 541 // This includes all animations, even those that are finished but haven't yet
539 // been deleted. 542 // been deleted.
540 bool HasAnyAnimationTargetingProperty( 543 bool HasAnyAnimationTargetingProperty(
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 861
859 std::vector<scoped_ptr<CopyOutputRequest>> copy_requests_; 862 std::vector<scoped_ptr<CopyOutputRequest>> copy_requests_;
860 863
861 // Group of properties that need to be computed based on the layer tree 864 // Group of properties that need to be computed based on the layer tree
862 // hierarchy before layers can be drawn. 865 // hierarchy before layers can be drawn.
863 DrawProperties draw_properties_; 866 DrawProperties draw_properties_;
864 867
865 scoped_refptr<base::trace_event::ConvertableToTraceFormat> debug_info_; 868 scoped_refptr<base::trace_event::ConvertableToTraceFormat> debug_info_;
866 scoped_ptr<RenderSurfaceImpl> render_surface_; 869 scoped_ptr<RenderSurfaceImpl> render_surface_;
867 870
871 bool force_render_surface_;
872
868 std::vector<FrameTimingRequest> frame_timing_requests_; 873 std::vector<FrameTimingRequest> frame_timing_requests_;
869 int num_layer_or_descendants_with_copy_request_; 874 int num_layer_or_descendants_with_copy_request_;
870 bool frame_timing_requests_dirty_; 875 bool frame_timing_requests_dirty_;
871 bool visited_; 876 bool visited_;
872 bool layer_or_descendant_is_drawn_; 877 bool layer_or_descendant_is_drawn_;
873 // If true, the layer or one of its descendants has a wheel or touch handler. 878 // If true, the layer or one of its descendants has a wheel or touch handler.
874 bool layer_or_descendant_has_input_handler_; 879 bool layer_or_descendant_has_input_handler_;
875 bool sorted_for_recursion_; 880 bool sorted_for_recursion_;
876 881
877 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 882 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
878 }; 883 };
879 884
880 } // namespace cc 885 } // namespace cc
881 886
882 #endif // CC_LAYERS_LAYER_IMPL_H_ 887 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | cc/layers/layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698