| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/browser/android/synchronous_compositor_host.h" | 5 #include "content/browser/android/synchronous_compositor_host.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 271 |
| 272 void SynchronousCompositorHost::OnComputeScroll( | 272 void SynchronousCompositorHost::OnComputeScroll( |
| 273 base::TimeTicks animation_time) { | 273 base::TimeTicks animation_time) { |
| 274 if (!need_animate_scroll_) | 274 if (!need_animate_scroll_) |
| 275 return; | 275 return; |
| 276 need_animate_scroll_ = false; | 276 need_animate_scroll_ = false; |
| 277 | 277 |
| 278 SyncCompositorCommonBrowserParams common_browser_params; | 278 SyncCompositorCommonBrowserParams common_browser_params; |
| 279 PopulateCommonParams(&common_browser_params); | 279 PopulateCommonParams(&common_browser_params); |
| 280 SyncCompositorCommonRendererParams common_renderer_params; | 280 SyncCompositorCommonRendererParams common_renderer_params; |
| 281 if (!sender_->Send(new SyncCompositorMsg_ComputeScroll( | 281 sender_->Send(new SyncCompositorMsg_ComputeScroll( |
| 282 routing_id_, common_browser_params, animation_time, | 282 routing_id_, common_browser_params, animation_time)); |
| 283 &common_renderer_params))) { | |
| 284 return; | |
| 285 } | |
| 286 ProcessCommonParams(common_renderer_params); | |
| 287 } | 283 } |
| 288 | 284 |
| 289 InputEventAckState SynchronousCompositorHost::HandleInputEvent( | 285 InputEventAckState SynchronousCompositorHost::HandleInputEvent( |
| 290 const blink::WebInputEvent& input_event) { | 286 const blink::WebInputEvent& input_event) { |
| 291 SyncCompositorCommonBrowserParams common_browser_params; | 287 SyncCompositorCommonBrowserParams common_browser_params; |
| 292 PopulateCommonParams(&common_browser_params); | 288 PopulateCommonParams(&common_browser_params); |
| 293 SyncCompositorCommonRendererParams common_renderer_params; | 289 SyncCompositorCommonRendererParams common_renderer_params; |
| 294 InputEventAckState ack = INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 290 InputEventAckState ack = INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
| 295 if (!sender_->Send(new SyncCompositorMsg_HandleInputEvent( | 291 if (!sender_->Send(new SyncCompositorMsg_HandleInputEvent( |
| 296 routing_id_, common_browser_params, &input_event, | 292 routing_id_, common_browser_params, &input_event, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 params.scrollable_size, params.page_scale_factor, | 375 params.scrollable_size, params.page_scale_factor, |
| 380 params.min_page_scale_factor, params.max_page_scale_factor); | 376 params.min_page_scale_factor, params.max_page_scale_factor); |
| 381 } | 377 } |
| 382 } | 378 } |
| 383 | 379 |
| 384 void SynchronousCompositorHost::UpdateNeedsBeginFrames() { | 380 void SynchronousCompositorHost::UpdateNeedsBeginFrames() { |
| 385 rwhva_->OnSetNeedsBeginFrames(is_active_ && need_begin_frame_); | 381 rwhva_->OnSetNeedsBeginFrames(is_active_ && need_begin_frame_); |
| 386 } | 382 } |
| 387 | 383 |
| 388 } // namespace content | 384 } // namespace content |
| OLD | NEW |