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_BASE_SWAP_PROMISE_H_ | 5 #ifndef CC_BASE_SWAP_PROMISE_H_ |
6 #define CC_BASE_SWAP_PROMISE_H_ | 6 #define CC_BASE_SWAP_PROMISE_H_ |
7 | 7 |
8 #include "cc/output/compositor_frame_metadata.h" | 8 #include "cc/output/compositor_frame_metadata.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
(...skipping 23 matching lines...) Expand all Loading... |
34 SWAP_FAILS, | 34 SWAP_FAILS, |
35 COMMIT_FAILS, | 35 COMMIT_FAILS, |
36 COMMIT_NO_UPDATE, | 36 COMMIT_NO_UPDATE, |
37 }; | 37 }; |
38 | 38 |
39 SwapPromise() {} | 39 SwapPromise() {} |
40 virtual ~SwapPromise() {} | 40 virtual ~SwapPromise() {} |
41 | 41 |
42 virtual void DidSwap(CompositorFrameMetadata* metadata) = 0; | 42 virtual void DidSwap(CompositorFrameMetadata* metadata) = 0; |
43 virtual void DidNotSwap(DidNotSwapReason reason) = 0; | 43 virtual void DidNotSwap(DidNotSwapReason reason) = 0; |
44 | |
45 // A non-zero trace id identifies a trace flow object that is embedded in the | |
46 // swap promise. This can be used for registering additional flow steps to | |
47 // visualize the object's path through the system. | |
48 virtual int64 TraceId() const = 0; | |
49 }; | 44 }; |
50 | 45 |
51 } // namespace cc | 46 } // namespace cc |
52 | 47 |
53 #endif // CC_BASE_SWAP_PROMISE_H_ | 48 #endif // CC_BASE_SWAP_PROMISE_H_ |
OLD | NEW |