Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: cc/trees/threaded_channel.cc

Issue 2409923002: cc: Rename SwapBuffers on CompositorFrameSink to SubmitCompositorFrame (Closed)
Patch Set: swap-to-submit: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/threaded_channel.h ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/threaded_channel.h ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698