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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.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/browser/bad_message.h ('k') | content/common/android/sync_compositor_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 // Synchronous compositor does not use deadline-based scheduling. 1410 // Synchronous compositor does not use deadline-based scheduling.
1411 // TODO(brianderson): Replace this hardcoded deadline after Android 1411 // TODO(brianderson): Replace this hardcoded deadline after Android
1412 // switches to Surfaces and the Browser's commit isn't in the critcal path. 1412 // switches to Surfaces and the Browser's commit isn't in the critcal path.
1413 base::TimeTicks deadline = 1413 base::TimeTicks deadline =
1414 sync_compositor_ ? base::TimeTicks() : frame_time + (vsync_period * 0.6); 1414 sync_compositor_ ? base::TimeTicks() : frame_time + (vsync_period * 0.6);
1415 host_->Send(new ViewMsg_BeginFrame( 1415 host_->Send(new ViewMsg_BeginFrame(
1416 host_->GetRoutingID(), 1416 host_->GetRoutingID(),
1417 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline, 1417 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline,
1418 vsync_period, cc::BeginFrameArgs::NORMAL))); 1418 vsync_period, cc::BeginFrameArgs::NORMAL)));
1419 if (sync_compositor_) 1419 if (sync_compositor_)
1420 sync_compositor_->DidSendBeginFrame(); 1420 sync_compositor_->DidSendBeginFrame(content_view_core_->GetWindowAndroid());
1421 } 1421 }
1422 1422
1423 bool RenderWidgetHostViewAndroid::Animate(base::TimeTicks frame_time) { 1423 bool RenderWidgetHostViewAndroid::Animate(base::TimeTicks frame_time) {
1424 bool needs_animate = false; 1424 bool needs_animate = false;
1425 if (overscroll_controller_) { 1425 if (overscroll_controller_) {
1426 needs_animate |= overscroll_controller_->Animate( 1426 needs_animate |= overscroll_controller_->Animate(
1427 frame_time, content_view_core_->GetLayer()); 1427 frame_time, content_view_core_->GetLayer());
1428 } 1428 }
1429 if (selection_controller_) 1429 if (selection_controller_)
1430 needs_animate |= selection_controller_->Animate(frame_time); 1430 needs_animate |= selection_controller_->Animate(frame_time);
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1984 case ui::MotionEvent::ACTION_UP: 1984 case ui::MotionEvent::ACTION_UP:
1985 case ui::MotionEvent::ACTION_POINTER_UP: 1985 case ui::MotionEvent::ACTION_POINTER_UP:
1986 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 1986 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
1987 delta.InMicroseconds(), 1, 1000000, 50); 1987 delta.InMicroseconds(), 1, 1000000, 50);
1988 default: 1988 default:
1989 return; 1989 return;
1990 } 1990 }
1991 } 1991 }
1992 1992
1993 } // namespace content 1993 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/bad_message.h ('k') | content/common/android/sync_compositor_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698