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

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

Issue 2753933005: cc: Move Layer Id to Node Map to Individual Property Tree Private (Closed)
Patch Set: add virtual to desctructor of ptree Created 3 years, 9 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 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 int RenderSurfaceImpl::TransformTreeIndex() const { 152 int RenderSurfaceImpl::TransformTreeIndex() const {
153 return OwningEffectNode()->transform_id; 153 return OwningEffectNode()->transform_id;
154 } 154 }
155 155
156 int RenderSurfaceImpl::ClipTreeIndex() const { 156 int RenderSurfaceImpl::ClipTreeIndex() const {
157 return OwningEffectNode()->clip_id; 157 return OwningEffectNode()->clip_id;
158 } 158 }
159 159
160 int RenderSurfaceImpl::EffectTreeIndex() const { 160 int RenderSurfaceImpl::EffectTreeIndex() const {
161 DCHECK_EQ(effect_tree_index_, 161 DCHECK_EQ(effect_tree_index_,
162 layer_tree_impl_->property_trees() 162 layer_tree_impl_->property_trees()->effect_tree.FindNodeIndexFromId(
163 ->layer_id_to_effect_node_index[stable_effect_id_]); 163 stable_effect_id_));
164 return effect_tree_index_; 164 return effect_tree_index_;
165 } 165 }
166 166
167 const EffectNode* RenderSurfaceImpl::OwningEffectNode() const { 167 const EffectNode* RenderSurfaceImpl::OwningEffectNode() const {
168 return layer_tree_impl_->property_trees()->effect_tree.Node( 168 return layer_tree_impl_->property_trees()->effect_tree.Node(
169 EffectTreeIndex()); 169 EffectTreeIndex());
170 } 170 }
171 171
172 void RenderSurfaceImpl::SetClipRect(const gfx::Rect& clip_rect) { 172 void RenderSurfaceImpl::SetClipRect(const gfx::Rect& clip_rect) {
173 if (clip_rect == draw_properties_.clip_rect) 173 if (clip_rect == draw_properties_.clip_rect)
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 RenderPassDrawQuad* quad = 419 RenderPassDrawQuad* quad =
420 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); 420 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
421 quad->SetNew( 421 quad->SetNew(
422 shared_quad_state, content_rect(), visible_layer_rect, GetRenderPassId(), 422 shared_quad_state, content_rect(), visible_layer_rect, GetRenderPassId(),
423 mask_resource_id, gfx::ScaleRect(gfx::RectF(content_rect()), 423 mask_resource_id, gfx::ScaleRect(gfx::RectF(content_rect()),
424 mask_uv_scale.x(), mask_uv_scale.y()), 424 mask_uv_scale.x(), mask_uv_scale.y()),
425 mask_texture_size, surface_contents_scale, FiltersOrigin(), gfx::RectF()); 425 mask_texture_size, surface_contents_scale, FiltersOrigin(), gfx::RectF());
426 } 426 }
427 427
428 } // namespace cc 428 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698