Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 sorting_context_id() != 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 Loading... | |
| 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 sorting_context_id() const; | |
|
ajuma
2017/01/06 14:59:55
style nit: since this is no longer a trivial gette
wkorman
2017/01/06 22:50:02
Renamed to GetSortingContextId() (added Get prefix
| |
| 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 Loading... | |
| 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 ElementId element_id_; | 546 ElementId element_id_; |
| 550 uint32_t mutable_properties_; | 547 uint32_t mutable_properties_; |
| 551 // Rect indicating what was repainted/updated during update. | 548 // Rect indicating what was repainted/updated during update. |
| 552 // Note that plugin layers bypass this and leave it empty. | 549 // Note that plugin layers bypass this and leave it empty. |
| 553 // This is in the layer's space. | 550 // This is in the layer's space. |
| 554 gfx::Rect update_rect_; | 551 gfx::Rect update_rect_; |
| 555 | 552 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 576 bool has_will_change_transform_hint_ : 1; | 573 bool has_will_change_transform_hint_ : 1; |
| 577 bool needs_push_properties_ : 1; | 574 bool needs_push_properties_ : 1; |
| 578 bool scrollbars_hidden_ : 1; | 575 bool scrollbars_hidden_ : 1; |
| 579 | 576 |
| 580 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 577 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 581 }; | 578 }; |
| 582 | 579 |
| 583 } // namespace cc | 580 } // namespace cc |
| 584 | 581 |
| 585 #endif // CC_LAYERS_LAYER_IMPL_H_ | 582 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |