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 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 | 1384 |
1385 class NoScaleContentLayer : public ContentLayer { | 1385 class NoScaleContentLayer : public ContentLayer { |
1386 public: | 1386 public: |
1387 static scoped_refptr<NoScaleContentLayer> Create(ContentLayerClient* client) { | 1387 static scoped_refptr<NoScaleContentLayer> Create(ContentLayerClient* client) { |
1388 return make_scoped_refptr(new NoScaleContentLayer(client)); | 1388 return make_scoped_refptr(new NoScaleContentLayer(client)); |
1389 } | 1389 } |
1390 | 1390 |
1391 virtual void CalculateContentsScale(float ideal_contents_scale, | 1391 virtual void CalculateContentsScale(float ideal_contents_scale, |
1392 float device_scale_factor, | 1392 float device_scale_factor, |
1393 float page_scale_factor, | 1393 float page_scale_factor, |
| 1394 float maximum_animation_contents_scale, |
1394 bool animating_transform_to_screen, | 1395 bool animating_transform_to_screen, |
1395 float* contents_scale_x, | 1396 float* contents_scale_x, |
1396 float* contents_scale_y, | 1397 float* contents_scale_y, |
1397 gfx::Size* contentBounds) OVERRIDE { | 1398 gfx::Size* contentBounds) OVERRIDE { |
1398 // Skip over the ContentLayer's method to the base Layer class. | 1399 // Skip over the ContentLayer's method to the base Layer class. |
1399 Layer::CalculateContentsScale(ideal_contents_scale, | 1400 Layer::CalculateContentsScale(ideal_contents_scale, |
1400 device_scale_factor, | 1401 device_scale_factor, |
1401 page_scale_factor, | 1402 page_scale_factor, |
| 1403 maximum_animation_contents_scale, |
1402 animating_transform_to_screen, | 1404 animating_transform_to_screen, |
1403 contents_scale_x, | 1405 contents_scale_x, |
1404 contents_scale_y, | 1406 contents_scale_y, |
1405 contentBounds); | 1407 contentBounds); |
1406 } | 1408 } |
1407 | 1409 |
1408 private: | 1410 private: |
1409 explicit NoScaleContentLayer(ContentLayerClient* client) | 1411 explicit NoScaleContentLayer(ContentLayerClient* client) |
1410 : ContentLayer(client) {} | 1412 : ContentLayer(client) {} |
1411 virtual ~NoScaleContentLayer() {} | 1413 virtual ~NoScaleContentLayer() {} |
(...skipping 3870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5282 const gfx::Size bounds_; | 5284 const gfx::Size bounds_; |
5283 FakeContentLayerClient client_; | 5285 FakeContentLayerClient client_; |
5284 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; | 5286 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; |
5285 scoped_refptr<FakePictureLayer> picture_layer_; | 5287 scoped_refptr<FakePictureLayer> picture_layer_; |
5286 Layer* child_layer_; | 5288 Layer* child_layer_; |
5287 }; | 5289 }; |
5288 | 5290 |
5289 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); | 5291 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); |
5290 | 5292 |
5291 } // namespace cc | 5293 } // namespace cc |
OLD | NEW |