OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "content/renderer/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <limits> | 10 #include <limits> |
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 const gfx::Vector2dF& inner_delta, | 1055 const gfx::Vector2dF& inner_delta, |
1056 const gfx::Vector2dF& outer_delta, | 1056 const gfx::Vector2dF& outer_delta, |
1057 const gfx::Vector2dF& elastic_overscroll_delta, | 1057 const gfx::Vector2dF& elastic_overscroll_delta, |
1058 float page_scale, | 1058 float page_scale, |
1059 float top_controls_delta) { | 1059 float top_controls_delta) { |
1060 delegate_->ApplyViewportDeltas(inner_delta, outer_delta, | 1060 delegate_->ApplyViewportDeltas(inner_delta, outer_delta, |
1061 elastic_overscroll_delta, page_scale, | 1061 elastic_overscroll_delta, page_scale, |
1062 top_controls_delta); | 1062 top_controls_delta); |
1063 } | 1063 } |
1064 | 1064 |
| 1065 void RenderWidgetCompositor::RecordWheelAndTouchScrollingCount( |
| 1066 bool has_scrolled_by_wheel, |
| 1067 bool has_scrolled_by_touch) { |
| 1068 delegate_->RecordWheelAndTouchScrollingCount(has_scrolled_by_wheel, |
| 1069 has_scrolled_by_touch); |
| 1070 } |
| 1071 |
1065 void RenderWidgetCompositor::RequestNewCompositorFrameSink() { | 1072 void RenderWidgetCompositor::RequestNewCompositorFrameSink() { |
1066 // If the host is closing, then no more compositing is possible. This | 1073 // If the host is closing, then no more compositing is possible. This |
1067 // prevents shutdown races between handling the close message and | 1074 // prevents shutdown races between handling the close message and |
1068 // the CreateCompositorFrameSink task. | 1075 // the CreateCompositorFrameSink task. |
1069 if (delegate_->IsClosing()) | 1076 if (delegate_->IsClosing()) |
1070 return; | 1077 return; |
1071 | 1078 |
1072 bool fallback = num_failed_recreate_attempts_ >= | 1079 bool fallback = num_failed_recreate_attempts_ >= |
1073 COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK; | 1080 COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK; |
1074 delegate_->RequestNewCompositorFrameSink( | 1081 delegate_->RequestNewCompositorFrameSink( |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { | 1152 void RenderWidgetCompositor::SetContentSourceId(uint32_t id) { |
1146 layer_tree_host_->SetContentSourceId(id); | 1153 layer_tree_host_->SetContentSourceId(id); |
1147 } | 1154 } |
1148 | 1155 |
1149 void RenderWidgetCompositor::SetLocalSurfaceId( | 1156 void RenderWidgetCompositor::SetLocalSurfaceId( |
1150 const cc::LocalSurfaceId& local_surface_id) { | 1157 const cc::LocalSurfaceId& local_surface_id) { |
1151 layer_tree_host_->SetLocalSurfaceId(local_surface_id); | 1158 layer_tree_host_->SetLocalSurfaceId(local_surface_id); |
1152 } | 1159 } |
1153 | 1160 |
1154 } // namespace content | 1161 } // namespace content |
OLD | NEW |