| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 enum BeginFrameArgsType { | 43 enum BeginFrameArgsType { |
| 44 INVALID, | 44 INVALID, |
| 45 NORMAL, | 45 NORMAL, |
| 46 MISSED, | 46 MISSED, |
| 47 // Not a real type, but used by the IPC system. Should always remain the | 47 // Not a real type, but used by the IPC system. Should always remain the |
| 48 // *last* value in this enum. | 48 // *last* value in this enum. |
| 49 BEGIN_FRAME_ARGS_TYPE_MAX, | 49 BEGIN_FRAME_ARGS_TYPE_MAX, |
| 50 }; | 50 }; |
| 51 static const char* TypeToString(BeginFrameArgsType type); | 51 static const char* TypeToString(BeginFrameArgsType type); |
| 52 | 52 |
| 53 static constexpr uint32_t kStartingSourceId = 0; |
| 54 // |source_id| for BeginFrameArgs not created by a BeginFrameSource. Used to |
| 55 // avoid sequence number conflicts of BeginFrameArgs manually fed to an |
| 56 // observer with those fed to the observer by the its BeginFrameSource. |
| 57 static constexpr uint32_t kManualSourceId = UINT32_MAX; |
| 58 |
| 53 static constexpr uint64_t kInvalidFrameNumber = 0; | 59 static constexpr uint64_t kInvalidFrameNumber = 0; |
| 54 static constexpr uint64_t kStartingFrameNumber = 1; | 60 static constexpr uint64_t kStartingFrameNumber = 1; |
| 55 | 61 |
| 56 // Creates an invalid set of values. | 62 // Creates an invalid set of values. |
| 57 BeginFrameArgs(); | 63 BeginFrameArgs(); |
| 58 | 64 |
| 59 #ifdef NDEBUG | 65 #ifdef NDEBUG |
| 60 typedef const void* CreationLocation; | 66 typedef const void* CreationLocation; |
| 61 #else | 67 #else |
| 62 typedef const tracked_objects::Location& CreationLocation; | 68 typedef const tracked_objects::Location& CreationLocation; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 uint32_t remaining_frames; | 169 uint32_t remaining_frames; |
| 164 | 170 |
| 165 // |true| if the observer has produced damage (e.g. sent a CompositorFrame or | 171 // |true| if the observer has produced damage (e.g. sent a CompositorFrame or |
| 166 // damaged a surface) as part of responding to the BeginFrame. | 172 // damaged a surface) as part of responding to the BeginFrame. |
| 167 bool has_damage; | 173 bool has_damage; |
| 168 }; | 174 }; |
| 169 | 175 |
| 170 } // namespace cc | 176 } // namespace cc |
| 171 | 177 |
| 172 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ | 178 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
| OLD | NEW |