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