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

Side by Side Diff: content/renderer/android/synchronous_compositor_proxy.cc

Issue 2160743002: sync compositor: Reduce begin frame sync IPC overhead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clang format Created 4 years, 4 months 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 unified diff | Download patch
« no previous file with comments | « content/renderer/android/synchronous_compositor_proxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/android/synchronous_compositor_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698