| 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 return draw_properties_.render_surface.get(); | 333 return draw_properties_.render_surface.get(); |
| 334 } | 334 } |
| 335 int num_unclipped_descendants() const { | 335 int num_unclipped_descendants() const { |
| 336 return draw_properties_.num_unclipped_descendants; | 336 return draw_properties_.num_unclipped_descendants; |
| 337 } | 337 } |
| 338 | 338 |
| 339 // The client should be responsible for setting bounds, content bounds and | 339 // The client should be responsible for setting bounds, content bounds and |
| 340 // contents scale to appropriate values. LayerImpl doesn't calculate any of | 340 // contents scale to appropriate values. LayerImpl doesn't calculate any of |
| 341 // them from the other values. | 341 // them from the other values. |
| 342 | 342 |
| 343 void SetBounds(gfx::Size bounds); | 343 void SetBounds(const gfx::Size& bounds); |
| 344 gfx::Size bounds() const { return bounds_; } | 344 gfx::Size bounds() const { return bounds_; } |
| 345 | 345 |
| 346 void SetContentBounds(gfx::Size content_bounds); | 346 void SetContentBounds(const gfx::Size& content_bounds); |
| 347 gfx::Size content_bounds() const { return draw_properties_.content_bounds; } | 347 gfx::Size content_bounds() const { return draw_properties_.content_bounds; } |
| 348 | 348 |
| 349 float contents_scale_x() const { return draw_properties_.contents_scale_x; } | 349 float contents_scale_x() const { return draw_properties_.contents_scale_x; } |
| 350 float contents_scale_y() const { return draw_properties_.contents_scale_y; } | 350 float contents_scale_y() const { return draw_properties_.contents_scale_y; } |
| 351 void SetContentsScale(float contents_scale_x, float contents_scale_y); | 351 void SetContentsScale(float contents_scale_x, float contents_scale_y); |
| 352 | 352 |
| 353 virtual void CalculateContentsScale(float ideal_contents_scale, | 353 virtual void CalculateContentsScale(float ideal_contents_scale, |
| 354 float device_scale_factor, | 354 float device_scale_factor, |
| 355 float page_scale_factor, | 355 float page_scale_factor, |
| 356 bool animating_transform_to_screen, | 356 bool animating_transform_to_screen, |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 DrawProperties<LayerImpl> draw_properties_; | 666 DrawProperties<LayerImpl> draw_properties_; |
| 667 | 667 |
| 668 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; | 668 scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_; |
| 669 | 669 |
| 670 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 670 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 671 }; | 671 }; |
| 672 | 672 |
| 673 } // namespace cc | 673 } // namespace cc |
| 674 | 674 |
| 675 #endif // CC_LAYERS_LAYER_IMPL_H_ | 675 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |