| 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 <stdint.h> |
| 9 |
| 8 #include "cc/output/compositor_frame_metadata.h" | 10 #include "cc/output/compositor_frame_metadata.h" |
| 9 | 11 |
| 10 namespace cc { | 12 namespace cc { |
| 11 | 13 |
| 12 // When a change to the compositor's state/invalidation/whatever happens, a | 14 // When a change to the compositor's state/invalidation/whatever happens, a |
| 13 // Swap Promise can be inserted into LayerTreeHost/LayerTreeImpl, to track | 15 // Swap Promise can be inserted into LayerTreeHost/LayerTreeImpl, to track |
| 14 // whether the compositor's reply to the new state/invaliadtion/whatever is | 16 // whether the compositor's reply to the new state/invaliadtion/whatever is |
| 15 // completed in the compositor, i.e. the compositor knows it has been sent | 17 // completed in the compositor, i.e. the compositor knows it has been sent |
| 16 // to its output or not. | 18 // to its output or not. |
| 17 // | 19 // |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 55 |
| 54 virtual void DidActivate() = 0; | 56 virtual void DidActivate() = 0; |
| 55 virtual void DidSwap(CompositorFrameMetadata* metadata) = 0; | 57 virtual void DidSwap(CompositorFrameMetadata* metadata) = 0; |
| 56 virtual void DidNotSwap(DidNotSwapReason reason) = 0; | 58 virtual void DidNotSwap(DidNotSwapReason reason) = 0; |
| 57 // This is called when the main thread starts a (blocking) commit | 59 // This is called when the main thread starts a (blocking) commit |
| 58 virtual void OnCommit() {} | 60 virtual void OnCommit() {} |
| 59 | 61 |
| 60 // A non-zero trace id identifies a trace flow object that is embedded in the | 62 // A non-zero trace id identifies a trace flow object that is embedded in the |
| 61 // swap promise. This can be used for registering additional flow steps to | 63 // swap promise. This can be used for registering additional flow steps to |
| 62 // visualize the object's path through the system. | 64 // visualize the object's path through the system. |
| 63 virtual int64 TraceId() const = 0; | 65 virtual int64_t TraceId() const = 0; |
| 64 }; | 66 }; |
| 65 | 67 |
| 66 } // namespace cc | 68 } // namespace cc |
| 67 | 69 |
| 68 #endif // CC_OUTPUT_SWAP_PROMISE_H_ | 70 #endif // CC_OUTPUT_SWAP_PROMISE_H_ |
| OLD | NEW |