Chromium Code Reviews| Index: cc/trees/layer_tree_host.h |
| diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h |
| index 339ae4e3e0d62e635aa9bc02239ab8213d23320e..6f7bdcbc02cc236c14970516eff59a34ee28d928 100644 |
| --- a/cc/trees/layer_tree_host.h |
| +++ b/cc/trees/layer_tree_host.h |
| @@ -15,12 +15,14 @@ |
| #include "base/containers/hash_tables.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/memory/scoped_vector.h" |
| #include "base/memory/weak_ptr.h" |
| #include "base/time/time.h" |
| #include "base/timer/timer.h" |
| #include "cc/animation/animation_events.h" |
| #include "cc/base/cc_export.h" |
| #include "cc/base/scoped_ptr_vector.h" |
| +#include "cc/base/swap_promise.h" |
| #include "cc/debug/micro_benchmark.h" |
| #include "cc/debug/micro_benchmark_controller.h" |
| #include "cc/input/input_handler.h" |
| @@ -286,6 +288,15 @@ class CC_EXPORT LayerTreeHost { |
| scoped_ptr<base::Value> value, |
| const MicroBenchmark::DoneCallback& callback); |
| + // Call this function when you expect there to be a swap buffer. |
| + // See swap_promise.h for how to use SwapPromise. |
| + // LTH will take the ownership of |swap_promise|. |
|
danakj
2013/11/13 23:22:09
Spell out LayerTreeHost.
Yufeng Shen (Slow to review)
2013/11/14 22:09:55
Done.
|
| + void QueueSwapPromise(SwapPromise* swap_promise); |
|
danakj
2013/11/13 23:22:09
If ownership passes, why is this a raw pointer and
Yufeng Shen (Slow to review)
2013/11/14 22:09:55
Done.
|
| + |
| + bool HasQueuedSwapPromise(); |
| + void FinishSwapPromise(); |
| + void BreakSwapPromise(SwapPromise::DidNotSwapReason reason); |
| + |
| protected: |
| LayerTreeHost(LayerTreeHostClient* client, |
| SharedBitmapManager* manager, |
| @@ -433,6 +444,8 @@ class CC_EXPORT LayerTreeHost { |
| SharedBitmapManager* shared_bitmap_manager_; |
| + ScopedVector<SwapPromise> swap_promise_list_; |
|
danakj
2013/11/13 23:22:09
ScopedPtrVector?
Yufeng Shen (Slow to review)
2013/11/14 22:09:55
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| }; |