Index: cc/output/swap_promise.h |
diff --git a/cc/output/swap_promise.h b/cc/output/swap_promise.h |
index 1d6dabcbaa3366f127d87998b3c8f1555cffeb3f..719d53bcac1d2cb7b75a74632ba0a3d676cce731 100644 |
--- a/cc/output/swap_promise.h |
+++ b/cc/output/swap_promise.h |
@@ -5,7 +5,7 @@ |
#ifndef CC_OUTPUT_SWAP_PROMISE_H_ |
#define CC_OUTPUT_SWAP_PROMISE_H_ |
-#include "cc/output/compositor_frame_metadata.h" |
+#include "cc/output/promise.h" |
namespace cc { |
@@ -27,25 +27,16 @@ namespace cc { |
// DidNotSwap() are called at a particular thread. It is better to let the |
// subclass carry thread-safe member data and operate on that member data in |
// DidSwap() and DidNotSwap(). |
-class CC_EXPORT SwapPromise { |
+class CC_EXPORT SwapPromise : public Promise { |
public: |
- enum DidNotSwapReason { |
- DID_NOT_SWAP_UNKNOWN, |
- SWAP_FAILS, |
- COMMIT_FAILS, |
- COMMIT_NO_UPDATE, |
- }; |
- |
SwapPromise() {} |
- virtual ~SwapPromise() {} |
+ ~SwapPromise() override; |
virtual void DidSwap(CompositorFrameMetadata* metadata) = 0; |
- virtual void DidNotSwap(DidNotSwapReason reason) = 0; |
+ virtual void DidNotSwap(DidNotSwap::Reason reason) = 0; |
- // A non-zero trace id identifies a trace flow object that is embedded in the |
- // swap promise. This can be used for registering additional flow steps to |
- // visualize the object's path through the system. |
- virtual int64 TraceId() const = 0; |
+ bool OnDidSwap(CompositorFrameMetadata* metadata) final; |
+ bool OnDidNotSwap(DidNotSwap::Reason reason) final; |
}; |
} // namespace cc |