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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 | 1043 |
1044 MULTI_THREAD_TEST_F(LayerTreeHostTestOpacityChange); | 1044 MULTI_THREAD_TEST_F(LayerTreeHostTestOpacityChange); |
1045 | 1045 |
1046 class NoScaleContentLayer : public ContentLayer { | 1046 class NoScaleContentLayer : public ContentLayer { |
1047 public: | 1047 public: |
1048 static scoped_refptr<NoScaleContentLayer> Create(ContentLayerClient* client) { | 1048 static scoped_refptr<NoScaleContentLayer> Create(ContentLayerClient* client) { |
1049 return make_scoped_refptr(new NoScaleContentLayer(client)); | 1049 return make_scoped_refptr(new NoScaleContentLayer(client)); |
1050 } | 1050 } |
1051 | 1051 |
1052 virtual void CalculateContentsScale(float ideal_contents_scale, | 1052 virtual void CalculateContentsScale(float ideal_contents_scale, |
1053 float device_scale_factor, | |
1054 float page_scale_factor, | |
1055 float maximum_animation_contents_scale, | |
1056 bool animating_transform_to_screen, | |
1057 float* contents_scale_x, | 1053 float* contents_scale_x, |
1058 float* contents_scale_y, | 1054 float* contents_scale_y, |
1059 gfx::Size* contentBounds) OVERRIDE { | 1055 gfx::Size* contentBounds) OVERRIDE { |
1060 // Skip over the ContentLayer's method to the base Layer class. | 1056 // Skip over the ContentLayer's method to the base Layer class. |
1061 Layer::CalculateContentsScale(ideal_contents_scale, | 1057 Layer::CalculateContentsScale(ideal_contents_scale, |
1062 device_scale_factor, | |
1063 page_scale_factor, | |
1064 maximum_animation_contents_scale, | |
1065 animating_transform_to_screen, | |
1066 contents_scale_x, | 1058 contents_scale_x, |
1067 contents_scale_y, | 1059 contents_scale_y, |
1068 contentBounds); | 1060 contentBounds); |
1069 } | 1061 } |
1070 | 1062 |
1071 private: | 1063 private: |
1072 explicit NoScaleContentLayer(ContentLayerClient* client) | 1064 explicit NoScaleContentLayer(ContentLayerClient* client) |
1073 : ContentLayer(client) {} | 1065 : ContentLayer(client) {} |
1074 virtual ~NoScaleContentLayer() {} | 1066 virtual ~NoScaleContentLayer() {} |
1075 }; | 1067 }; |
(...skipping 3891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4967 const gfx::Size bounds_; | 4959 const gfx::Size bounds_; |
4968 FakeContentLayerClient client_; | 4960 FakeContentLayerClient client_; |
4969 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; | 4961 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; |
4970 scoped_refptr<FakePictureLayer> picture_layer_; | 4962 scoped_refptr<FakePictureLayer> picture_layer_; |
4971 Layer* child_layer_; | 4963 Layer* child_layer_; |
4972 }; | 4964 }; |
4973 | 4965 |
4974 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); | 4966 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); |
4975 | 4967 |
4976 } // namespace cc | 4968 } // namespace cc |
OLD | NEW |