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

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

Issue 2779633002: [cc] Remove remaining_frames from BeginFrameAck. (Closed)
Patch Set: Created 3 years, 9 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/ipc/struct_traits_unittest.cc ('k') | cc/output/begin_frame_args.cc » ('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 #ifndef CC_OUTPUT_BEGIN_FRAME_ARGS_H_ 5 #ifndef CC_OUTPUT_BEGIN_FRAME_ARGS_H_
6 #define CC_OUTPUT_BEGIN_FRAME_ARGS_H_ 6 #define CC_OUTPUT_BEGIN_FRAME_ARGS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 base::TimeDelta interval, 115 base::TimeDelta interval,
116 BeginFrameArgsType type); 116 BeginFrameArgsType type);
117 }; 117 };
118 118
119 // Sent by a BeginFrameObserver as acknowledgment of completing a BeginFrame. 119 // Sent by a BeginFrameObserver as acknowledgment of completing a BeginFrame.
120 struct CC_EXPORT BeginFrameAck { 120 struct CC_EXPORT BeginFrameAck {
121 BeginFrameAck(); 121 BeginFrameAck();
122 BeginFrameAck(uint32_t source_id, 122 BeginFrameAck(uint32_t source_id,
123 uint64_t sequence_number, 123 uint64_t sequence_number,
124 uint64_t latest_confirmed_sequence_number, 124 uint64_t latest_confirmed_sequence_number,
125 uint32_t remaining_frames,
126 bool has_damage); 125 bool has_damage);
127 126
128 // Creates a BeginFrameAck for a manual BeginFrame. Used when clients produce 127 // Creates a BeginFrameAck for a manual BeginFrame. Used when clients produce
129 // a CompositorFrame without prior BeginFrame, e.g. for synchronous drawing. 128 // a CompositorFrame without prior BeginFrame, e.g. for synchronous drawing.
130 static BeginFrameAck CreateManualAckWithDamage(); 129 static BeginFrameAck CreateManualAckWithDamage();
131 130
132 // Sequence number of the BeginFrame that is acknowledged. 131 // Sequence number of the BeginFrame that is acknowledged.
133 uint64_t sequence_number; 132 uint64_t sequence_number;
134 133
135 // Sequence number of the latest BeginFrame that was positively acknowledged 134 // Sequence number of the latest BeginFrame that was positively acknowledged
(...skipping 25 matching lines...) Expand all
161 // observers according to above comment. 160 // observers according to above comment.
162 uint64_t latest_confirmed_sequence_number; 161 uint64_t latest_confirmed_sequence_number;
163 162
164 // Source identifier of the BeginFrame that is acknowledged. The 163 // Source identifier of the BeginFrame that is acknowledged. The
165 // BeginFrameSource that receives the acknowledgment uses this to discard 164 // BeginFrameSource that receives the acknowledgment uses this to discard
166 // BeginFrameAcks for BeginFrames sent by a different source. Such a situation 165 // BeginFrameAcks for BeginFrames sent by a different source. Such a situation
167 // may occur when the BeginFrameSource of the observer changes while a 166 // may occur when the BeginFrameSource of the observer changes while a
168 // BeginFrame from the old source is still in flight. 167 // BeginFrame from the old source is still in flight.
169 uint32_t source_id; // |source_id| after above fields for packing. 168 uint32_t source_id; // |source_id| after above fields for packing.
170 169
171 // Number of BeginFrames queued at the observer at time of acknowledgment.
172 // TODO(eseckler): Remove this field and replace with ack-tracking if needed.
173 uint32_t remaining_frames;
174
175 // |true| if the observer has produced damage (e.g. sent a CompositorFrame or 170 // |true| if the observer has produced damage (e.g. sent a CompositorFrame or
176 // damaged a surface) as part of responding to the BeginFrame. 171 // damaged a surface) as part of responding to the BeginFrame.
177 bool has_damage; 172 bool has_damage;
178 }; 173 };
179 174
180 } // namespace cc 175 } // namespace cc
181 176
182 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ 177 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_
OLDNEW
« no previous file with comments | « cc/ipc/struct_traits_unittest.cc ('k') | cc/output/begin_frame_args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698