Index: cc/base/swap_promise.h |
diff --git a/cc/base/swap_promise.h b/cc/base/swap_promise.h |
index 90bf6af53a6a0909484cd897b1ccab6a2cbe3844..1d4c2473e5216d10bd2e78d174737b9d72b33124 100644 |
--- a/cc/base/swap_promise.h |
+++ b/cc/base/swap_promise.h |
@@ -5,6 +5,8 @@ |
#ifndef CC_BASE_SWAP_PROMISE_H_ |
#define CC_BASE_SWAP_PROMISE_H_ |
+#include "cc/output/compositor_frame_metadata.h" |
+ |
namespace cc { |
const unsigned int kMaxQueuedSwapPromiseNumber = 100; |
@@ -29,8 +31,10 @@ const unsigned int kMaxQueuedSwapPromiseNumber = 100; |
// DidSwap() and DidNotSwap(). |
class SwapPromise { |
public: |
- SwapPromise() {} |
- virtual ~SwapPromise() {} |
+ enum SwapPromiseType { |
danakj
2013/11/27 20:11:42
This is no longer needed
Yufeng Shen (Slow to review)
2013/11/27 20:18:52
Done.
|
+ SWAP_PROMISE_UNKNOWN, |
+ SWAP_PROMISE_LATENCY_INFO, |
+ }; |
enum DidNotSwapReason { |
DID_NOT_SWAP_UNKNOWN, |
@@ -39,8 +43,18 @@ class SwapPromise { |
SWAP_PROMISE_LIST_OVERFLOW, |
}; |
- virtual void DidSwap() = 0; |
+ explicit SwapPromise(SwapPromiseType type) : type_(type) {} |
+ virtual ~SwapPromise() {} |
+ |
+ SwapPromiseType type() { |
+ return type_; |
+ } |
+ |
+ virtual void DidSwap(CompositorFrameMetadata* metadata) = 0; |
virtual void DidNotSwap(DidNotSwapReason reason) = 0; |
+ |
+ protected: |
+ SwapPromiseType type_; |
danakj
2013/11/27 20:11:42
The type should be able to go away now.
Yufeng Shen (Slow to review)
2013/11/27 20:18:52
Done.
|
}; |
} // namespace cc |