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 #ifndef CC_TEST_TILED_LAYER_TEST_COMMON_H_ | 5 #ifndef CC_TEST_TILED_LAYER_TEST_COMMON_H_ |
6 #define CC_TEST_TILED_LAYER_TEST_COMMON_H_ | 6 #define CC_TEST_TILED_LAYER_TEST_COMMON_H_ |
7 | 7 |
8 #include "cc/base/region.h" | 8 #include "cc/base/region.h" |
9 #include "cc/layers/tiled_layer.h" | 9 #include "cc/layers/tiled_layer.h" |
10 #include "cc/layers/tiled_layer_impl.h" | 10 #include "cc/layers/tiled_layer_impl.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 DISALLOW_COPY_AND_ASSIGN(FakeTiledLayer); | 133 DISALLOW_COPY_AND_ASSIGN(FakeTiledLayer); |
134 }; | 134 }; |
135 | 135 |
136 class FakeTiledLayerWithScaledBounds : public FakeTiledLayer { | 136 class FakeTiledLayerWithScaledBounds : public FakeTiledLayer { |
137 public: | 137 public: |
138 explicit FakeTiledLayerWithScaledBounds( | 138 explicit FakeTiledLayerWithScaledBounds( |
139 PrioritizedResourceManager* resource_manager); | 139 PrioritizedResourceManager* resource_manager); |
140 | 140 |
141 void SetContentBounds(const gfx::Size& content_bounds); | 141 void SetContentBounds(const gfx::Size& content_bounds); |
142 virtual void CalculateContentsScale(float ideal_contents_scale, | 142 virtual void CalculateContentsScale(float ideal_contents_scale, |
143 float device_scale_factor, | |
144 float page_scale_factor, | |
145 float maximum_animation_contents_scale, | |
146 bool animating_transform_to_screen, | |
147 float* contents_scale_x, | 143 float* contents_scale_x, |
148 float* contents_scale_y, | 144 float* contents_scale_y, |
149 gfx::Size* content_bounds) OVERRIDE; | 145 gfx::Size* content_bounds) OVERRIDE; |
150 | 146 |
151 protected: | 147 protected: |
152 virtual ~FakeTiledLayerWithScaledBounds(); | 148 virtual ~FakeTiledLayerWithScaledBounds(); |
153 gfx::Size forced_content_bounds_; | 149 gfx::Size forced_content_bounds_; |
154 | 150 |
155 private: | 151 private: |
156 DISALLOW_COPY_AND_ASSIGN(FakeTiledLayerWithScaledBounds); | 152 DISALLOW_COPY_AND_ASSIGN(FakeTiledLayerWithScaledBounds); |
157 }; | 153 }; |
158 | 154 |
159 } // namespace cc | 155 } // namespace cc |
160 | 156 |
161 #endif // CC_TEST_TILED_LAYER_TEST_COMMON_H_ | 157 #endif // CC_TEST_TILED_LAYER_TEST_COMMON_H_ |
OLD | NEW |