Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
| 6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 // Floating point to match the LayerImpl version. | 313 // Floating point to match the LayerImpl version. |
| 314 return scroll_offset() + ScrollDelta(); | 314 return scroll_offset() + ScrollDelta(); |
| 315 } | 315 } |
| 316 | 316 |
| 317 void SetDoubleSided(bool double_sided); | 317 void SetDoubleSided(bool double_sided); |
| 318 bool double_sided() const { return double_sided_; } | 318 bool double_sided() const { return double_sided_; } |
| 319 | 319 |
| 320 void SetShouldFlattenTransform(bool flatten); | 320 void SetShouldFlattenTransform(bool flatten); |
| 321 bool should_flatten_transform() const { return should_flatten_transform_; } | 321 bool should_flatten_transform() const { return should_flatten_transform_; } |
| 322 | 322 |
| 323 void SetIs3dSorted(bool sorted); | 323 bool Is3dSorted() const { return (draw_properties_.context_id != 0); } |
|
danakj
2014/06/13 19:16:03
no () needed in the function body
troyhildebrandt
2014/06/13 22:56:35
Done.
| |
| 324 bool is_3d_sorted() const { return is_3d_sorted_; } | |
| 325 | 324 |
| 326 void set_use_parent_backface_visibility(bool use) { | 325 void set_use_parent_backface_visibility(bool use) { |
| 327 use_parent_backface_visibility_ = use; | 326 use_parent_backface_visibility_ = use; |
| 328 } | 327 } |
| 329 bool use_parent_backface_visibility() const { | 328 bool use_parent_backface_visibility() const { |
| 330 return use_parent_backface_visibility_; | 329 return use_parent_backface_visibility_; |
| 331 } | 330 } |
| 332 | 331 |
| 333 virtual void SetLayerTreeHost(LayerTreeHost* host); | 332 virtual void SetLayerTreeHost(LayerTreeHost* host); |
| 334 | 333 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 451 bool needs_push_properties() const { return needs_push_properties_; } | 450 bool needs_push_properties() const { return needs_push_properties_; } |
| 452 bool descendant_needs_push_properties() const { | 451 bool descendant_needs_push_properties() const { |
| 453 return num_dependents_need_push_properties_ > 0; | 452 return num_dependents_need_push_properties_ > 0; |
| 454 } | 453 } |
| 455 void reset_needs_push_properties_for_testing() { | 454 void reset_needs_push_properties_for_testing() { |
| 456 needs_push_properties_ = false; | 455 needs_push_properties_ = false; |
| 457 } | 456 } |
| 458 | 457 |
| 459 virtual void RunMicroBenchmark(MicroBenchmark* benchmark); | 458 virtual void RunMicroBenchmark(MicroBenchmark* benchmark); |
| 460 | 459 |
| 460 void SetContextId(int id); | |
| 461 int context_id() { return draw_properties_.context_id; } | |
| 462 | |
| 461 protected: | 463 protected: |
| 462 friend class LayerImpl; | 464 friend class LayerImpl; |
| 463 friend class TreeSynchronizer; | 465 friend class TreeSynchronizer; |
| 464 virtual ~Layer(); | 466 virtual ~Layer(); |
| 465 | 467 |
| 466 Layer(); | 468 Layer(); |
| 467 | 469 |
| 468 // These SetNeeds functions are in order of severity of update: | 470 // These SetNeeds functions are in order of severity of update: |
| 469 // | 471 // |
| 470 // Called when this layer has been modified in some way, but isn't sure | 472 // Called when this layer has been modified in some way, but isn't sure |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 581 bool is_container_for_fixed_position_layers_ : 1; | 583 bool is_container_for_fixed_position_layers_ : 1; |
| 582 bool is_drawable_ : 1; | 584 bool is_drawable_ : 1; |
| 583 bool hide_layer_and_subtree_ : 1; | 585 bool hide_layer_and_subtree_ : 1; |
| 584 bool masks_to_bounds_ : 1; | 586 bool masks_to_bounds_ : 1; |
| 585 bool contents_opaque_ : 1; | 587 bool contents_opaque_ : 1; |
| 586 bool double_sided_ : 1; | 588 bool double_sided_ : 1; |
| 587 bool should_flatten_transform_ : 1; | 589 bool should_flatten_transform_ : 1; |
| 588 bool use_parent_backface_visibility_ : 1; | 590 bool use_parent_backface_visibility_ : 1; |
| 589 bool draw_checkerboard_for_missing_tiles_ : 1; | 591 bool draw_checkerboard_for_missing_tiles_ : 1; |
| 590 bool force_render_surface_ : 1; | 592 bool force_render_surface_ : 1; |
| 591 bool is_3d_sorted_ : 1; | |
| 592 bool transform_is_invertible_ : 1; | 593 bool transform_is_invertible_ : 1; |
| 593 Region non_fast_scrollable_region_; | 594 Region non_fast_scrollable_region_; |
| 594 Region touch_event_handler_region_; | 595 Region touch_event_handler_region_; |
| 595 gfx::PointF position_; | 596 gfx::PointF position_; |
| 596 SkColor background_color_; | 597 SkColor background_color_; |
| 597 float opacity_; | 598 float opacity_; |
| 598 SkXfermode::Mode blend_mode_; | 599 SkXfermode::Mode blend_mode_; |
| 599 FilterOperations filters_; | 600 FilterOperations filters_; |
| 600 FilterOperations background_filters_; | 601 FilterOperations background_filters_; |
| 601 LayerPositionConstraint position_constraint_; | 602 LayerPositionConstraint position_constraint_; |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 623 DrawProperties<Layer> draw_properties_; | 624 DrawProperties<Layer> draw_properties_; |
| 624 | 625 |
| 625 PaintProperties paint_properties_; | 626 PaintProperties paint_properties_; |
| 626 | 627 |
| 627 DISALLOW_COPY_AND_ASSIGN(Layer); | 628 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 628 }; | 629 }; |
| 629 | 630 |
| 630 } // namespace cc | 631 } // namespace cc |
| 631 | 632 |
| 632 #endif // CC_LAYERS_LAYER_H_ | 633 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |