| OLD | NEW |
| 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 Loading... |
| 155 return owning_layer_->transform_tree_index(); | 155 return owning_layer_->transform_tree_index(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 int RenderSurfaceImpl::ClipTreeIndex() const { | 158 int RenderSurfaceImpl::ClipTreeIndex() const { |
| 159 return owning_layer_->clip_tree_index(); | 159 return owning_layer_->clip_tree_index(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 int RenderSurfaceImpl::EffectTreeIndex() const { | 162 int RenderSurfaceImpl::EffectTreeIndex() const { |
| 163 DCHECK_EQ(effect_tree_index_, | 163 DCHECK_EQ(effect_tree_index_, |
| 164 layer_tree_impl_->property_trees() | 164 layer_tree_impl_->property_trees() |
| 165 ->effect_id_to_index_map[stable_effect_id_]); | 165 ->layer_id_to_effect_node_index[stable_effect_id_]); |
| 166 return effect_tree_index_; | 166 return effect_tree_index_; |
| 167 } | 167 } |
| 168 | 168 |
| 169 const EffectNode* RenderSurfaceImpl::OwningEffectNode() const { | 169 const EffectNode* RenderSurfaceImpl::OwningEffectNode() const { |
| 170 return layer_tree_impl_->property_trees()->effect_tree.Node( | 170 return layer_tree_impl_->property_trees()->effect_tree.Node( |
| 171 EffectTreeIndex()); | 171 EffectTreeIndex()); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void RenderSurfaceImpl::SetClipRect(const gfx::Rect& clip_rect) { | 174 void RenderSurfaceImpl::SetClipRect(const gfx::Rect& clip_rect) { |
| 175 if (clip_rect == draw_properties_.clip_rect) | 175 if (clip_rect == draw_properties_.clip_rect) |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 396 |
| 397 RenderPassDrawQuad* quad = | 397 RenderPassDrawQuad* quad = |
| 398 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 398 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
| 399 quad->SetNew(shared_quad_state, content_rect(), visible_layer_rect, | 399 quad->SetNew(shared_quad_state, content_rect(), visible_layer_rect, |
| 400 GetRenderPassId(), mask_resource_id, mask_uv_scale, | 400 GetRenderPassId(), mask_resource_id, mask_uv_scale, |
| 401 mask_texture_size, owning_layer_to_target_scale, | 401 mask_texture_size, owning_layer_to_target_scale, |
| 402 FiltersOrigin()); | 402 FiltersOrigin()); |
| 403 } | 403 } |
| 404 | 404 |
| 405 } // namespace cc | 405 } // namespace cc |
| OLD | NEW |