| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 151 |
| 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( |
| 162 layer_tree_impl_->property_trees() | 162 effect_tree_index_, |
| 163 ->layer_id_to_effect_node_index[stable_effect_id_]); | 163 layer_tree_impl_->property_trees() |
| 164 ->effect_tree.FindNodeIndexFromOwningLayerId(stable_effect_id_)); |
| 164 return effect_tree_index_; | 165 return effect_tree_index_; |
| 165 } | 166 } |
| 166 | 167 |
| 167 const EffectNode* RenderSurfaceImpl::OwningEffectNode() const { | 168 const EffectNode* RenderSurfaceImpl::OwningEffectNode() const { |
| 168 return layer_tree_impl_->property_trees()->effect_tree.Node( | 169 return layer_tree_impl_->property_trees()->effect_tree.Node( |
| 169 EffectTreeIndex()); | 170 EffectTreeIndex()); |
| 170 } | 171 } |
| 171 | 172 |
| 172 void RenderSurfaceImpl::SetClipRect(const gfx::Rect& clip_rect) { | 173 void RenderSurfaceImpl::SetClipRect(const gfx::Rect& clip_rect) { |
| 173 if (clip_rect == draw_properties_.clip_rect) | 174 if (clip_rect == draw_properties_.clip_rect) |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 RenderPassDrawQuad* quad = | 420 RenderPassDrawQuad* quad = |
| 420 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 421 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
| 421 quad->SetNew( | 422 quad->SetNew( |
| 422 shared_quad_state, content_rect(), visible_layer_rect, GetRenderPassId(), | 423 shared_quad_state, content_rect(), visible_layer_rect, GetRenderPassId(), |
| 423 mask_resource_id, gfx::ScaleRect(gfx::RectF(content_rect()), | 424 mask_resource_id, gfx::ScaleRect(gfx::RectF(content_rect()), |
| 424 mask_uv_scale.x(), mask_uv_scale.y()), | 425 mask_uv_scale.x(), mask_uv_scale.y()), |
| 425 mask_texture_size, surface_contents_scale, FiltersOrigin(), gfx::RectF()); | 426 mask_texture_size, surface_contents_scale, FiltersOrigin(), gfx::RectF()); |
| 426 } | 427 } |
| 427 | 428 |
| 428 } // namespace cc | 429 } // namespace cc |
| OLD | NEW |