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

Unified Diff: cc/layers/layer_impl.cc

Issue 1766053002: Clean LayerImpl's scroll offset callers in unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 5d31a221703fcd95091fc9eeba227b061eb7baaf..2aca18554f051130eb52014ca184a2d9b2fd97f4 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -1459,34 +1459,6 @@ gfx::Vector2dF LayerImpl::ScrollDelta() const {
synced_scroll_offset()->PendingDelta().get().y());
}
-void LayerImpl::SetScrollDelta(const gfx::Vector2dF& delta) {
- DCHECK(IsActive());
- DCHECK(scrollable() || delta.IsZero());
- SetCurrentScrollOffset(synced_scroll_offset()->ActiveBase() +
- gfx::ScrollOffset(delta));
-}
-
-gfx::ScrollOffset LayerImpl::BaseScrollOffset() const {
- if (IsActive())
- return synced_scroll_offset()->ActiveBase();
- else
- return synced_scroll_offset()->PendingBase();
-}
-
-void LayerImpl::PushScrollOffsetFromMainThread(
- const gfx::ScrollOffset& scroll_offset) {
- bool changed = false;
- DCHECK(!IsActive() || !layer_tree_impl_->FindPendingTreeLayerById(id()));
- changed |= synced_scroll_offset()->PushFromMainThread(scroll_offset);
-
- if (IsActive()) {
- changed |= synced_scroll_offset()->PushPendingToActive();
- }
-
- if (changed)
- DidUpdateScrollOffset();
-}
-
void LayerImpl::UpdatePropertyTreeScrollOffset() {
// TODO(enne): in the future, scrolling should update the scroll tree
// directly instead of going through layers.

Powered by Google App Engine
This is Rietveld 408576698