Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(628)

Side by Side Diff: cc/layers/layer_impl.h

Issue 1766053002: Clean LayerImpl's scroll offset callers in unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove transform tree update setting Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 442
443 void SetBounds(const gfx::Size& bounds); 443 void SetBounds(const gfx::Size& bounds);
444 gfx::Size bounds() const; 444 gfx::Size bounds() const;
445 // Like bounds() but doesn't snap to int. Lossy on giant pages (e.g. millions 445 // Like bounds() but doesn't snap to int. Lossy on giant pages (e.g. millions
446 // of pixels) due to use of single precision float. 446 // of pixels) due to use of single precision float.
447 gfx::SizeF BoundsForScrolling() const; 447 gfx::SizeF BoundsForScrolling() const;
448 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta); 448 void SetBoundsDelta(const gfx::Vector2dF& bounds_delta);
449 gfx::Vector2dF bounds_delta() const { return bounds_delta_; } 449 gfx::Vector2dF bounds_delta() const { return bounds_delta_; }
450 450
451 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset); 451 void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset);
452 // must only be called by tests when updating scroll offset of a single layer,
453 // the standard process to update scroll offsets is to call
454 // ScrollTree::UpdateScrollOffsetMap() which updates scroll offsets of all
455 // layers.
456 void PushScrollOffsetFromMainThread(const gfx::ScrollOffset& scroll_offset);
457
458 gfx::ScrollOffset CurrentScrollOffset() const; 452 gfx::ScrollOffset CurrentScrollOffset() const;
459 gfx::ScrollOffset BaseScrollOffset() const;
460 gfx::Vector2dF ScrollDelta() const;
461 void SetScrollDelta(const gfx::Vector2dF& delta);
462 453
463 gfx::ScrollOffset MaxScrollOffset() const; 454 gfx::ScrollOffset MaxScrollOffset() const;
464 gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const; 455 gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const;
465 gfx::Vector2dF ClampScrollToMaxScrollOffset(); 456 gfx::Vector2dF ClampScrollToMaxScrollOffset();
466 void SetScrollCompensationAdjustment(const gfx::Vector2dF& scroll_offset) { 457 void SetScrollCompensationAdjustment(const gfx::Vector2dF& scroll_offset) {
467 scroll_compensation_adjustment_ = scroll_offset; 458 scroll_compensation_adjustment_ = scroll_offset;
468 } 459 }
469 gfx::Vector2dF ScrollCompensationAdjustment() const { 460 gfx::Vector2dF ScrollCompensationAdjustment() const {
470 return scroll_compensation_adjustment_; 461 return scroll_compensation_adjustment_;
471 } 462 }
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 // If true, the layer or one of its descendants has a touch handler. 829 // If true, the layer or one of its descendants has a touch handler.
839 bool layer_or_descendant_has_touch_handler_; 830 bool layer_or_descendant_has_touch_handler_;
840 bool sorted_for_recursion_; 831 bool sorted_for_recursion_;
841 832
842 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 833 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
843 }; 834 };
844 835
845 } // namespace cc 836 } // namespace cc
846 837
847 #endif // CC_LAYERS_LAYER_IMPL_H_ 838 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698