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

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

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Rebased to resolve conflict. Created 3 years, 4 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/occlusion_tracker.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | 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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 } 769 }
770 770
771 void EffectTree::UpdateIsDrawn(EffectNode* node, EffectNode* parent_node) { 771 void EffectTree::UpdateIsDrawn(EffectNode* node, EffectNode* parent_node) {
772 // Nodes that have screen space opacity 0 are hidden. So they are not drawn. 772 // Nodes that have screen space opacity 0 are hidden. So they are not drawn.
773 // Exceptions: 773 // Exceptions:
774 // 1) Nodes that contribute to copy requests, whether hidden or not, must be 774 // 1) Nodes that contribute to copy requests, whether hidden or not, must be
775 // drawn. 775 // drawn.
776 // 2) Nodes that have a background filter. 776 // 2) Nodes that have a background filter.
777 // 3) Nodes with animating screen space opacity on main thread or pending tree 777 // 3) Nodes with animating screen space opacity on main thread or pending tree
778 // are drawn if their parent is drawn irrespective of their opacity. 778 // are drawn if their parent is drawn irrespective of their opacity.
779 if (node->has_copy_request) 779 if (node->has_copy_request || node->cache_render_surface)
780 node->is_drawn = true; 780 node->is_drawn = true;
781 else if (EffectiveOpacity(node) == 0.f && 781 else if (EffectiveOpacity(node) == 0.f &&
782 (!node->has_potential_opacity_animation || 782 (!node->has_potential_opacity_animation ||
783 property_trees()->is_active) && 783 property_trees()->is_active) &&
784 node->background_filters.IsEmpty()) 784 node->background_filters.IsEmpty())
785 node->is_drawn = false; 785 node->is_drawn = false;
786 else if (parent_node) 786 else if (parent_node)
787 node->is_drawn = parent_node->is_drawn; 787 node->is_drawn = parent_node->is_drawn;
788 else 788 else
789 node->is_drawn = true; 789 node->is_drawn = true;
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
2159 const EffectNode* effect_node = effect_tree.Node(effect_id); 2159 const EffectNode* effect_node = effect_tree.Node(effect_id);
2160 2160
2161 if (effect_node->surface_contents_scale.x() != 0.0 && 2161 if (effect_node->surface_contents_scale.x() != 0.0 &&
2162 effect_node->surface_contents_scale.y() != 0.0) 2162 effect_node->surface_contents_scale.y() != 0.0)
2163 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(), 2163 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(),
2164 1.0 / effect_node->surface_contents_scale.y()); 2164 1.0 / effect_node->surface_contents_scale.y());
2165 return screen_space_transform; 2165 return screen_space_transform;
2166 } 2166 }
2167 2167
2168 } // namespace cc 2168 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/occlusion_tracker.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698