| 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 #ifndef CC_LAYERS_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 void SetBounds(gfx::Size bounds); | 355 void SetBounds(gfx::Size bounds); |
| 356 gfx::Size bounds() const { return bounds_; } | 356 gfx::Size bounds() const { return bounds_; } |
| 357 | 357 |
| 358 void SetContentBounds(gfx::Size content_bounds); | 358 void SetContentBounds(gfx::Size content_bounds); |
| 359 gfx::Size content_bounds() const { return draw_properties_.content_bounds; } | 359 gfx::Size content_bounds() const { return draw_properties_.content_bounds; } |
| 360 | 360 |
| 361 float contents_scale_x() const { return draw_properties_.contents_scale_x; } | 361 float contents_scale_x() const { return draw_properties_.contents_scale_x; } |
| 362 float contents_scale_y() const { return draw_properties_.contents_scale_y; } | 362 float contents_scale_y() const { return draw_properties_.contents_scale_y; } |
| 363 void SetContentsScale(float contents_scale_x, float contents_scale_y); | 363 void SetContentsScale(float contents_scale_x, float contents_scale_y); |
| 364 | 364 |
| 365 // Computes a box in screen space that should entirely contain the layer's |
| 366 // bounds through the entirety of the layer's current animation. Returns true |
| 367 // and sets |out| to the inflation if there are animations that can inflate |
| 368 // bounds in the path to the root layer. Returns false otherwise. |
| 369 bool GetAnimationBounds(gfx::BoxF* out) const { return false; } |
| 370 |
| 365 virtual void CalculateContentsScale(float ideal_contents_scale, | 371 virtual void CalculateContentsScale(float ideal_contents_scale, |
| 366 float device_scale_factor, | 372 float device_scale_factor, |
| 367 float page_scale_factor, | 373 float page_scale_factor, |
| 368 bool animating_transform_to_screen, | 374 bool animating_transform_to_screen, |
| 369 float* contents_scale_x, | 375 float* contents_scale_x, |
| 370 float* contents_scale_y, | 376 float* contents_scale_y, |
| 371 gfx::Size* content_bounds); | 377 gfx::Size* content_bounds); |
| 372 | 378 |
| 373 void SetScrollOffsetDelegate( | 379 void SetScrollOffsetDelegate( |
| 374 LayerScrollOffsetDelegate* scroll_offset_delegate); | 380 LayerScrollOffsetDelegate* scroll_offset_delegate); |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 DrawProperties<LayerImpl> draw_properties_; | 665 DrawProperties<LayerImpl> draw_properties_; |
| 660 | 666 |
| 661 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 667 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
| 662 | 668 |
| 663 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 669 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 664 }; | 670 }; |
| 665 | 671 |
| 666 } // namespace cc | 672 } // namespace cc |
| 667 | 673 |
| 668 #endif // CC_LAYERS_LAYER_IMPL_H_ | 674 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |