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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 704463003: Move overscroll bounce to impl thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/trees/layer_tree_host_impl.h ('k') | cc/trees/tree_scroll_elasticity_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 77c484fd1a4a6bef187c2bec963533ec8a750c4f..08b0ad143c64556b96b609750aca5d3502faf9fd 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -67,6 +67,7 @@
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/occlusion_tracker.h"
#include "cc/trees/single_thread_proxy.h"
+#include "cc/trees/tree_scroll_elasticity_client.h"
#include "cc/trees/tree_synchronizer.h"
#include "gpu/command_buffer/client/gles2_interface.h"
#include "gpu/GLES2/gl2extchromium.h"
@@ -278,6 +279,8 @@ LayerTreeHostImpl::LayerTreeHostImpl(
wheel_scrolling_(false),
scroll_affects_scroll_handler_(false),
scroll_layer_id_when_mouse_over_scrollbar_(0),
+ scroll_elasticity_client_(
+ new TreeScrollElasticityClient(this)),
tile_priorities_dirty_(false),
root_layer_scroll_offset_delegate_(NULL),
settings_(settings),
@@ -459,6 +462,10 @@ bool LayerTreeHostImpl::CanDraw() const {
void LayerTreeHostImpl::Animate(base::TimeTicks monotonic_time) {
if (input_handler_client_)
input_handler_client_->Animate(monotonic_time);
+ if (scroll_elasticity_client_->controller()) {
+ scroll_elasticity_client_->controller()->Animate(
+ monotonic_time);
+ }
AnimatePageScale(monotonic_time);
AnimateLayers(monotonic_time);
AnimateScrollbars(monotonic_time);
@@ -515,6 +522,11 @@ LayerTreeHostImpl::CreateLatencyInfoSwapPromiseMonitor(
new LatencyInfoSwapPromiseMonitor(latency, NULL, this));
}
+ScrollElasticityControllerClient*
+ LayerTreeHostImpl::GetScrollElasticityControllerClient() {
+ return scroll_elasticity_client_.get();
+}
+
void LayerTreeHostImpl::QueueSwapPromiseForMainThreadScrollUpdate(
scoped_ptr<SwapPromise> swap_promise) {
swap_promises_for_main_thread_scroll_update_.push_back(swap_promise.Pass());
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/tree_scroll_elasticity_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698