| OLD | NEW |
| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, | 125 uint32_t remaining_frames, |
| 126 bool has_damage); | 126 bool has_damage); |
| 127 | 127 |
| 128 // Creates a BeginFrameAck for a manual BeginFrame. Used when clients produce |
| 129 // a CompositorFrame without prior BeginFrame, e.g. for synchronous drawing. |
| 130 static BeginFrameAck CreateManualAckWithDamage(); |
| 131 |
| 128 // Sequence number of the BeginFrame that is acknowledged. | 132 // Sequence number of the BeginFrame that is acknowledged. |
| 129 uint64_t sequence_number; | 133 uint64_t sequence_number; |
| 130 | 134 |
| 131 // Sequence number of the latest BeginFrame that was positively acknowledged | 135 // Sequence number of the latest BeginFrame that was positively acknowledged |
| 132 // (confirmed) by the observer. | 136 // (confirmed) by the observer. |
| 133 // | 137 // |
| 134 // There are two scenarios for a positive acknowledgment: | 138 // There are two scenarios for a positive acknowledgment: |
| 135 // a) All of the observer's pending updates led to successful damage (e.g. a | 139 // a) All of the observer's pending updates led to successful damage (e.g. a |
| 136 // CompositorFrame or a damaged surface). | 140 // CompositorFrame or a damaged surface). |
| 137 // b) The observer did not have any updates and thus did not need to | 141 // b) The observer did not have any updates and thus did not need to |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 uint32_t remaining_frames; | 173 uint32_t remaining_frames; |
| 170 | 174 |
| 171 // |true| if the observer has produced damage (e.g. sent a CompositorFrame or | 175 // |true| if the observer has produced damage (e.g. sent a CompositorFrame or |
| 172 // damaged a surface) as part of responding to the BeginFrame. | 176 // damaged a surface) as part of responding to the BeginFrame. |
| 173 bool has_damage; | 177 bool has_damage; |
| 174 }; | 178 }; |
| 175 | 179 |
| 176 } // namespace cc | 180 } // namespace cc |
| 177 | 181 |
| 178 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ | 182 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
| OLD | NEW |