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

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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 8acc53784349eb3cb20909dcd44b407382949682..b10ab7e860af7cb9f4d770b9db293d653294e616 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -1452,43 +1452,6 @@ gfx::ScrollOffset LayerImpl::CurrentScrollOffset() const {
return synced_scroll_offset()->Current(IsActive());
}
-gfx::Vector2dF LayerImpl::ScrollDelta() const {
- if (IsActive())
- return gfx::Vector2dF(synced_scroll_offset()->Delta().x(),
- synced_scroll_offset()->Delta().y());
- else
- return gfx::Vector2dF(synced_scroll_offset()->PendingDelta().get().x(),
- 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.
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698