Index: cc/output/forced_redraw_swap_promise.h |
diff --git a/cc/output/forced_redraw_swap_promise.h b/cc/output/forced_redraw_swap_promise.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5bfa82c37626bda059b09dca4f3583a2dc6725cf |
--- /dev/null |
+++ b/cc/output/forced_redraw_swap_promise.h |
@@ -0,0 +1,34 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CC_OUTPUT_FORCED_REDRAW_SWAP_PROMISE_H_ |
+#define CC_OUTPUT_FORCED_REDRAW_SWAP_PROMISE_H_ |
+ |
+#include "base/compiler_specific.h" |
+#include "cc/output/swap_promise.h" |
+#include "ui/events/latency_info.h" |
+ |
+namespace cc { |
+ |
+// This class represents promise which is robust to (will not be broken by) |
+// |DidNotSwapReason::SWAP_FAILS| events. |
+class CC_EXPORT ForcedRedrawSwapPromise : public SwapPromise { |
danakj
2016/08/10 01:04:15
nit: i prefer AlwaysDrawSwapPromise. "Forced draws
svartmetal
2016/08/10 17:38:21
Fixed.
|
+ public: |
+ explicit ForcedRedrawSwapPromise(const ui::LatencyInfo& latency_info); |
+ ~ForcedRedrawSwapPromise() override; |
+ |
+ void DidActivate() override {} |
+ void DidSwap(CompositorFrameMetadata* metadata) override; |
+ DidNotSwapAction DidNotSwap(DidNotSwapReason reason) override; |
+ void OnCommit() override {} |
+ |
+ int64_t TraceId() const override; |
+ |
+ private: |
+ ui::LatencyInfo latency_; |
+}; |
+ |
+} // namespace cc |
+ |
+#endif // CC_OUTPUT_FORCED_REDRAW_SWAP_PROMISE_H_ |