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

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

Issue 2615773003: Replace LayerImpl::sorting_context_id with transform reference. (Closed)
Patch Set: Update tests. Created 3 years, 11 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 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 SkBlendMode draw_blend_mode() const { return draw_blend_mode_; } 202 SkBlendMode draw_blend_mode() const { return draw_blend_mode_; }
203 203
204 void SetPosition(const gfx::PointF& position); 204 void SetPosition(const gfx::PointF& position);
205 gfx::PointF position() const { return position_; } 205 gfx::PointF position() const { return position_; }
206 206
207 bool IsAffectedByPageScale() const; 207 bool IsAffectedByPageScale() const;
208 208
209 gfx::Vector2dF FixedContainerSizeDelta() const; 209 gfx::Vector2dF FixedContainerSizeDelta() const;
210 210
211 bool Is3dSorted() const { return sorting_context_id_ != 0; } 211 bool Is3dSorted() const { return GetSortingContextId() != 0; }
212 212
213 void SetUseParentBackfaceVisibility(bool use) { 213 void SetUseParentBackfaceVisibility(bool use) {
214 use_parent_backface_visibility_ = use; 214 use_parent_backface_visibility_ = use;
215 } 215 }
216 bool use_parent_backface_visibility() const { 216 bool use_parent_backface_visibility() const {
217 return use_parent_backface_visibility_; 217 return use_parent_backface_visibility_;
218 } 218 }
219 219
220 void SetUseLocalTransformForBackfaceVisibility(bool use_local) { 220 void SetUseLocalTransformForBackfaceVisibility(bool use_local) {
221 use_local_transform_for_backface_visibility_ = use_local; 221 use_local_transform_for_backface_visibility_ = use_local;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 is_drawn_render_surface_layer_list_member_ = is_member; 402 is_drawn_render_surface_layer_list_member_ = is_member;
403 } 403 }
404 404
405 bool is_drawn_render_surface_layer_list_member() const { 405 bool is_drawn_render_surface_layer_list_member() const {
406 return is_drawn_render_surface_layer_list_member_; 406 return is_drawn_render_surface_layer_list_member_;
407 } 407 }
408 408
409 void set_may_contain_video(bool yes) { may_contain_video_ = yes; } 409 void set_may_contain_video(bool yes) { may_contain_video_ = yes; }
410 bool may_contain_video() const { return may_contain_video_; } 410 bool may_contain_video() const { return may_contain_video_; }
411 411
412 void Set3dSortingContextId(int id); 412 // Layers that share a sorting context id will be sorted together in 3d
413 int sorting_context_id() { return sorting_context_id_; } 413 // space. 0 is a special value that means this layer will not be sorted and
414 // will be drawn in paint order.
415 int GetSortingContextId() const;
414 416
415 // Get the correct invalidation region instead of conservative Rect 417 // Get the correct invalidation region instead of conservative Rect
416 // for layers that provide it. 418 // for layers that provide it.
417 virtual Region GetInvalidationRegionForDebugging(); 419 virtual Region GetInvalidationRegionForDebugging();
418 420
419 virtual gfx::Rect GetEnclosingRectInTargetSpace() const; 421 virtual gfx::Rect GetEnclosingRectInTargetSpace() const;
420 422
421 int num_copy_requests_in_target_subtree(); 423 int num_copy_requests_in_target_subtree();
422 424
423 void UpdatePropertyTreeForScrollingAndAnimationIfNeeded(); 425 void UpdatePropertyTreeForScrollingAndAnimationIfNeeded();
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 533
532 gfx::Rect clip_rect_in_target_space_; 534 gfx::Rect clip_rect_in_target_space_;
533 int transform_tree_index_; 535 int transform_tree_index_;
534 int effect_tree_index_; 536 int effect_tree_index_;
535 int clip_tree_index_; 537 int clip_tree_index_;
536 int scroll_tree_index_; 538 int scroll_tree_index_;
537 539
538 protected: 540 protected:
539 friend class TreeSynchronizer; 541 friend class TreeSynchronizer;
540 542
541 // Layers that share a sorting context id will be sorted together in 3d
542 // space. 0 is a special value that means this layer will not be sorted and
543 // will be drawn in paint order.
544 int sorting_context_id_;
545
546 DrawMode current_draw_mode_; 543 DrawMode current_draw_mode_;
547 544
548 private: 545 private:
549 PropertyTrees* GetPropertyTrees() const; 546 PropertyTrees* GetPropertyTrees() const;
550 EffectTree& GetEffectTree() const; 547 EffectTree& GetEffectTree() const;
551 ScrollTree& GetScrollTree() const; 548 ScrollTree& GetScrollTree() const;
552 TransformTree& GetTransformTree() const; 549 TransformTree& GetTransformTree() const;
553 550
554 ElementId element_id_; 551 ElementId element_id_;
555 uint32_t mutable_properties_; 552 uint32_t mutable_properties_;
(...skipping 25 matching lines...) Expand all
581 bool has_will_change_transform_hint_ : 1; 578 bool has_will_change_transform_hint_ : 1;
582 bool needs_push_properties_ : 1; 579 bool needs_push_properties_ : 1;
583 bool scrollbars_hidden_ : 1; 580 bool scrollbars_hidden_ : 1;
584 581
585 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 582 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
586 }; 583 };
587 584
588 } // namespace cc 585 } // namespace cc
589 586
590 #endif // CC_LAYERS_LAYER_IMPL_H_ 587 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698