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 <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 // them from the other values. | 414 // them from the other values. |
415 | 415 |
416 void SetBounds(const gfx::Size& bounds); | 416 void SetBounds(const gfx::Size& bounds); |
417 gfx::Size bounds() const; | 417 gfx::Size bounds() const; |
418 // Like bounds() but doesn't snap to int. Lossy on giant pages (e.g. millions | 418 // Like bounds() but doesn't snap to int. Lossy on giant pages (e.g. millions |
419 // of pixels) due to use of single precision float. | 419 // of pixels) due to use of single precision float. |
420 gfx::SizeF BoundsForScrolling() const; | 420 gfx::SizeF BoundsForScrolling() const; |
421 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); | 421 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); |
422 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } | 422 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } |
423 | 423 |
424 void SetContentBounds(const gfx::Size& content_bounds); | |
425 | |
426 float contents_scale_x() const { return draw_properties_.contents_scale_x; } | 424 float contents_scale_x() const { return draw_properties_.contents_scale_x; } |
427 float contents_scale_y() const { return draw_properties_.contents_scale_y; } | 425 float contents_scale_y() const { return draw_properties_.contents_scale_y; } |
428 void SetContentsScale(float contents_scale_x, float contents_scale_y); | 426 void SetContentsScale(float contents_scale_x, float contents_scale_y); |
429 | 427 |
430 bool IsExternalScrollActive() const; | 428 bool IsExternalScrollActive() const; |
431 | 429 |
432 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); | 430 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); |
433 void SetCurrentScrollOffsetFromDelegate( | 431 void SetCurrentScrollOffsetFromDelegate( |
434 const gfx::ScrollOffset& scroll_offset); | 432 const gfx::ScrollOffset& scroll_offset); |
435 void PushScrollOffsetFromMainThread(const gfx::ScrollOffset& scroll_offset); | 433 void PushScrollOffsetFromMainThread(const gfx::ScrollOffset& scroll_offset); |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 bool visited_; | 844 bool visited_; |
847 bool layer_or_descendant_is_drawn_; | 845 bool layer_or_descendant_is_drawn_; |
848 bool sorted_for_recursion_; | 846 bool sorted_for_recursion_; |
849 | 847 |
850 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 848 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
851 }; | 849 }; |
852 | 850 |
853 } // namespace cc | 851 } // namespace cc |
854 | 852 |
855 #endif // CC_LAYERS_LAYER_IMPL_H_ | 853 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |