| 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 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1203 } | 1203 } |
| 1204 | 1204 |
| 1205 void EffectTree::UpdateIsDrawn(EffectNode* node, EffectNode* parent_node) { | 1205 void EffectTree::UpdateIsDrawn(EffectNode* node, EffectNode* parent_node) { |
| 1206 // Nodes that have screen space opacity 0 are hidden. So they are not drawn. | 1206 // Nodes that have screen space opacity 0 are hidden. So they are not drawn. |
| 1207 // Exceptions: | 1207 // Exceptions: |
| 1208 // 1) Nodes that contribute to copy requests, whether hidden or not, must be | 1208 // 1) Nodes that contribute to copy requests, whether hidden or not, must be |
| 1209 // drawn. | 1209 // drawn. |
| 1210 // 2) Nodes that have a background filter. | 1210 // 2) Nodes that have a background filter. |
| 1211 // 3) Nodes with animating screen space opacity are drawn if their parent is | 1211 // 3) Nodes with animating screen space opacity are drawn if their parent is |
| 1212 // drawn irrespective of their opacity. | 1212 // drawn irrespective of their opacity. |
| 1213 if (node->data.has_copy_request || node->data.has_background_filters) | 1213 if (node->data.has_copy_request) |
| 1214 node->data.is_drawn = true; | 1214 node->data.is_drawn = true; |
| 1215 else if (node->data.opacity == 0.f && !node->data.has_animated_opacity) | 1215 else if (node->data.opacity == 0.f && !node->data.has_animated_opacity && |
| 1216 !node->data.has_background_filters) |
| 1216 node->data.is_drawn = false; | 1217 node->data.is_drawn = false; |
| 1217 else if (parent_node) | 1218 else if (parent_node) |
| 1218 node->data.is_drawn = parent_node->data.is_drawn; | 1219 node->data.is_drawn = parent_node->data.is_drawn; |
| 1219 else | 1220 else |
| 1220 node->data.is_drawn = true; | 1221 node->data.is_drawn = true; |
| 1221 } | 1222 } |
| 1222 | 1223 |
| 1223 void EffectTree::UpdateEffectChanged(EffectNode* node, | 1224 void EffectTree::UpdateEffectChanged(EffectNode* node, |
| 1224 EffectNode* parent_node) { | 1225 EffectNode* parent_node) { |
| 1225 if (parent_node && parent_node->data.effect_changed) { | 1226 if (parent_node && parent_node->data.effect_changed) { |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1917 break; | 1918 break; |
| 1918 case ALL_TREES: | 1919 case ALL_TREES: |
| 1919 transform_tree.ResetChangeTracking(); | 1920 transform_tree.ResetChangeTracking(); |
| 1920 effect_tree.ResetChangeTracking(); | 1921 effect_tree.ResetChangeTracking(); |
| 1921 } | 1922 } |
| 1922 changed = false; | 1923 changed = false; |
| 1923 full_tree_damaged = false; | 1924 full_tree_damaged = false; |
| 1924 } | 1925 } |
| 1925 | 1926 |
| 1926 } // namespace cc | 1927 } // namespace cc |
| OLD | NEW |