Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CC_OUTPUT_FORCED_REDRAW_SWAP_PROMISE_H_ | |
| 6 #define CC_OUTPUT_FORCED_REDRAW_SWAP_PROMISE_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "cc/output/swap_promise.h" | |
| 10 #include "ui/events/latency_info.h" | |
| 11 | |
| 12 namespace cc { | |
| 13 | |
| 14 // This class represents promise which is robust to (will not be broken by) | |
| 15 // |DidNotSwapReason::SWAP_FAILS| events. | |
| 16 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.
| |
| 17 public: | |
| 18 explicit ForcedRedrawSwapPromise(const ui::LatencyInfo& latency_info); | |
| 19 ~ForcedRedrawSwapPromise() override; | |
| 20 | |
| 21 void DidActivate() override {} | |
| 22 void DidSwap(CompositorFrameMetadata* metadata) override; | |
| 23 DidNotSwapAction DidNotSwap(DidNotSwapReason reason) override; | |
| 24 void OnCommit() override {} | |
| 25 | |
| 26 int64_t TraceId() const override; | |
| 27 | |
| 28 private: | |
| 29 ui::LatencyInfo latency_; | |
| 30 }; | |
| 31 | |
| 32 } // namespace cc | |
| 33 | |
| 34 #endif // CC_OUTPUT_FORCED_REDRAW_SWAP_PROMISE_H_ | |
| OLD | NEW |