OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 SimpleEnclosedRegion LayerImpl::VisibleOpaqueRegion() const { | 851 SimpleEnclosedRegion LayerImpl::VisibleOpaqueRegion() const { |
852 if (contents_opaque()) | 852 if (contents_opaque()) |
853 return SimpleEnclosedRegion(visible_layer_rect()); | 853 return SimpleEnclosedRegion(visible_layer_rect()); |
854 return SimpleEnclosedRegion(); | 854 return SimpleEnclosedRegion(); |
855 } | 855 } |
856 | 856 |
857 void LayerImpl::DidBeginTracing() {} | 857 void LayerImpl::DidBeginTracing() {} |
858 | 858 |
859 void LayerImpl::ReleaseResources() {} | 859 void LayerImpl::ReleaseResources() {} |
860 | 860 |
861 void LayerImpl::RecreateResources() { | 861 void LayerImpl::ReleaseTileResources() {} |
862 } | 862 |
| 863 void LayerImpl::RecreateTileResources() {} |
863 | 864 |
864 gfx::ScrollOffset LayerImpl::MaxScrollOffset() const { | 865 gfx::ScrollOffset LayerImpl::MaxScrollOffset() const { |
865 return layer_tree_impl()->property_trees()->scroll_tree.MaxScrollOffset( | 866 return layer_tree_impl()->property_trees()->scroll_tree.MaxScrollOffset( |
866 scroll_tree_index()); | 867 scroll_tree_index()); |
867 } | 868 } |
868 | 869 |
869 gfx::ScrollOffset LayerImpl::ClampScrollOffsetToLimits( | 870 gfx::ScrollOffset LayerImpl::ClampScrollOffsetToLimits( |
870 gfx::ScrollOffset offset) const { | 871 gfx::ScrollOffset offset) const { |
871 offset.SetToMin(MaxScrollOffset()); | 872 offset.SetToMin(MaxScrollOffset()); |
872 offset.SetToMax(gfx::ScrollOffset()); | 873 offset.SetToMax(gfx::ScrollOffset()); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 .layer_transforms_should_scale_layer_contents) { | 1089 .layer_transforms_should_scale_layer_contents) { |
1089 return default_scale; | 1090 return default_scale; |
1090 } | 1091 } |
1091 | 1092 |
1092 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1093 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
1093 ScreenSpaceTransform(), default_scale); | 1094 ScreenSpaceTransform(), default_scale); |
1094 return std::max(transform_scales.x(), transform_scales.y()); | 1095 return std::max(transform_scales.x(), transform_scales.y()); |
1095 } | 1096 } |
1096 | 1097 |
1097 } // namespace cc | 1098 } // namespace cc |
OLD | NEW |