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

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

Issue 2866733002: Remove owning_id from EffectNode and replace it by an opaque stable_id (Closed)
Patch Set: none 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/layers/layer_impl.cc ('k') | cc/layers/scrollbar_layer_impl_base.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/render_surface_impl.h" 5 #include "cc/layers/render_surface_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 int RenderSurfaceImpl::TransformTreeIndex() const { 156 int RenderSurfaceImpl::TransformTreeIndex() const {
157 return OwningEffectNode()->transform_id; 157 return OwningEffectNode()->transform_id;
158 } 158 }
159 159
160 int RenderSurfaceImpl::ClipTreeIndex() const { 160 int RenderSurfaceImpl::ClipTreeIndex() const {
161 return OwningEffectNode()->clip_id; 161 return OwningEffectNode()->clip_id;
162 } 162 }
163 163
164 int RenderSurfaceImpl::EffectTreeIndex() const { 164 int RenderSurfaceImpl::EffectTreeIndex() const {
165 DCHECK_EQ(
166 effect_tree_index_,
167 layer_tree_impl_->property_trees()
168 ->effect_tree.FindNodeIndexFromOwningLayerId(stable_effect_id_));
169 return effect_tree_index_; 165 return effect_tree_index_;
170 } 166 }
171 167
172 const EffectNode* RenderSurfaceImpl::OwningEffectNode() const { 168 const EffectNode* RenderSurfaceImpl::OwningEffectNode() const {
173 return layer_tree_impl_->property_trees()->effect_tree.Node( 169 return layer_tree_impl_->property_trees()->effect_tree.Node(
174 EffectTreeIndex()); 170 EffectTreeIndex());
175 } 171 }
176 172
177 void RenderSurfaceImpl::SetClipRect(const gfx::Rect& clip_rect) { 173 void RenderSurfaceImpl::SetClipRect(const gfx::Rect& clip_rect) {
178 if (clip_rect == draw_properties_.clip_rect) 174 if (clip_rect == draw_properties_.clip_rect)
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 NOTIMPLEMENTED(); 538 NOTIMPLEMENTED();
543 break; 539 break;
544 default: 540 default:
545 NOTREACHED(); 541 NOTREACHED();
546 break; 542 break;
547 } 543 }
548 } 544 }
549 } 545 }
550 546
551 } // namespace cc 547 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/scrollbar_layer_impl_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698