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

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

Issue 2894953003: Revert of cc : Don't draw animating layers which are transparent but raster them. (Closed)
Patch Set: rebase Created 3 years, 7 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_impl.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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 if (parent_node) 791 if (parent_node)
792 node->screen_space_opacity *= parent_node->screen_space_opacity; 792 node->screen_space_opacity *= parent_node->screen_space_opacity;
793 } 793 }
794 794
795 void EffectTree::UpdateIsDrawn(EffectNode* node, EffectNode* parent_node) { 795 void EffectTree::UpdateIsDrawn(EffectNode* node, EffectNode* parent_node) {
796 // Nodes that have screen space opacity 0 are hidden. So they are not drawn. 796 // Nodes that have screen space opacity 0 are hidden. So they are not drawn.
797 // Exceptions: 797 // Exceptions:
798 // 1) Nodes that contribute to copy requests, whether hidden or not, must be 798 // 1) Nodes that contribute to copy requests, whether hidden or not, must be
799 // drawn. 799 // drawn.
800 // 2) Nodes that have a background filter. 800 // 2) Nodes that have a background filter.
801 // 3) Nodes with animating screen space opacity are drawn if their parent is 801 // 3) Nodes with animating screen space opacity on main thread or pending tree
802 // drawn irrespective of their opacity. 802 // are drawn if their parent is drawn irrespective of their opacity.
803 if (node->has_copy_request) 803 if (node->has_copy_request)
804 node->is_drawn = true; 804 node->is_drawn = true;
805 else if (EffectiveOpacity(node) == 0.f && 805 else if (EffectiveOpacity(node) == 0.f &&
806 !node->has_potential_opacity_animation && 806 (!node->has_potential_opacity_animation ||
807 property_trees()->is_active) &&
807 node->background_filters.IsEmpty()) 808 node->background_filters.IsEmpty())
808 node->is_drawn = false; 809 node->is_drawn = false;
809 else if (parent_node) 810 else if (parent_node)
810 node->is_drawn = parent_node->is_drawn; 811 node->is_drawn = parent_node->is_drawn;
811 else 812 else
812 node->is_drawn = true; 813 node->is_drawn = true;
813 } 814 }
814 815
815 void EffectTree::UpdateEffectChanged(EffectNode* node, 816 void EffectTree::UpdateEffectChanged(EffectNode* node,
816 EffectNode* parent_node) { 817 EffectNode* parent_node) {
(...skipping 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 const EffectNode* effect_node = effect_tree.Node(effect_id); 2102 const EffectNode* effect_node = effect_tree.Node(effect_id);
2102 2103
2103 if (effect_node->surface_contents_scale.x() != 0.0 && 2104 if (effect_node->surface_contents_scale.x() != 0.0 &&
2104 effect_node->surface_contents_scale.y() != 0.0) 2105 effect_node->surface_contents_scale.y() != 0.0)
2105 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(), 2106 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(),
2106 1.0 / effect_node->surface_contents_scale.y()); 2107 1.0 / effect_node->surface_contents_scale.y());
2107 return screen_space_transform; 2108 return screen_space_transform;
2108 } 2109 }
2109 2110
2110 } // namespace cc 2111 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698