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

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

Issue 2822303003: cc : Compute subtree has copy requests before property tree building (Closed)
Patch Set: . Created 3 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
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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 it->set_area(MathUtil::MapEnclosingClippedRect(transform, it->area())); 979 it->set_area(MathUtil::MapEnclosingClippedRect(transform, it->area()));
980 } 980 }
981 } 981 }
982 982
983 bool EffectTree::HasCopyRequests() const { 983 bool EffectTree::HasCopyRequests() const {
984 return !copy_requests_.empty(); 984 return !copy_requests_.empty();
985 } 985 }
986 986
987 void EffectTree::ClearCopyRequests() { 987 void EffectTree::ClearCopyRequests() {
988 for (auto& node : nodes()) { 988 for (auto& node : nodes()) {
989 node.num_copy_requests_in_subtree = 0; 989 node.subtree_has_copy_request = false;
990 node.has_copy_request = false; 990 node.has_copy_request = false;
991 } 991 }
992 992
993 // Any copy requests that are still left will be aborted (sending an empty 993 // Any copy requests that are still left will be aborted (sending an empty
994 // result) on destruction. 994 // result) on destruction.
995 copy_requests_.clear(); 995 copy_requests_.clear();
996 set_needs_update(true); 996 set_needs_update(true);
997 } 997 }
998 998
999 int EffectTree::ClosestAncestorWithCopyRequest(int id) const { 999 int EffectTree::ClosestAncestorWithCopyRequest(int id) const {
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
2132 const EffectNode* effect_node = effect_tree.Node(effect_id); 2132 const EffectNode* effect_node = effect_tree.Node(effect_id);
2133 2133
2134 if (effect_node->surface_contents_scale.x() != 0.0 && 2134 if (effect_node->surface_contents_scale.x() != 0.0 &&
2135 effect_node->surface_contents_scale.y() != 0.0) 2135 effect_node->surface_contents_scale.y() != 0.0)
2136 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(), 2136 screen_space_transform.Scale(1.0 / effect_node->surface_contents_scale.x(),
2137 1.0 / effect_node->surface_contents_scale.y()); 2137 1.0 / effect_node->surface_contents_scale.y());
2138 return screen_space_transform; 2138 return screen_space_transform;
2139 } 2139 }
2140 2140
2141 } // namespace cc 2141 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698