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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
11 #include "base/trace_event/trace_event.h" | 12 #include "base/trace_event/trace_event.h" |
12 #include "cc/layers/surface_layer_impl.h" | 13 #include "cc/layers/surface_layer_impl.h" |
13 #include "cc/output/swap_promise.h" | 14 #include "cc/output/swap_promise.h" |
14 #include "cc/surfaces/surface_sequence_generator.h" | 15 #include "cc/surfaces/surface_sequence_generator.h" |
15 #include "cc/trees/layer_tree_host.h" | 16 #include "cc/trees/layer_tree_host.h" |
16 #include "cc/trees/swap_promise_manager.h" | 17 #include "cc/trees/swap_promise_manager.h" |
17 | 18 |
18 namespace cc { | 19 namespace cc { |
19 | 20 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 void SurfaceLayer::RemoveCurrentReference() { | 108 void SurfaceLayer::RemoveCurrentReference() { |
108 if (!current_ref_) | 109 if (!current_ref_) |
109 return; | 110 return; |
110 auto swap_promise = base::MakeUnique<SatisfySwapPromise>( | 111 auto swap_promise = base::MakeUnique<SatisfySwapPromise>( |
111 std::move(current_ref_), base::ThreadTaskRunnerHandle::Get()); | 112 std::move(current_ref_), base::ThreadTaskRunnerHandle::Get()); |
112 layer_tree_host()->GetSwapPromiseManager()->QueueSwapPromise( | 113 layer_tree_host()->GetSwapPromiseManager()->QueueSwapPromise( |
113 std::move(swap_promise)); | 114 std::move(swap_promise)); |
114 } | 115 } |
115 | 116 |
116 } // namespace cc | 117 } // namespace cc |
OLD | NEW |