OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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_PROMISE_LIST_H_ |
| 6 #define CC_OUTPUT_PROMISE_LIST_H_ |
| 7 |
| 8 #include "cc/base/scoped_ptr_vector.h" |
| 9 #include "cc/output/promise.h" |
| 10 |
| 11 namespace cc { |
| 12 |
| 13 class CC_EXPORT PromiseList { |
| 14 public: |
| 15 PromiseList(); |
| 16 ~PromiseList(); |
| 17 |
| 18 void QueuePromise(scoped_ptr<Promise>); |
| 19 void TakePromises(PromiseList*); |
| 20 void PassPromises(PromiseList*); |
| 21 |
| 22 void OnDidSwap(CompositorFrameMetadata* metadata); |
| 23 void OnDidNotSwap(Promise::DidNotSwap::Reason reason); |
| 24 |
| 25 void OnDidActivate(CompositorFrameMetadata* metadata); |
| 26 void OnDidNotActivate(Promise::DidNotActivate::Reason reason); |
| 27 |
| 28 size_t size() const { return promises_.size(); } |
| 29 |
| 30 void GetTraceIds(std::vector<int64>* trace_ids) const; |
| 31 |
| 32 private: |
| 33 ScopedPtrVector<Promise> promises_; |
| 34 }; |
| 35 |
| 36 } // namespace cc |
| 37 |
| 38 #endif // CC_OUTPUT_PROMISE_LIST_H_ |
OLD | NEW |