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 | |
| 460 // SetBoundsForTesting shall only be called by impl thread unit tests. | |
| 461 // It calls SetBounds and rebuild property trees. | |
| 462 void SetBoundsForTesting(const gfx::Size& bounds); | |
|
sunxd
2016/02/09 00:11:32
This is dead code, will be deleted.
| |
| 463 | |
| 459 // Like bounds() but doesn't snap to int. Lossy on giant pages (e.g. millions | 464 // 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. | 465 // of pixels) due to use of single precision float. |
| 461 gfx::SizeF BoundsForScrolling() const; | 466 gfx::SizeF BoundsForScrolling() const; |
| 462 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); | 467 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); |
| 463 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } | 468 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } |
| 464 | 469 |
| 465 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); | 470 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); |
| 466 void PushScrollOffsetFromMainThread(const gfx::ScrollOffset& scroll_offset); | 471 void PushScrollOffsetFromMainThread(const gfx::ScrollOffset& scroll_offset); |
| 467 // This method is similar to PushScrollOffsetFromMainThread but will cause the | 472 // 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 | 473 // 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. | 896 // If true, the layer or one of its descendants has a touch handler. |
| 892 bool layer_or_descendant_has_touch_handler_; | 897 bool layer_or_descendant_has_touch_handler_; |
| 893 bool sorted_for_recursion_; | 898 bool sorted_for_recursion_; |
| 894 | 899 |
| 895 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 900 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 896 }; | 901 }; |
| 897 | 902 |
| 898 } // namespace cc | 903 } // namespace cc |
| 899 | 904 |
| 900 #endif // CC_LAYERS_LAYER_IMPL_H_ | 905 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |