OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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/trees/threaded_channel.h" | 5 #include "cc/trees/threaded_channel.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 CompletionEvent completion; | 184 CompletionEvent completion; |
185 ImplThreadTaskRunner()->PostTask( | 185 ImplThreadTaskRunner()->PostTask( |
186 FROM_HERE, base::Bind(&ThreadedChannel::CloseImplOnImpl, | 186 FROM_HERE, base::Bind(&ThreadedChannel::CloseImplOnImpl, |
187 base::Unretained(this), &completion)); | 187 base::Unretained(this), &completion)); |
188 completion.Wait(); | 188 completion.Wait(); |
189 } | 189 } |
190 main().proxy_main_weak_factory.InvalidateWeakPtrs(); | 190 main().proxy_main_weak_factory.InvalidateWeakPtrs(); |
191 main().initialized = false; | 191 main().initialized = false; |
192 } | 192 } |
193 | 193 |
194 void ThreadedChannel::DidCompleteSwapBuffers() { | 194 void ThreadedChannel::DidReceiveCompositorFrameAck() { |
195 DCHECK(IsImplThread()); | 195 DCHECK(IsImplThread()); |
196 MainThreadTaskRunner()->PostTask( | 196 MainThreadTaskRunner()->PostTask( |
197 FROM_HERE, base::Bind(&ProxyMain::DidCompleteSwapBuffers, | 197 FROM_HERE, base::Bind(&ProxyMain::DidReceiveCompositorFrameAck, |
198 impl().proxy_main_weak_ptr)); | 198 impl().proxy_main_weak_ptr)); |
199 } | 199 } |
200 | 200 |
201 void ThreadedChannel::BeginMainFrameNotExpectedSoon() { | 201 void ThreadedChannel::BeginMainFrameNotExpectedSoon() { |
202 DCHECK(IsImplThread()); | 202 DCHECK(IsImplThread()); |
203 MainThreadTaskRunner()->PostTask( | 203 MainThreadTaskRunner()->PostTask( |
204 FROM_HERE, base::Bind(&ProxyMain::BeginMainFrameNotExpectedSoon, | 204 FROM_HERE, base::Bind(&ProxyMain::BeginMainFrameNotExpectedSoon, |
205 impl().proxy_main_weak_ptr)); | 205 impl().proxy_main_weak_ptr)); |
206 } | 206 } |
207 | 207 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 | 335 |
336 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {} | 336 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {} |
337 | 337 |
338 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly( | 338 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly( |
339 base::WeakPtr<ProxyMain> proxy_main_weak_ptr) | 339 base::WeakPtr<ProxyMain> proxy_main_weak_ptr) |
340 : proxy_main_weak_ptr(proxy_main_weak_ptr) {} | 340 : proxy_main_weak_ptr(proxy_main_weak_ptr) {} |
341 | 341 |
342 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} | 342 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} |
343 | 343 |
344 } // namespace cc | 344 } // namespace cc |
OLD | NEW |