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

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: bad_message, reserve Created 4 years, 5 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
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 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 // Synchronous compositor does not use deadline-based scheduling. 1404 // Synchronous compositor does not use deadline-based scheduling.
1405 // TODO(brianderson): Replace this hardcoded deadline after Android 1405 // TODO(brianderson): Replace this hardcoded deadline after Android
1406 // switches to Surfaces and the Browser's commit isn't in the critcal path. 1406 // switches to Surfaces and the Browser's commit isn't in the critcal path.
1407 base::TimeTicks deadline = 1407 base::TimeTicks deadline =
1408 sync_compositor_ ? base::TimeTicks() : frame_time + (vsync_period * 0.6); 1408 sync_compositor_ ? base::TimeTicks() : frame_time + (vsync_period * 0.6);
1409 host_->Send(new ViewMsg_BeginFrame( 1409 host_->Send(new ViewMsg_BeginFrame(
1410 host_->GetRoutingID(), 1410 host_->GetRoutingID(),
1411 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline, 1411 cc::BeginFrameArgs::Create(BEGINFRAME_FROM_HERE, frame_time, deadline,
1412 vsync_period, cc::BeginFrameArgs::NORMAL))); 1412 vsync_period, cc::BeginFrameArgs::NORMAL)));
1413 if (sync_compositor_) 1413 if (sync_compositor_)
1414 sync_compositor_->DidSendBeginFrame(); 1414 sync_compositor_->DidSendBeginFrame(content_view_core_->GetWindowAndroid());
1415 } 1415 }
1416 1416
1417 bool RenderWidgetHostViewAndroid::Animate(base::TimeTicks frame_time) { 1417 bool RenderWidgetHostViewAndroid::Animate(base::TimeTicks frame_time) {
1418 bool needs_animate = false; 1418 bool needs_animate = false;
1419 if (overscroll_controller_) { 1419 if (overscroll_controller_) {
1420 needs_animate |= overscroll_controller_->Animate( 1420 needs_animate |= overscroll_controller_->Animate(
1421 frame_time, content_view_core_->GetLayer()); 1421 frame_time, content_view_core_->GetLayer());
1422 } 1422 }
1423 if (selection_controller_) 1423 if (selection_controller_)
1424 needs_animate |= selection_controller_->Animate(frame_time); 1424 needs_animate |= selection_controller_->Animate(frame_time);
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1978 case ui::MotionEvent::ACTION_UP: 1978 case ui::MotionEvent::ACTION_UP:
1979 case ui::MotionEvent::ACTION_POINTER_UP: 1979 case ui::MotionEvent::ACTION_POINTER_UP:
1980 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 1980 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
1981 delta.InMicroseconds(), 1, 1000000, 50); 1981 delta.InMicroseconds(), 1, 1000000, 50);
1982 default: 1982 default:
1983 return; 1983 return;
1984 } 1984 }
1985 } 1985 }
1986 1986
1987 } // namespace content 1987 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698