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_SWAP_PROMISE_H_ | 5 #ifndef CC_OUTPUT_SWAP_PROMISE_H_ |
6 #define CC_OUTPUT_SWAP_PROMISE_H_ | 6 #define CC_OUTPUT_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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 COMMIT_NO_UPDATE, | 47 COMMIT_NO_UPDATE, |
48 ACTIVATION_FAILS, | 48 ACTIVATION_FAILS, |
49 }; | 49 }; |
50 | 50 |
51 SwapPromise() {} | 51 SwapPromise() {} |
52 virtual ~SwapPromise() {} | 52 virtual ~SwapPromise() {} |
53 | 53 |
54 virtual void DidActivate() = 0; | 54 virtual void DidActivate() = 0; |
55 virtual void DidSwap(CompositorFrameMetadata* metadata) = 0; | 55 virtual void DidSwap(CompositorFrameMetadata* metadata) = 0; |
56 virtual void DidNotSwap(DidNotSwapReason reason) = 0; | 56 virtual void DidNotSwap(DidNotSwapReason reason) = 0; |
| 57 // This is called when the main thread starts a (blocking) commit |
| 58 virtual void OnCommit() {} |
57 | 59 |
58 // A non-zero trace id identifies a trace flow object that is embedded in the | 60 // A non-zero trace id identifies a trace flow object that is embedded in the |
59 // swap promise. This can be used for registering additional flow steps to | 61 // swap promise. This can be used for registering additional flow steps to |
60 // visualize the object's path through the system. | 62 // visualize the object's path through the system. |
61 virtual int64 TraceId() const = 0; | 63 virtual int64 TraceId() const = 0; |
62 }; | 64 }; |
63 | 65 |
64 } // namespace cc | 66 } // namespace cc |
65 | 67 |
66 #endif // CC_OUTPUT_SWAP_PROMISE_H_ | 68 #endif // CC_OUTPUT_SWAP_PROMISE_H_ |
OLD | NEW |