diff options
-rw-r--r-- | android_webview/browser/hardware_renderer.h | 10 | ||||
-rw-r--r-- | cc/test/fake_layer_tree_host_client.h | 1 | ||||
-rw-r--r-- | cc/test/layer_tree_test.cc | 6 | ||||
-rw-r--r-- | cc/test/layer_tree_test.h | 10 | ||||
-rw-r--r-- | cc/trees/layer_tree_host.cc | 5 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_client.h | 11 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_unittest.cc | 10 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_unittest_no_message_loop.cc | 1 | ||||
-rw-r--r-- | content/browser/renderer_host/compositor_impl_android.h | 1 | ||||
-rw-r--r-- | content/renderer/gpu/render_widget_compositor.cc | 2 | ||||
-rw-r--r-- | content/renderer/gpu/render_widget_compositor.h | 1 | ||||
-rw-r--r-- | content/renderer/input/input_scroll_elasticity_controller.cc | 2 | ||||
-rw-r--r-- | content/test/web_layer_tree_view_impl_for_testing.cc | 4 | ||||
-rw-r--r-- | content/test/web_layer_tree_view_impl_for_testing.h | 1 | ||||
-rw-r--r-- | mojo/services/html_viewer/weblayertreeview_impl.cc | 2 | ||||
-rw-r--r-- | mojo/services/html_viewer/weblayertreeview_impl.h | 1 | ||||
-rw-r--r-- | ui/compositor/compositor.h | 1 |
17 files changed, 44 insertions, 25 deletions
diff --git a/android_webview/browser/hardware_renderer.h b/android_webview/browser/hardware_renderer.h index 5ba3656..f969a2c 100644 --- a/android_webview/browser/hardware_renderer.h +++ b/android_webview/browser/hardware_renderer.h @@ -43,10 +43,12 @@ class HardwareRenderer : public cc::LayerTreeHostClient, virtual void DidBeginMainFrame() override; virtual void BeginMainFrame(const cc::BeginFrameArgs& args) override {} virtual void Layout() override {} - virtual void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, - const gfx::Vector2d& outer_delta, - float page_scale, - float top_controls_delta) override {} + virtual void ApplyViewportDeltas( + const gfx::Vector2d& inner_delta, + const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, + float page_scale, + float top_controls_delta) override {} virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, float page_scale, float top_controls_delta) override {} diff --git a/cc/test/fake_layer_tree_host_client.h b/cc/test/fake_layer_tree_host_client.h index d64a5b2..6f24116 100644 --- a/cc/test/fake_layer_tree_host_client.h +++ b/cc/test/fake_layer_tree_host_client.h @@ -36,6 +36,7 @@ class FakeLayerTreeHostClient : public LayerTreeHostClient, void Layout() override {} void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, float page_scale, float top_controls_delta) override {} void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc index cf83fa7..dfc4878 100644 --- a/cc/test/layer_tree_test.cc +++ b/cc/test/layer_tree_test.cc @@ -362,11 +362,11 @@ class LayerTreeHostClientForTesting : public LayerTreeHostClient, void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, float page_scale, float top_controls_delta) override { - test_hooks_->ApplyViewportDeltas(inner_delta, - outer_delta, - page_scale, + test_hooks_->ApplyViewportDeltas(inner_delta, outer_delta, + elastic_overscroll_delta, page_scale, top_controls_delta); } void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h index d52a0eb..acabf9b 100644 --- a/cc/test/layer_tree_test.h +++ b/cc/test/layer_tree_test.h @@ -67,10 +67,12 @@ class TestHooks : public AnimationDelegate { bool has_unfinished_animation) {} virtual void WillAnimateLayers(LayerTreeHostImpl* host_impl, base::TimeTicks monotonic_time) {} - virtual void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, - const gfx::Vector2d& outer_delta, - float scale, - float top_controls_delta) {} + virtual void ApplyViewportDeltas( + const gfx::Vector2d& inner_delta, + const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, + float scale, + float top_controls_delta) {} virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, float scale, float top_controls_delta) {} diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc index 22b1196..4d03449 100644 --- a/cc/trees/layer_tree_host.cc +++ b/cc/trees/layer_tree_host.cc @@ -1160,9 +1160,8 @@ void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) { // TODO(ccameron): pass the elastic overscroll here so that input events // may be translated appropriately. client_->ApplyViewportDeltas( - inner_viewport_scroll_delta, - outer_viewport_scroll_delta, - info->page_scale_delta, + inner_viewport_scroll_delta, outer_viewport_scroll_delta, + info->elastic_overscroll_delta, info->page_scale_delta, info->top_controls_delta); } } diff --git a/cc/trees/layer_tree_host_client.h b/cc/trees/layer_tree_host_client.h index 5b02964..5846343 100644 --- a/cc/trees/layer_tree_host_client.h +++ b/cc/trees/layer_tree_host_client.h @@ -11,6 +11,7 @@ namespace gfx { class Vector2d; +class Vector2dF; } namespace cc { @@ -27,10 +28,12 @@ class LayerTreeHostClient { virtual void BeginMainFrame(const BeginFrameArgs& args) = 0; virtual void DidBeginMainFrame() = 0; virtual void Layout() = 0; - virtual void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, - const gfx::Vector2d& outer_delta, - float page_scale, - float top_controls_delta) = 0; + virtual void ApplyViewportDeltas( + const gfx::Vector2d& inner_delta, + const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, + float page_scale, + float top_controls_delta) = 0; virtual void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, float page_scale, float top_controls_delta) = 0; diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc index 2a1915c..acc76d2 100644 --- a/cc/trees/layer_tree_host_unittest.cc +++ b/cc/trees/layer_tree_host_unittest.cc @@ -5520,11 +5520,11 @@ class LayerTreeHostAcceptsDeltasFromImplWithoutRootLayer EndTest(); } - void ApplyViewportDeltas( - const gfx::Vector2d& inner, - const gfx::Vector2d& outer, - float scale_delta, - float top_controls_delta) override { + void ApplyViewportDeltas(const gfx::Vector2d& inner, + const gfx::Vector2d& outer, + const gfx::Vector2dF& elastic_overscroll_delta, + float scale_delta, + float top_controls_delta) override { EXPECT_EQ(info_.page_scale_delta, scale_delta); EXPECT_EQ(info_.top_controls_delta, top_controls_delta); deltas_sent_to_client_ = true; diff --git a/cc/trees/layer_tree_host_unittest_no_message_loop.cc b/cc/trees/layer_tree_host_unittest_no_message_loop.cc index a0b2bdf..1e04ad9 100644 --- a/cc/trees/layer_tree_host_unittest_no_message_loop.cc +++ b/cc/trees/layer_tree_host_unittest_no_message_loop.cc @@ -60,6 +60,7 @@ class LayerTreeHostNoMessageLoopTest void Layout() override {} void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, float page_scale, float top_controls_delta) override {} void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, diff --git a/content/browser/renderer_host/compositor_impl_android.h b/content/browser/renderer_host/compositor_impl_android.h index 11f35b1..3cd223f 100644 --- a/content/browser/renderer_host/compositor_impl_android.h +++ b/content/browser/renderer_host/compositor_impl_android.h @@ -72,6 +72,7 @@ class CONTENT_EXPORT CompositorImpl virtual void ApplyViewportDeltas( const gfx::Vector2d& inner_delta, const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, float page_scale, float top_controls_delta) override {} virtual void ApplyViewportDeltas( diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc index 397e158..3d56b95 100644 --- a/content/renderer/gpu/render_widget_compositor.cc +++ b/content/renderer/gpu/render_widget_compositor.cc @@ -822,11 +822,13 @@ void RenderWidgetCompositor::Layout() { void RenderWidgetCompositor::ApplyViewportDeltas( const gfx::Vector2d& inner_delta, const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, float page_scale, float top_controls_delta) { widget_->webwidget()->applyViewportDeltas( inner_delta, outer_delta, + elastic_overscroll_delta, page_scale, top_controls_delta); } diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h index 0f1389d..ec890d4 100644 --- a/content/renderer/gpu/render_widget_compositor.h +++ b/content/renderer/gpu/render_widget_compositor.h @@ -137,6 +137,7 @@ class CONTENT_EXPORT RenderWidgetCompositor void Layout() override; void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, float page_scale, float top_controls_delta) override; void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, diff --git a/content/renderer/input/input_scroll_elasticity_controller.cc b/content/renderer/input/input_scroll_elasticity_controller.cc index ca0258e..9babcd7 100644 --- a/content/renderer/input/input_scroll_elasticity_controller.cc +++ b/content/renderer/input/input_scroll_elasticity_controller.cc @@ -41,7 +41,7 @@ namespace { // deltas against the event timestamps, which are in seconds since epoch. Find // out which is right. Also, avoid querying time, and use frame time instead. double SystemUptime() { - return base::Time::Now().ToDoubleT(); + return base::TimeTicks::Now().ToInternalValue() / 1.0e6; } const float kScrollVelocityZeroingTimeout = 0.10f; diff --git a/content/test/web_layer_tree_view_impl_for_testing.cc b/content/test/web_layer_tree_view_impl_for_testing.cc index 17c0585..c3b8c11 100644 --- a/content/test/web_layer_tree_view_impl_for_testing.cc +++ b/content/test/web_layer_tree_view_impl_for_testing.cc @@ -147,8 +147,10 @@ void WebLayerTreeViewImplForTesting::Layout() { void WebLayerTreeViewImplForTesting::ApplyViewportDeltas( const gfx::Vector2d& inner_delta, const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, float page_scale, - float top_controls_delta) {} + float top_controls_delta) { +} void WebLayerTreeViewImplForTesting::ApplyViewportDeltas( const gfx::Vector2d& scroll_delta, diff --git a/content/test/web_layer_tree_view_impl_for_testing.h b/content/test/web_layer_tree_view_impl_for_testing.h index 6eec046..5cf1270 100644 --- a/content/test/web_layer_tree_view_impl_for_testing.h +++ b/content/test/web_layer_tree_view_impl_for_testing.h @@ -72,6 +72,7 @@ class WebLayerTreeViewImplForTesting void Layout() override; void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, float page_scale, float top_controls_delta) override; void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, diff --git a/mojo/services/html_viewer/weblayertreeview_impl.cc b/mojo/services/html_viewer/weblayertreeview_impl.cc index 0b19b10..c0d77b1 100644 --- a/mojo/services/html_viewer/weblayertreeview_impl.cc +++ b/mojo/services/html_viewer/weblayertreeview_impl.cc @@ -79,11 +79,13 @@ void WebLayerTreeViewImpl::Layout() { void WebLayerTreeViewImpl::ApplyViewportDeltas( const gfx::Vector2d& inner_delta, const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, float page_scale, float top_controls_delta) { widget_->applyViewportDeltas( inner_delta, outer_delta, + elastic_overscroll_delta, page_scale, top_controls_delta); } diff --git a/mojo/services/html_viewer/weblayertreeview_impl.h b/mojo/services/html_viewer/weblayertreeview_impl.h index e394df0..3cc53d4 100644 --- a/mojo/services/html_viewer/weblayertreeview_impl.h +++ b/mojo/services/html_viewer/weblayertreeview_impl.h @@ -51,6 +51,7 @@ class WebLayerTreeViewImpl : public blink::WebLayerTreeView, void Layout() override; void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, float page_scale, float top_controls_delta) override; void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h index 57e4a8e..5d9d793 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -251,6 +251,7 @@ class COMPOSITOR_EXPORT Compositor void Layout() override; void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, const gfx::Vector2d& outer_delta, + const gfx::Vector2dF& elastic_overscroll_delta, float page_scale, float top_controls_delta) override {} void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, |