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

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

Issue 2282433002: Revert of cc: Delete all the RendererCapabilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-prepare-mailbox-param
Patch Set: Created 4 years, 3 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') | no next file » | 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 main().initialized = false; 192 main().initialized = false;
193 } 193 }
194 194
195 void ThreadedChannel::DidCompleteSwapBuffers() { 195 void ThreadedChannel::DidCompleteSwapBuffers() {
196 DCHECK(IsImplThread()); 196 DCHECK(IsImplThread());
197 MainThreadTaskRunner()->PostTask( 197 MainThreadTaskRunner()->PostTask(
198 FROM_HERE, base::Bind(&ProxyMain::DidCompleteSwapBuffers, 198 FROM_HERE, base::Bind(&ProxyMain::DidCompleteSwapBuffers,
199 impl().proxy_main_weak_ptr)); 199 impl().proxy_main_weak_ptr));
200 } 200 }
201 201
202 void ThreadedChannel::SetRendererCapabilitiesMainCopy(
203 const RendererCapabilities& capabilities) {
204 DCHECK(IsImplThread());
205 MainThreadTaskRunner()->PostTask(
206 FROM_HERE, base::Bind(&ProxyMain::SetRendererCapabilities,
207 impl().proxy_main_weak_ptr, capabilities));
208 }
209
202 void ThreadedChannel::BeginMainFrameNotExpectedSoon() { 210 void ThreadedChannel::BeginMainFrameNotExpectedSoon() {
203 DCHECK(IsImplThread()); 211 DCHECK(IsImplThread());
204 MainThreadTaskRunner()->PostTask( 212 MainThreadTaskRunner()->PostTask(
205 FROM_HERE, base::Bind(&ProxyMain::BeginMainFrameNotExpectedSoon, 213 FROM_HERE, base::Bind(&ProxyMain::BeginMainFrameNotExpectedSoon,
206 impl().proxy_main_weak_ptr)); 214 impl().proxy_main_weak_ptr));
207 } 215 }
208 216
209 void ThreadedChannel::DidCommitAndDrawFrame() { 217 void ThreadedChannel::DidCommitAndDrawFrame() {
210 DCHECK(IsImplThread()); 218 DCHECK(IsImplThread());
211 MainThreadTaskRunner()->PostTask(FROM_HERE, 219 MainThreadTaskRunner()->PostTask(FROM_HERE,
(...skipping 16 matching lines...) Expand all
228 base::Bind(&ProxyMain::DidLoseOutputSurface, impl().proxy_main_weak_ptr)); 236 base::Bind(&ProxyMain::DidLoseOutputSurface, impl().proxy_main_weak_ptr));
229 } 237 }
230 238
231 void ThreadedChannel::RequestNewOutputSurface() { 239 void ThreadedChannel::RequestNewOutputSurface() {
232 DCHECK(IsImplThread()); 240 DCHECK(IsImplThread());
233 MainThreadTaskRunner()->PostTask( 241 MainThreadTaskRunner()->PostTask(
234 FROM_HERE, base::Bind(&ProxyMain::RequestNewOutputSurface, 242 FROM_HERE, base::Bind(&ProxyMain::RequestNewOutputSurface,
235 impl().proxy_main_weak_ptr)); 243 impl().proxy_main_weak_ptr));
236 } 244 }
237 245
238 void ThreadedChannel::DidInitializeOutputSurface(bool success) { 246 void ThreadedChannel::DidInitializeOutputSurface(
247 bool success,
248 const RendererCapabilities& capabilities) {
239 DCHECK(IsImplThread()); 249 DCHECK(IsImplThread());
240 MainThreadTaskRunner()->PostTask( 250 MainThreadTaskRunner()->PostTask(
241 FROM_HERE, base::Bind(&ProxyMain::DidInitializeOutputSurface, 251 FROM_HERE, base::Bind(&ProxyMain::DidInitializeOutputSurface,
242 impl().proxy_main_weak_ptr, success)); 252 impl().proxy_main_weak_ptr, success, capabilities));
243 } 253 }
244 254
245 void ThreadedChannel::DidCompletePageScaleAnimation() { 255 void ThreadedChannel::DidCompletePageScaleAnimation() {
246 DCHECK(IsImplThread()); 256 DCHECK(IsImplThread());
247 MainThreadTaskRunner()->PostTask( 257 MainThreadTaskRunner()->PostTask(
248 FROM_HERE, base::Bind(&ProxyMain::DidCompletePageScaleAnimation, 258 FROM_HERE, base::Bind(&ProxyMain::DidCompletePageScaleAnimation,
249 impl().proxy_main_weak_ptr)); 259 impl().proxy_main_weak_ptr));
250 } 260 }
251 261
252 void ThreadedChannel::BeginMainFrame( 262 void ThreadedChannel::BeginMainFrame(
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 350
341 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {} 351 ThreadedChannel::MainThreadOnly::~MainThreadOnly() {}
342 352
343 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly( 353 ThreadedChannel::CompositorThreadOnly::CompositorThreadOnly(
344 base::WeakPtr<ProxyMain> proxy_main_weak_ptr) 354 base::WeakPtr<ProxyMain> proxy_main_weak_ptr)
345 : proxy_main_weak_ptr(proxy_main_weak_ptr) {} 355 : proxy_main_weak_ptr(proxy_main_weak_ptr) {}
346 356
347 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {} 357 ThreadedChannel::CompositorThreadOnly::~CompositorThreadOnly() {}
348 358
349 } // namespace cc 359 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/threaded_channel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698