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

Side by Side Diff: cc/output/begin_frame_args.cc

Issue 2591013004: [cc] Add and use BeginFrameAck for DidFinishFrame. (Closed)
Patch Set: remove ipc struct traits for BeginFrameAck. Created 3 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 | « cc/output/begin_frame_args.h ('k') | cc/scheduler/begin_frame_source.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/output/begin_frame_args.h" 5 #include "cc/output/begin_frame_args.h"
6 6
7 #include "base/trace_event/trace_event_argument.h" 7 #include "base/trace_event/trace_event_argument.h"
8 #include "cc/proto/base_conversions.h" 8 #include "cc/proto/base_conversions.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // ouput, and the Renderer Main thread the first 1/3 of a frame to produce 101 // ouput, and the Renderer Main thread the first 1/3 of a frame to produce
102 // output. 102 // output.
103 base::TimeDelta BeginFrameArgs::DefaultEstimatedParentDrawTime() { 103 base::TimeDelta BeginFrameArgs::DefaultEstimatedParentDrawTime() {
104 return base::TimeDelta::FromMicroseconds(16666 / 3); 104 return base::TimeDelta::FromMicroseconds(16666 / 3);
105 } 105 }
106 106
107 base::TimeDelta BeginFrameArgs::DefaultInterval() { 107 base::TimeDelta BeginFrameArgs::DefaultInterval() {
108 return base::TimeDelta::FromMicroseconds(16666); 108 return base::TimeDelta::FromMicroseconds(16666);
109 } 109 }
110 110
111 BeginFrameAck::BeginFrameAck()
112 : sequence_number(BeginFrameArgs::kInvalidFrameNumber),
113 latest_confirmed_sequence_number(BeginFrameArgs::kInvalidFrameNumber),
114 source_id(0),
115 remaining_frames(0),
116 has_damage(false) {}
117
118 BeginFrameAck::BeginFrameAck(uint32_t source_id,
119 uint64_t sequence_number,
120 uint64_t latest_confirmed_sequence_number,
121 uint32_t remaining_frames,
122 bool has_damage)
123 : sequence_number(sequence_number),
124 latest_confirmed_sequence_number(latest_confirmed_sequence_number),
125 source_id(source_id),
126 remaining_frames(remaining_frames),
127 has_damage(has_damage) {
128 DCHECK_LT(BeginFrameArgs::kInvalidFrameNumber, sequence_number);
129 }
130
111 } // namespace cc 131 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/begin_frame_args.h ('k') | cc/scheduler/begin_frame_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698