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

Side by Side Diff: cc/layers/layer.cc

Issue 2166043002: cc: Compute target space transform dynamically (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert ancestors_are_invertible change Created 4 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
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 "cc/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 974
975 int Layer::effect_tree_index() const { 975 int Layer::effect_tree_index() const {
976 if (!layer_tree_host_ || 976 if (!layer_tree_host_ ||
977 layer_tree_host_->property_trees()->sequence_number != 977 layer_tree_host_->property_trees()->sequence_number !=
978 property_tree_sequence_number_) { 978 property_tree_sequence_number_) {
979 return -1; 979 return -1;
980 } 980 }
981 return effect_tree_index_; 981 return effect_tree_index_;
982 } 982 }
983 983
984 int Layer::render_target_effect_tree_index() const {
985 EffectNode* effect_node =
986 layer_tree_host_->property_trees()->effect_tree.Node(effect_tree_index_);
987 if (effect_node->has_render_surface)
988 return effect_node->id;
989 else
990 return effect_node->target_id;
991 }
992
984 void Layer::SetScrollTreeIndex(int index) { 993 void Layer::SetScrollTreeIndex(int index) {
985 DCHECK(IsPropertyChangeAllowed()); 994 DCHECK(IsPropertyChangeAllowed());
986 if (scroll_tree_index_ == index) 995 if (scroll_tree_index_ == index)
987 return; 996 return;
988 scroll_tree_index_ = index; 997 scroll_tree_index_ = index;
989 SetNeedsPushProperties(); 998 SetNeedsPushProperties();
990 } 999 }
991 1000
992 int Layer::scroll_tree_index() const { 1001 int Layer::scroll_tree_index() const {
993 if (!layer_tree_host_ || 1002 if (!layer_tree_host_ ||
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
1843 ->num_copy_requests_in_subtree; 1852 ->num_copy_requests_in_subtree;
1844 } 1853 }
1845 1854
1846 gfx::Transform Layer::screen_space_transform() const { 1855 gfx::Transform Layer::screen_space_transform() const {
1847 DCHECK_NE(transform_tree_index_, -1); 1856 DCHECK_NE(transform_tree_index_, -1);
1848 return draw_property_utils::ScreenSpaceTransform( 1857 return draw_property_utils::ScreenSpaceTransform(
1849 this, layer_tree_host_->property_trees()->transform_tree); 1858 this, layer_tree_host_->property_trees()->transform_tree);
1850 } 1859 }
1851 1860
1852 } // namespace cc 1861 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698