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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 374 |
375 // The contents scale converts from logical, non-page-scaled pixels to target | 375 // The contents scale converts from logical, non-page-scaled pixels to target |
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, | |
385 float page_scale_factor, | |
386 float maximum_animation_contents_scale, | |
387 bool animating_transform_to_screen, | |
388 float* contents_scale_x, | 384 float* contents_scale_x, |
389 float* contents_scale_y, | 385 float* contents_scale_y, |
390 gfx::Size* content_bounds); | 386 gfx::Size* content_bounds); |
391 | 387 |
392 LayerTreeHost* layer_tree_host() { return layer_tree_host_; } | 388 LayerTreeHost* layer_tree_host() { return layer_tree_host_; } |
393 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } | 389 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } |
394 | 390 |
395 // Set the priority of all desired textures in this layer. | 391 // Set the priority of all desired textures in this layer. |
396 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {} | 392 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {} |
397 | 393 |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 DrawProperties<Layer> draw_properties_; | 625 DrawProperties<Layer> draw_properties_; |
630 | 626 |
631 PaintProperties paint_properties_; | 627 PaintProperties paint_properties_; |
632 | 628 |
633 DISALLOW_COPY_AND_ASSIGN(Layer); | 629 DISALLOW_COPY_AND_ASSIGN(Layer); |
634 }; | 630 }; |
635 | 631 |
636 } // namespace cc | 632 } // namespace cc |
637 | 633 |
638 #endif // CC_LAYERS_LAYER_H_ | 634 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |