OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/layers/surface_layer.h" | 5 #include "cc/layers/surface_layer.h" |
6 | 6 |
7 #include "cc/layers/surface_layer_impl.h" | 7 #include "cc/layers/surface_layer_impl.h" |
8 #include "cc/output/swap_promise.h" | 8 #include "cc/output/swap_promise.h" |
9 #include "cc/trees/layer_tree_host.h" | 9 #include "cc/trees/layer_tree_host.h" |
10 | 10 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 require_callback_.Run(surface_id_, destroy_sequence_); | 105 require_callback_.Run(surface_id_, destroy_sequence_); |
106 } | 106 } |
107 } | 107 } |
108 | 108 |
109 void SurfaceLayer::SatisfyDestroySequence() { | 109 void SurfaceLayer::SatisfyDestroySequence() { |
110 if (!layer_tree_host()) | 110 if (!layer_tree_host()) |
111 return; | 111 return; |
112 DCHECK(!destroy_sequence_.is_null()); | 112 DCHECK(!destroy_sequence_.is_null()); |
113 scoped_ptr<SatisfySwapPromise> satisfy( | 113 scoped_ptr<SatisfySwapPromise> satisfy( |
114 new SatisfySwapPromise(destroy_sequence_, satisfy_callback_)); | 114 new SatisfySwapPromise(destroy_sequence_, satisfy_callback_)); |
115 layer_tree_host()->QueueSwapPromise(satisfy.Pass()); | 115 layer_tree_host()->QueueSwapPromise(std::move(satisfy)); |
116 destroy_sequence_ = SurfaceSequence(); | 116 destroy_sequence_ = SurfaceSequence(); |
117 } | 117 } |
118 | 118 |
119 } // namespace cc | 119 } // namespace cc |
OLD | NEW |