| 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 needs_push_properties_ = false; | 465 needs_push_properties_ = false; |
| 466 } | 466 } |
| 467 | 467 |
| 468 virtual void RunMicroBenchmark(MicroBenchmark* benchmark); | 468 virtual void RunMicroBenchmark(MicroBenchmark* benchmark); |
| 469 | 469 |
| 470 void Set3dSortingContextId(int id); | 470 void Set3dSortingContextId(int id); |
| 471 int sorting_context_id() const { return sorting_context_id_; } | 471 int sorting_context_id() const { return sorting_context_id_; } |
| 472 | 472 |
| 473 void set_transform_tree_index(int index) { transform_tree_index_ = index; } | 473 void set_transform_tree_index(int index) { transform_tree_index_ = index; } |
| 474 void set_clip_tree_index(int index) { clip_tree_index_ = index; } | 474 void set_clip_tree_index(int index) { clip_tree_index_ = index; } |
| 475 void set_opacity_tree_index(int index) { opacity_tree_index_ = index; } |
| 475 int clip_tree_index() const { return clip_tree_index_; } | 476 int clip_tree_index() const { return clip_tree_index_; } |
| 476 int transform_tree_index() const { return transform_tree_index_; } | 477 int transform_tree_index() const { return transform_tree_index_; } |
| 478 int opacity_tree_index() const { return opacity_tree_index_; } |
| 477 | 479 |
| 478 void set_offset_to_transform_parent(gfx::Vector2dF offset) { | 480 void set_offset_to_transform_parent(gfx::Vector2dF offset) { |
| 479 offset_to_transform_parent_ = offset; | 481 offset_to_transform_parent_ = offset; |
| 480 } | 482 } |
| 481 gfx::Vector2dF offset_to_transform_parent() const { | 483 gfx::Vector2dF offset_to_transform_parent() const { |
| 482 return offset_to_transform_parent_; | 484 return offset_to_transform_parent_; |
| 483 } | 485 } |
| 484 | 486 |
| 485 // TODO(vollick): Once we transition to transform and clip trees, rename these | 487 // TODO(vollick): Once we transition to transform and clip trees, rename these |
| 486 // functions and related values. The "from property trees" functions below | 488 // functions and related values. The "from property trees" functions below |
| 487 // use the transform and clip trees. Eventually, we will use these functions | 489 // use the transform and clip trees. Eventually, we will use these functions |
| 488 // to compute the official values, but these functions are retained for | 490 // to compute the official values, but these functions are retained for |
| 489 // testing purposes until we've migrated. | 491 // testing purposes until we've migrated. |
| 490 | 492 |
| 491 const gfx::Rect& visible_rect_from_property_trees() const { | 493 const gfx::Rect& visible_rect_from_property_trees() const { |
| 492 return visible_rect_from_property_trees_; | 494 return visible_rect_from_property_trees_; |
| 493 } | 495 } |
| 494 void set_visible_rect_from_property_trees(const gfx::Rect& rect) { | 496 void set_visible_rect_from_property_trees(const gfx::Rect& rect) { |
| 495 visible_rect_from_property_trees_ = rect; | 497 visible_rect_from_property_trees_ = rect; |
| 496 } | 498 } |
| 497 | 499 |
| 498 gfx::Transform screen_space_transform_from_property_trees( | 500 gfx::Transform screen_space_transform_from_property_trees( |
| 499 const TransformTree& tree) const; | 501 const TransformTree& tree) const; |
| 500 gfx::Transform draw_transform_from_property_trees( | 502 gfx::Transform draw_transform_from_property_trees( |
| 501 const TransformTree& tree) const; | 503 const TransformTree& tree) const; |
| 504 float DrawOpacityFromPropertyTrees(const OpacityTree& tree) const; |
| 502 | 505 |
| 503 // TODO(vollick): These values are temporary and will be removed as soon as | 506 // TODO(vollick): These values are temporary and will be removed as soon as |
| 504 // render surface determinations are moved out of CDP. They only exist because | 507 // render surface determinations are moved out of CDP. They only exist because |
| 505 // certain logic depends on whether or not a layer would render to a separate | 508 // certain logic depends on whether or not a layer would render to a separate |
| 506 // surface, but CDP destroys surfaces and targets it doesn't need, so without | 509 // surface, but CDP destroys surfaces and targets it doesn't need, so without |
| 507 // this boolean, this is impossible to determine after the fact without | 510 // this boolean, this is impossible to determine after the fact without |
| 508 // wastefully recomputing it. This is public for the time being so that it can | 511 // wastefully recomputing it. This is public for the time being so that it can |
| 509 // be accessed from CDP. | 512 // be accessed from CDP. |
| 510 bool has_render_surface() const { | 513 bool has_render_surface() const { |
| 511 return has_render_surface_; | 514 return has_render_surface_; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 | 714 |
| 712 std::vector<FrameTimingRequest> frame_timing_requests_; | 715 std::vector<FrameTimingRequest> frame_timing_requests_; |
| 713 bool frame_timing_requests_dirty_; | 716 bool frame_timing_requests_dirty_; |
| 714 | 717 |
| 715 DISALLOW_COPY_AND_ASSIGN(Layer); | 718 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 716 }; | 719 }; |
| 717 | 720 |
| 718 } // namespace cc | 721 } // namespace cc |
| 719 | 722 |
| 720 #endif // CC_LAYERS_LAYER_H_ | 723 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |