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

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

Issue 1601743008: sync compositor: Make OnComputeScroll async IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "content/common/android/sync_compositor_messages.h" 9 #include "content/common/android/sync_compositor_messages.h"
10 #include "content/common/cc_messages.h" 10 #include "content/common/cc_messages.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 DCHECK(!(hardware_draw_reply_ && software_draw_reply_)); 350 DCHECK(!(hardware_draw_reply_ && software_draw_reply_));
351 if (hardware_draw_reply_) { 351 if (hardware_draw_reply_) {
352 SwapBuffersHw(frame); 352 SwapBuffersHw(frame);
353 } else if (software_draw_reply_) { 353 } else if (software_draw_reply_) {
354 SwapBuffersSw(frame); 354 SwapBuffersSw(frame);
355 } 355 }
356 } 356 }
357 357
358 void SynchronousCompositorProxy::OnComputeScroll( 358 void SynchronousCompositorProxy::OnComputeScroll(
359 const SyncCompositorCommonBrowserParams& common_params, 359 const SyncCompositorCommonBrowserParams& common_params,
360 base::TimeTicks animation_time, 360 base::TimeTicks animation_time) {
361 SyncCompositorCommonRendererParams* common_renderer_params) {
362 DCHECK(!inside_receive_);
363 base::AutoReset<bool> scoped_inside_receive(&inside_receive_, true);
364
365 ProcessCommonParams(common_params); 361 ProcessCommonParams(common_params);
366 if (need_animate_scroll_) { 362 if (need_animate_scroll_) {
367 need_animate_scroll_ = false; 363 need_animate_scroll_ = false;
368 input_handler_proxy_->SynchronouslyAnimate(animation_time); 364 input_handler_proxy_->SynchronouslyAnimate(animation_time);
369 } 365 }
370 PopulateCommonParams(common_renderer_params);
371 } 366 }
372 367
373 void SynchronousCompositorProxy::DidOverscroll( 368 void SynchronousCompositorProxy::DidOverscroll(
374 const DidOverscrollParams& did_overscroll_params) { 369 const DidOverscrollParams& did_overscroll_params) {
375 SyncCompositorCommonRendererParams params; 370 SyncCompositorCommonRendererParams params;
376 PopulateCommonParams(&params); 371 PopulateCommonParams(&params);
377 Send(new SyncCompositorHostMsg_OverScroll(routing_id_, params, 372 Send(new SyncCompositorHostMsg_OverScroll(routing_id_, params,
378 did_overscroll_params)); 373 did_overscroll_params));
379 } 374 }
380 375
(...skipping 10 matching lines...) Expand all
391 total_scroll_offset_); 386 total_scroll_offset_);
392 } 387 }
393 begin_frame_source_->SetBeginFrameSourcePaused( 388 begin_frame_source_->SetBeginFrameSourcePaused(
394 common_params.begin_frame_source_paused); 389 common_params.begin_frame_source_paused);
395 if (!common_params.ack.resources.empty()) { 390 if (!common_params.ack.resources.empty()) {
396 output_surface_->ReturnResources(common_params.ack); 391 output_surface_->ReturnResources(common_params.ack);
397 } 392 }
398 } 393 }
399 394
400 } // namespace content 395 } // 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