Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: cc/trees/property_tree.cc

Issue 1858233004: cc : Layers with background filters are drawn only if parent is drawn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test crash on bots Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698