| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_LAYERS_LAYER_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
| 6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 // pixels. The contents scale is 1 for the root layer as it is already in | 376 // pixels. The contents scale is 1 for the root layer as it is already in |
| 377 // physical pixels. By default contents scale is forced to be 1 except for | 377 // physical pixels. By default contents scale is forced to be 1 except for |
| 378 // subclasses of ContentsScalingLayer. | 378 // subclasses of ContentsScalingLayer. |
| 379 float contents_scale_x() const { return draw_properties_.contents_scale_x; } | 379 float contents_scale_x() const { return draw_properties_.contents_scale_x; } |
| 380 float contents_scale_y() const { return draw_properties_.contents_scale_y; } | 380 float contents_scale_y() const { return draw_properties_.contents_scale_y; } |
| 381 gfx::Size content_bounds() const { return draw_properties_.content_bounds; } | 381 gfx::Size content_bounds() const { return draw_properties_.content_bounds; } |
| 382 | 382 |
| 383 virtual void CalculateContentsScale(float ideal_contents_scale, | 383 virtual void CalculateContentsScale(float ideal_contents_scale, |
| 384 float device_scale_factor, | 384 float device_scale_factor, |
| 385 float page_scale_factor, | 385 float page_scale_factor, |
| 386 float maximum_animation_contents_scale, |
| 386 bool animating_transform_to_screen, | 387 bool animating_transform_to_screen, |
| 387 float* contents_scale_x, | 388 float* contents_scale_x, |
| 388 float* contents_scale_y, | 389 float* contents_scale_y, |
| 389 gfx::Size* content_bounds); | 390 gfx::Size* content_bounds); |
| 390 | 391 |
| 391 LayerTreeHost* layer_tree_host() { return layer_tree_host_; } | 392 LayerTreeHost* layer_tree_host() { return layer_tree_host_; } |
| 392 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } | 393 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } |
| 393 | 394 |
| 394 // Set the priority of all desired textures in this layer. | 395 // Set the priority of all desired textures in this layer. |
| 395 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {} | 396 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {} |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 DrawProperties<Layer> draw_properties_; | 626 DrawProperties<Layer> draw_properties_; |
| 626 | 627 |
| 627 PaintProperties paint_properties_; | 628 PaintProperties paint_properties_; |
| 628 | 629 |
| 629 DISALLOW_COPY_AND_ASSIGN(Layer); | 630 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 630 }; | 631 }; |
| 631 | 632 |
| 632 } // namespace cc | 633 } // namespace cc |
| 633 | 634 |
| 634 #endif // CC_LAYERS_LAYER_H_ | 635 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |