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 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1237 if (parent_node) | 1237 if (parent_node) |
| 1238 node->data.screen_space_opacity *= parent_node->data.screen_space_opacity; | 1238 node->data.screen_space_opacity *= parent_node->data.screen_space_opacity; |
| 1239 } | 1239 } |
| 1240 | 1240 |
| 1241 void EffectTree::UpdateIsDrawn(EffectNode* node, EffectNode* parent_node) { | 1241 void EffectTree::UpdateIsDrawn(EffectNode* node, EffectNode* parent_node) { |
| 1242 // Nodes that have screen space opacity 0 are hidden. So they are not drawn. | 1242 // Nodes that have screen space opacity 0 are hidden. So they are not drawn. |
| 1243 // Exceptions: | 1243 // Exceptions: |
| 1244 // 1) Nodes that contribute to copy requests, whether hidden or not, must be | 1244 // 1) Nodes that contribute to copy requests, whether hidden or not, must be |
| 1245 // drawn. | 1245 // drawn. |
| 1246 // 2) Nodes that have a background filter. | 1246 // 2) Nodes that have a background filter. |
| 1247 // 3) Nodes with animating screen space opacity are drawn if their parent is | 1247 // 3) Nodes with animating screen space opacity on main thread or pending tree |
| 1248 // drawn irrespective of their opacity. | 1248 // are drawn if their parent is drawn irrespective of their opacity. |
| 1249 if (node->data.has_copy_request) | 1249 if (node->data.has_copy_request) |
| 1250 node->data.is_drawn = true; | 1250 node->data.is_drawn = true; |
| 1251 else if (node->data.opacity == 0.f && !node->data.has_animated_opacity && | 1251 else if (node->data.opacity == 0.f && |
| 1252 (!node->data.has_animated_opacity || property_trees()->is_active) && | |
|
ajuma
2016/04/12 21:48:14
What if nothing triggers a property tree update on
jaydasika
2016/04/13 00:13:42
Split this into 2 bools to handle the case.
ajuma
2016/04/13 14:33:15
Hmm. Given that the effect tree is likely to only
jaydasika
2016/04/13 18:48:42
Done.
| |
| 1252 !node->data.has_background_filters) | 1253 !node->data.has_background_filters) |
| 1253 node->data.is_drawn = false; | 1254 node->data.is_drawn = false; |
| 1254 else if (parent_node) | 1255 else if (parent_node) |
| 1255 node->data.is_drawn = parent_node->data.is_drawn; | 1256 node->data.is_drawn = parent_node->data.is_drawn; |
| 1256 else | 1257 else |
| 1257 node->data.is_drawn = true; | 1258 node->data.is_drawn = true; |
| 1258 } | 1259 } |
| 1259 | 1260 |
| 1260 void EffectTree::UpdateEffectChanged(EffectNode* node, | 1261 void EffectTree::UpdateEffectChanged(EffectNode* node, |
| 1261 EffectNode* parent_node) { | 1262 EffectNode* parent_node) { |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1954 break; | 1955 break; |
| 1955 case ALL_TREES: | 1956 case ALL_TREES: |
| 1956 transform_tree.ResetChangeTracking(); | 1957 transform_tree.ResetChangeTracking(); |
| 1957 effect_tree.ResetChangeTracking(); | 1958 effect_tree.ResetChangeTracking(); |
| 1958 } | 1959 } |
| 1959 changed = false; | 1960 changed = false; |
| 1960 full_tree_damaged = false; | 1961 full_tree_damaged = false; |
| 1961 } | 1962 } |
| 1962 | 1963 |
| 1963 } // namespace cc | 1964 } // namespace cc |
| OLD | NEW |