| 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/renderer/android/synchronous_compositor_proxy.h" | 5 #include "content/renderer/android/synchronous_compositor_proxy.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
| 10 #include "cc/ipc/cc_param_traits.h" | 10 #include "cc/ipc/cc_param_traits.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 params->need_invalidate_count = need_invalidate_count_; | 125 params->need_invalidate_count = need_invalidate_count_; |
| 126 params->did_activate_pending_tree_count = did_activate_pending_tree_count_; | 126 params->did_activate_pending_tree_count = did_activate_pending_tree_count_; |
| 127 } | 127 } |
| 128 | 128 |
| 129 void SynchronousCompositorProxy::OnMessageReceived( | 129 void SynchronousCompositorProxy::OnMessageReceived( |
| 130 const IPC::Message& message) { | 130 const IPC::Message& message) { |
| 131 if (output_surface_ && output_surface_->OnMessageReceived(message)) | 131 if (output_surface_ && output_surface_->OnMessageReceived(message)) |
| 132 return; | 132 return; |
| 133 | 133 |
| 134 IPC_BEGIN_MESSAGE_MAP(SynchronousCompositorProxy, message) | 134 IPC_BEGIN_MESSAGE_MAP(SynchronousCompositorProxy, message) |
| 135 IPC_MESSAGE_HANDLER(SyncCompositorMsg_SynchronizeRendererState, | |
| 136 PopulateCommonParams) | |
| 137 IPC_MESSAGE_HANDLER(SyncCompositorMsg_ComputeScroll, OnComputeScroll) | 135 IPC_MESSAGE_HANDLER(SyncCompositorMsg_ComputeScroll, OnComputeScroll) |
| 138 IPC_MESSAGE_HANDLER_DELAY_REPLY(SyncCompositorMsg_DemandDrawHw, | 136 IPC_MESSAGE_HANDLER_DELAY_REPLY(SyncCompositorMsg_DemandDrawHw, |
| 139 DemandDrawHw) | 137 DemandDrawHw) |
| 140 IPC_MESSAGE_HANDLER(SyncCompositorMsg_SetSharedMemory, SetSharedMemory) | 138 IPC_MESSAGE_HANDLER(SyncCompositorMsg_SetSharedMemory, SetSharedMemory) |
| 141 IPC_MESSAGE_HANDLER(SyncCompositorMsg_ZeroSharedMemory, ZeroSharedMemory) | 139 IPC_MESSAGE_HANDLER(SyncCompositorMsg_ZeroSharedMemory, ZeroSharedMemory) |
| 142 IPC_MESSAGE_HANDLER_DELAY_REPLY(SyncCompositorMsg_DemandDrawSw, | 140 IPC_MESSAGE_HANDLER_DELAY_REPLY(SyncCompositorMsg_DemandDrawSw, |
| 143 DemandDrawSw) | 141 DemandDrawSw) |
| 144 IPC_MESSAGE_HANDLER(SyncCompositorMsg_ZoomBy, SynchronouslyZoomBy) | 142 IPC_MESSAGE_HANDLER(SyncCompositorMsg_ZoomBy, SynchronouslyZoomBy) |
| 145 IPC_MESSAGE_HANDLER(SyncCompositorMsg_SetScroll, SetScroll) | 143 IPC_MESSAGE_HANDLER(SyncCompositorMsg_SetScroll, SetScroll) |
| 146 IPC_END_MESSAGE_MAP() | 144 IPC_END_MESSAGE_MAP() |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 | 327 |
| 330 void SynchronousCompositorProxy::SetScroll( | 328 void SynchronousCompositorProxy::SetScroll( |
| 331 const gfx::ScrollOffset& new_total_scroll_offset) { | 329 const gfx::ScrollOffset& new_total_scroll_offset) { |
| 332 if (total_scroll_offset_ == new_total_scroll_offset) | 330 if (total_scroll_offset_ == new_total_scroll_offset) |
| 333 return; | 331 return; |
| 334 total_scroll_offset_ = new_total_scroll_offset; | 332 total_scroll_offset_ = new_total_scroll_offset; |
| 335 input_handler_proxy_->SynchronouslySetRootScrollOffset(total_scroll_offset_); | 333 input_handler_proxy_->SynchronouslySetRootScrollOffset(total_scroll_offset_); |
| 336 } | 334 } |
| 337 | 335 |
| 338 } // namespace content | 336 } // namespace content |
| OLD | NEW |