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 #include <vector> | 10 #include <vector> |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
470 } | 470 } |
471 void reset_needs_push_properties_for_testing() { | 471 void reset_needs_push_properties_for_testing() { |
472 needs_push_properties_ = false; | 472 needs_push_properties_ = false; |
473 } | 473 } |
474 | 474 |
475 virtual void RunMicroBenchmark(MicroBenchmark* benchmark); | 475 virtual void RunMicroBenchmark(MicroBenchmark* benchmark); |
476 | 476 |
477 void Set3dSortingContextId(int id); | 477 void Set3dSortingContextId(int id); |
478 int sorting_context_id() const { return sorting_context_id_; } | 478 int sorting_context_id() const { return sorting_context_id_; } |
479 | 479 |
480 // TODO(enne): should these set needs push properties? | |
ajuma
2015/04/16 21:58:14
I think they'll need to, since they could change w
enne (OOO)
2015/04/16 22:16:54
Done. I didn't add any "if (new != old) push" log
| |
480 void set_transform_tree_index(int index) { transform_tree_index_ = index; } | 481 void set_transform_tree_index(int index) { transform_tree_index_ = index; } |
481 void set_clip_tree_index(int index) { clip_tree_index_ = index; } | 482 void set_clip_tree_index(int index) { clip_tree_index_ = index; } |
482 void set_opacity_tree_index(int index) { opacity_tree_index_ = index; } | 483 void set_opacity_tree_index(int index) { opacity_tree_index_ = index; } |
483 int clip_tree_index() const { return clip_tree_index_; } | 484 int clip_tree_index() const { return clip_tree_index_; } |
484 int transform_tree_index() const { return transform_tree_index_; } | 485 int transform_tree_index() const { return transform_tree_index_; } |
485 int opacity_tree_index() const { return opacity_tree_index_; } | 486 int opacity_tree_index() const { return opacity_tree_index_; } |
486 | 487 |
487 void set_offset_to_transform_parent(gfx::Vector2dF offset) { | 488 void set_offset_to_transform_parent(gfx::Vector2dF offset) { |
488 offset_to_transform_parent_ = offset; | 489 offset_to_transform_parent_ = offset; |
489 } | 490 } |
490 gfx::Vector2dF offset_to_transform_parent() const { | 491 gfx::Vector2dF offset_to_transform_parent() const { |
491 return offset_to_transform_parent_; | 492 return offset_to_transform_parent_; |
492 } | 493 } |
493 | 494 |
494 // TODO(vollick): Once we transition to transform and clip trees, rename these | 495 // TODO(vollick): Once we transition to transform and clip trees, rename these |
495 // functions and related values. The "from property trees" functions below | 496 // functions and related values. The "from property trees" functions below |
496 // use the transform and clip trees. Eventually, we will use these functions | 497 // use the transform and clip trees. Eventually, we will use these functions |
497 // to compute the official values, but these functions are retained for | 498 // to compute the official values, but these functions are retained for |
498 // testing purposes until we've migrated. | 499 // testing purposes until we've migrated. |
499 | 500 |
500 const gfx::Rect& visible_rect_from_property_trees() const { | 501 const gfx::Rect& visible_rect_from_property_trees() const { |
501 return visible_rect_from_property_trees_; | 502 return visible_rect_from_property_trees_; |
502 } | 503 } |
503 void set_visible_rect_from_property_trees(const gfx::Rect& rect) { | 504 void set_visible_rect_from_property_trees(const gfx::Rect& rect) { |
504 visible_rect_from_property_trees_ = rect; | 505 visible_rect_from_property_trees_ = rect; |
505 } | 506 } |
506 | 507 |
507 gfx::Transform screen_space_transform_from_property_trees( | |
508 const TransformTree& tree) const; | |
509 gfx::Transform draw_transform_from_property_trees( | |
510 const TransformTree& tree) const; | |
511 float DrawOpacityFromPropertyTrees(const OpacityTree& tree) const; | |
512 | |
513 void set_should_flatten_transform_from_property_tree(bool should_flatten) { | 508 void set_should_flatten_transform_from_property_tree(bool should_flatten) { |
514 should_flatten_transform_from_property_tree_ = should_flatten; | 509 should_flatten_transform_from_property_tree_ = should_flatten; |
515 } | 510 } |
511 bool should_flatten_transform_from_property_tree() const { | |
512 return should_flatten_transform_from_property_tree_; | |
513 } | |
516 | 514 |
517 // TODO(vollick): These values are temporary and will be removed as soon as | 515 // TODO(vollick): These values are temporary and will be removed as soon as |
518 // render surface determinations are moved out of CDP. They only exist because | 516 // render surface determinations are moved out of CDP. They only exist because |
519 // certain logic depends on whether or not a layer would render to a separate | 517 // certain logic depends on whether or not a layer would render to a separate |
520 // surface, but CDP destroys surfaces and targets it doesn't need, so without | 518 // surface, but CDP destroys surfaces and targets it doesn't need, so without |
521 // this boolean, this is impossible to determine after the fact without | 519 // this boolean, this is impossible to determine after the fact without |
522 // wastefully recomputing it. This is public for the time being so that it can | 520 // wastefully recomputing it. This is public for the time being so that it can |
523 // be accessed from CDP. | 521 // be accessed from CDP. |
524 bool has_render_surface() const { | 522 bool has_render_surface() const { |
525 return has_render_surface_; | 523 return has_render_surface_; |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
728 | 726 |
729 std::vector<FrameTimingRequest> frame_timing_requests_; | 727 std::vector<FrameTimingRequest> frame_timing_requests_; |
730 bool frame_timing_requests_dirty_; | 728 bool frame_timing_requests_dirty_; |
731 | 729 |
732 DISALLOW_COPY_AND_ASSIGN(Layer); | 730 DISALLOW_COPY_AND_ASSIGN(Layer); |
733 }; | 731 }; |
734 | 732 |
735 } // namespace cc | 733 } // namespace cc |
736 | 734 |
737 #endif // CC_LAYERS_LAYER_H_ | 735 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |