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

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

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Reduce unneeded code in surface aggregator and add more test. Created 3 years, 5 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
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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 } 795 }
796 796
797 void EffectTree::UpdateIsDrawn(EffectNode* node, EffectNode* parent_node) { 797 void EffectTree::UpdateIsDrawn(EffectNode* node, EffectNode* parent_node) {
798 // Nodes that have screen space opacity 0 are hidden. So they are not drawn. 798 // Nodes that have screen space opacity 0 are hidden. So they are not drawn.
799 // Exceptions: 799 // Exceptions:
800 // 1) Nodes that contribute to copy requests, whether hidden or not, must be 800 // 1) Nodes that contribute to copy requests, whether hidden or not, must be
801 // drawn. 801 // drawn.
802 // 2) Nodes that have a background filter. 802 // 2) Nodes that have a background filter.
803 // 3) Nodes with animating screen space opacity on main thread or pending tree 803 // 3) Nodes with animating screen space opacity on main thread or pending tree
804 // are drawn if their parent is drawn irrespective of their opacity. 804 // are drawn if their parent is drawn irrespective of their opacity.
805 if (node->has_copy_request) 805 if (node->has_copy_request || node->cache_render_surface)
806 node->is_drawn = true; 806 node->is_drawn = true;
807 else if (EffectiveOpacity(node) == 0.f && 807 else if (EffectiveOpacity(node) == 0.f &&
808 (!node->has_potential_opacity_animation || 808 (!node->has_potential_opacity_animation ||
809 property_trees()->is_active) && 809 property_trees()->is_active) &&
810 node->background_filters.IsEmpty()) 810 node->background_filters.IsEmpty())
811 node->is_drawn = false; 811 node->is_drawn = false;
812 else if (parent_node) 812 else if (parent_node)
813 node->is_drawn = parent_node->is_drawn; 813 node->is_drawn = parent_node->is_drawn;
814 else 814 else
815 node->is_drawn = true; 815 node->is_drawn = true;
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 const EffectNode* effect_node = effect_tree.Node(effect_id); 2177 const EffectNode* effect_node = effect_tree.Node(effect_id);
2178 2178
2179 if (effect_node->surface_contents_scale.x() != 0.0 && 2179 if (effect_node->surface_contents_scale.x() != 0.0 &&
2180 effect_node->surface_contents_scale.y() != 0.0) 2180 effect_node->surface_contents_scale.y() != 0.0)
2181 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(), 2181 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(),
2182 1.0 / effect_node->surface_contents_scale.y()); 2182 1.0 / effect_node->surface_contents_scale.y());
2183 return screen_space_transform; 2183 return screen_space_transform;
2184 } 2184 }
2185 2185
2186 } // namespace cc 2186 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698