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 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 SimpleEnclosedRegion LayerImpl::VisibleOpaqueRegion() const { | 862 SimpleEnclosedRegion LayerImpl::VisibleOpaqueRegion() const { |
863 if (contents_opaque()) | 863 if (contents_opaque()) |
864 return SimpleEnclosedRegion(visible_layer_rect()); | 864 return SimpleEnclosedRegion(visible_layer_rect()); |
865 return SimpleEnclosedRegion(); | 865 return SimpleEnclosedRegion(); |
866 } | 866 } |
867 | 867 |
868 void LayerImpl::DidBeginTracing() {} | 868 void LayerImpl::DidBeginTracing() {} |
869 | 869 |
870 void LayerImpl::ReleaseResources() {} | 870 void LayerImpl::ReleaseResources() {} |
871 | 871 |
872 void LayerImpl::RecreateResources() { | 872 void LayerImpl::ReleaseTileResources() {} |
873 } | 873 |
| 874 void LayerImpl::RecreateTileResources() {} |
874 | 875 |
875 gfx::ScrollOffset LayerImpl::MaxScrollOffset() const { | 876 gfx::ScrollOffset LayerImpl::MaxScrollOffset() const { |
876 return layer_tree_impl()->property_trees()->scroll_tree.MaxScrollOffset( | 877 return layer_tree_impl()->property_trees()->scroll_tree.MaxScrollOffset( |
877 scroll_tree_index()); | 878 scroll_tree_index()); |
878 } | 879 } |
879 | 880 |
880 gfx::ScrollOffset LayerImpl::ClampScrollOffsetToLimits( | 881 gfx::ScrollOffset LayerImpl::ClampScrollOffsetToLimits( |
881 gfx::ScrollOffset offset) const { | 882 gfx::ScrollOffset offset) const { |
882 offset.SetToMin(MaxScrollOffset()); | 883 offset.SetToMin(MaxScrollOffset()); |
883 offset.SetToMax(gfx::ScrollOffset()); | 884 offset.SetToMax(gfx::ScrollOffset()); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 .layer_transforms_should_scale_layer_contents) { | 1100 .layer_transforms_should_scale_layer_contents) { |
1100 return default_scale; | 1101 return default_scale; |
1101 } | 1102 } |
1102 | 1103 |
1103 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1104 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
1104 ScreenSpaceTransform(), default_scale); | 1105 ScreenSpaceTransform(), default_scale); |
1105 return std::max(transform_scales.x(), transform_scales.y()); | 1106 return std::max(transform_scales.x(), transform_scales.y()); |
1106 } | 1107 } |
1107 | 1108 |
1108 } // namespace cc | 1109 } // namespace cc |
OLD | NEW |