Chromium Code Reviews| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 449 size_t num_unclipped_descendants() const { | 449 size_t num_unclipped_descendants() const { |
| 450 return draw_properties_.num_unclipped_descendants; | 450 return draw_properties_.num_unclipped_descendants; |
| 451 } | 451 } |
| 452 | 452 |
| 453 // The client should be responsible for setting bounds, content bounds and | 453 // The client should be responsible for setting bounds, content bounds and |
| 454 // contents scale to appropriate values. LayerImpl doesn't calculate any of | 454 // contents scale to appropriate values. LayerImpl doesn't calculate any of |
| 455 // them from the other values. | 455 // them from the other values. |
| 456 | 456 |
| 457 void SetBounds(const gfx::Size& bounds); | 457 void SetBounds(const gfx::Size& bounds); |
| 458 gfx::Size bounds() const; | 458 gfx::Size bounds() const; |
| 459 | |
|
ajuma
2016/02/09 16:27:13
Unintentional whitespace change?
| |
| 459 // Like bounds() but doesn't snap to int. Lossy on giant pages (e.g. millions | 460 // Like bounds() but doesn't snap to int. Lossy on giant pages (e.g. millions |
| 460 // of pixels) due to use of single precision float. | 461 // of pixels) due to use of single precision float. |
| 461 gfx::SizeF BoundsForScrolling() const; | 462 gfx::SizeF BoundsForScrolling() const; |
| 462 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); | 463 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); |
| 463 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } | 464 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } |
| 464 | 465 |
| 465 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); | 466 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); |
| 466 void PushScrollOffsetFromMainThread(const gfx::ScrollOffset& scroll_offset); | 467 void PushScrollOffsetFromMainThread(const gfx::ScrollOffset& scroll_offset); |
| 467 // This method is similar to PushScrollOffsetFromMainThread but will cause the | 468 // This method is similar to PushScrollOffsetFromMainThread but will cause the |
| 468 // scroll offset given to clobber any scroll changes on the active tree in the | 469 // scroll offset given to clobber any scroll changes on the active tree in the |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 891 // If true, the layer or one of its descendants has a touch handler. | 892 // If true, the layer or one of its descendants has a touch handler. |
| 892 bool layer_or_descendant_has_touch_handler_; | 893 bool layer_or_descendant_has_touch_handler_; |
| 893 bool sorted_for_recursion_; | 894 bool sorted_for_recursion_; |
| 894 | 895 |
| 895 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 896 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 896 }; | 897 }; |
| 897 | 898 |
| 898 } // namespace cc | 899 } // namespace cc |
| 899 | 900 |
| 900 #endif // CC_LAYERS_LAYER_IMPL_H_ | 901 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |