| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 return DebugColors::SurfaceBorderWidth( | 120 return DebugColors::SurfaceBorderWidth( |
| 121 layer_tree_impl_ ? layer_tree_impl_->device_scale_factor() : 1); | 121 layer_tree_impl_ ? layer_tree_impl_->device_scale_factor() : 1); |
| 122 } | 122 } |
| 123 | 123 |
| 124 LayerImpl* RenderSurfaceImpl::MaskLayer() { | 124 LayerImpl* RenderSurfaceImpl::MaskLayer() { |
| 125 int mask_layer_id = OwningEffectNode()->mask_layer_id; | 125 int mask_layer_id = OwningEffectNode()->mask_layer_id; |
| 126 return layer_tree_impl_->LayerById(mask_layer_id); | 126 return layer_tree_impl_->LayerById(mask_layer_id); |
| 127 } | 127 } |
| 128 | 128 |
| 129 bool RenderSurfaceImpl::HasMask() const { | 129 bool RenderSurfaceImpl::HasMask() const { |
| 130 // TODO(wkorman): Shouldn't we use Layer::INVALID_ID rather than |
| 131 // kInvalidNodeId below? |
| 130 return OwningEffectNode()->mask_layer_id != EffectTree::kInvalidNodeId; | 132 return OwningEffectNode()->mask_layer_id != EffectTree::kInvalidNodeId; |
| 131 } | 133 } |
| 132 | 134 |
| 133 const FilterOperations& RenderSurfaceImpl::Filters() const { | 135 const FilterOperations& RenderSurfaceImpl::Filters() const { |
| 134 return OwningEffectNode()->filters; | 136 return OwningEffectNode()->filters; |
| 135 } | 137 } |
| 136 | 138 |
| 137 gfx::PointF RenderSurfaceImpl::FiltersOrigin() const { | 139 gfx::PointF RenderSurfaceImpl::FiltersOrigin() const { |
| 138 return OwningEffectNode()->filters_origin; | 140 return OwningEffectNode()->filters_origin; |
| 139 } | 141 } |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 NOTIMPLEMENTED(); | 540 NOTIMPLEMENTED(); |
| 539 break; | 541 break; |
| 540 default: | 542 default: |
| 541 NOTREACHED(); | 543 NOTREACHED(); |
| 542 break; | 544 break; |
| 543 } | 545 } |
| 544 } | 546 } |
| 545 } | 547 } |
| 546 | 548 |
| 547 } // namespace cc | 549 } // namespace cc |
| OLD | NEW |