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

Side by Side Diff: content/browser/compositor/gpu_vsync_begin_frame_source.cc

Issue 2778223005: Plumb activation time to main (Closed)
Patch Set: update another BeginMainFrame::Create reference Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/compositor/gpu_vsync_begin_frame_source.h" 5 #include "content/browser/compositor/gpu_vsync_begin_frame_source.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 GpuVSyncBeginFrameSource::GpuVSyncBeginFrameSource( 9 GpuVSyncBeginFrameSource::GpuVSyncBeginFrameSource(
10 GpuVSyncControl* vsync_control) 10 GpuVSyncControl* vsync_control)
(...skipping 12 matching lines...) Expand all
23 return; 23 return;
24 24
25 base::TimeTicks now = base::TimeTicks::Now(); 25 base::TimeTicks now = base::TimeTicks::Now();
26 base::TimeTicks deadline = now.SnappedToNextTick(timestamp, interval); 26 base::TimeTicks deadline = now.SnappedToNextTick(timestamp, interval);
27 27
28 TRACE_EVENT1("cc", "GpuVSyncBeginFrameSource::OnVSync", "latency", 28 TRACE_EVENT1("cc", "GpuVSyncBeginFrameSource::OnVSync", "latency",
29 (now - timestamp).ToInternalValue()); 29 (now - timestamp).ToInternalValue());
30 30
31 next_sequence_number_++; 31 next_sequence_number_++;
32 OnBeginFrame(cc::BeginFrameArgs::Create( 32 OnBeginFrame(cc::BeginFrameArgs::Create(
33 BEGINFRAME_FROM_HERE, source_id(), next_sequence_number_, timestamp, 33 BEGINFRAME_FROM_HERE, source_id(), next_sequence_number_,
34 deadline, interval, cc::BeginFrameArgs::NORMAL)); 34 cc::BeginFrameArgs::kDefaultSourceFrameNumber, timestamp, deadline,
35 interval, cc::BeginFrameArgs::NORMAL));
35 } 36 }
36 37
37 void GpuVSyncBeginFrameSource::OnNeedsBeginFrames(bool needs_begin_frames) { 38 void GpuVSyncBeginFrameSource::OnNeedsBeginFrames(bool needs_begin_frames) {
38 needs_begin_frames_ = needs_begin_frames; 39 needs_begin_frames_ = needs_begin_frames;
39 vsync_control_->SetNeedsVSync(needs_begin_frames); 40 vsync_control_->SetNeedsVSync(needs_begin_frames);
40 } 41 }
41 42
42 void GpuVSyncBeginFrameSource::OnDidFinishFrame(const cc::BeginFrameAck& ack) {} 43 void GpuVSyncBeginFrameSource::OnDidFinishFrame(const cc::BeginFrameAck& ack) {}
43 44
44 } // namespace content 45 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698