Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 792 } | 792 } |
| 793 | 793 |
| 794 void EffectTree::UpdateIsDrawn(EffectNode* node, EffectNode* parent_node) { | 794 void EffectTree::UpdateIsDrawn(EffectNode* node, EffectNode* parent_node) { |
| 795 // Nodes that have screen space opacity 0 are hidden. So they are not drawn. | 795 // Nodes that have screen space opacity 0 are hidden. So they are not drawn. |
| 796 // Exceptions: | 796 // Exceptions: |
| 797 // 1) Nodes that contribute to copy requests, whether hidden or not, must be | 797 // 1) Nodes that contribute to copy requests, whether hidden or not, must be |
| 798 // drawn. | 798 // drawn. |
| 799 // 2) Nodes that have a background filter. | 799 // 2) Nodes that have a background filter. |
| 800 // 3) Nodes with animating screen space opacity are drawn if their parent is | 800 // 3) Nodes with animating screen space opacity are drawn if their parent is |
| 801 // drawn irrespective of their opacity. | 801 // drawn irrespective of their opacity. |
| 802 if (node->has_copy_request) | 802 if (node->has_copy_request || node->force_render_surface) |
|
reveman
2017/05/10 13:06:17
I don't think we need this. Do we?
wutao
2017/05/11 19:36:35
Ok.
| |
| 803 node->is_drawn = true; | 803 node->is_drawn = true; |
| 804 else if (EffectiveOpacity(node) == 0.f && | 804 else if (EffectiveOpacity(node) == 0.f && |
| 805 !node->has_potential_opacity_animation && | 805 !node->has_potential_opacity_animation && |
| 806 node->background_filters.IsEmpty()) | 806 node->background_filters.IsEmpty()) |
| 807 node->is_drawn = false; | 807 node->is_drawn = false; |
| 808 else if (parent_node) | 808 else if (parent_node) |
| 809 node->is_drawn = parent_node->is_drawn; | 809 node->is_drawn = parent_node->is_drawn; |
| 810 else | 810 else |
| 811 node->is_drawn = true; | 811 node->is_drawn = true; |
| 812 } | 812 } |
| (...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2126 const EffectNode* effect_node = effect_tree.Node(effect_id); | 2126 const EffectNode* effect_node = effect_tree.Node(effect_id); |
| 2127 | 2127 |
| 2128 if (effect_node->surface_contents_scale.x() != 0.0 && | 2128 if (effect_node->surface_contents_scale.x() != 0.0 && |
| 2129 effect_node->surface_contents_scale.y() != 0.0) | 2129 effect_node->surface_contents_scale.y() != 0.0) |
| 2130 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(), | 2130 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(), |
| 2131 1.0 / effect_node->surface_contents_scale.y()); | 2131 1.0 / effect_node->surface_contents_scale.y()); |
| 2132 return screen_space_transform; | 2132 return screen_space_transform; |
| 2133 } | 2133 } |
| 2134 | 2134 |
| 2135 } // namespace cc | 2135 } // namespace cc |
| OLD | NEW |