| 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 int num_unclipped_descendants() const { | 358 int num_unclipped_descendants() const { |
| 359 return draw_properties_.num_unclipped_descendants; | 359 return draw_properties_.num_unclipped_descendants; |
| 360 } | 360 } |
| 361 | 361 |
| 362 // The client should be responsible for setting bounds, content bounds and | 362 // The client should be responsible for setting bounds, content bounds and |
| 363 // contents scale to appropriate values. LayerImpl doesn't calculate any of | 363 // contents scale to appropriate values. LayerImpl doesn't calculate any of |
| 364 // them from the other values. | 364 // them from the other values. |
| 365 | 365 |
| 366 void SetBounds(const gfx::Size& bounds); | 366 void SetBounds(const gfx::Size& bounds); |
| 367 gfx::Size bounds() const; | 367 gfx::Size bounds() const; |
| 368 // Like bounds() but doesn't snap to int. |
| 369 gfx::SizeF BoundsForScrolling() const; |
| 368 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); | 370 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); |
| 369 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } | 371 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } |
| 370 | 372 |
| 371 void SetContentBounds(const gfx::Size& content_bounds); | 373 void SetContentBounds(const gfx::Size& content_bounds); |
| 372 gfx::Size content_bounds() const { return draw_properties_.content_bounds; } | 374 gfx::Size content_bounds() const { return draw_properties_.content_bounds; } |
| 373 | 375 |
| 374 float contents_scale_x() const { return draw_properties_.contents_scale_x; } | 376 float contents_scale_x() const { return draw_properties_.contents_scale_x; } |
| 375 float contents_scale_y() const { return draw_properties_.contents_scale_y; } | 377 float contents_scale_y() const { return draw_properties_.contents_scale_y; } |
| 376 void SetContentsScale(float contents_scale_x, float contents_scale_y); | 378 void SetContentsScale(float contents_scale_x, float contents_scale_y); |
| 377 | 379 |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 DrawProperties<LayerImpl> draw_properties_; | 709 DrawProperties<LayerImpl> draw_properties_; |
| 708 | 710 |
| 709 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 711 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
| 710 | 712 |
| 711 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 713 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 712 }; | 714 }; |
| 713 | 715 |
| 714 } // namespace cc | 716 } // namespace cc |
| 715 | 717 |
| 716 #endif // CC_LAYERS_LAYER_IMPL_H_ | 718 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |