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

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

Issue 1925863003: Changed Blimp client to start with white screen before drawing contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/remote_channel_impl.h" 5 #include "cc/trees/remote_channel_impl.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "cc/animation/animation_events.h" 10 #include "cc/animation/animation_events.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_); 324 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_);
325 ImplThreadTaskRunner()->PostTask( 325 ImplThreadTaskRunner()->PostTask(
326 FROM_HERE, 326 FROM_HERE,
327 base::Bind(&ProxyImpl::MainFrameWillHappenOnImplForTesting, 327 base::Bind(&ProxyImpl::MainFrameWillHappenOnImplForTesting,
328 proxy_impl_weak_ptr_, &completion, &main_frame_will_happen)); 328 proxy_impl_weak_ptr_, &completion, &main_frame_will_happen));
329 completion.Wait(); 329 completion.Wait();
330 } 330 }
331 return main_frame_will_happen; 331 return main_frame_will_happen;
332 } 332 }
333 333
334 void RemoteChannelImpl::DidCompleteSwapBuffers() {} 334 void RemoteChannelImpl::DidCompleteSwapBuffers() {
Khushal 2016/04/28 03:32:26 Could you DCHECK(task_runner_provider_->IsImplThre
shaktisahu 2016/04/28 21:38:16 Done.
335 MainThreadTaskRunner()->PostTask(
336 FROM_HERE, base::Bind(&RemoteChannelImpl::DidCompleteSwapBuffersOnMain,
337 impl().remote_channel_weak_ptr));
338 }
335 339
336 void RemoteChannelImpl::SetRendererCapabilitiesMainCopy( 340 void RemoteChannelImpl::SetRendererCapabilitiesMainCopy(
337 const RendererCapabilities& capabilities) {} 341 const RendererCapabilities& capabilities) {}
338 342
339 void RemoteChannelImpl::BeginMainFrameNotExpectedSoon() {} 343 void RemoteChannelImpl::BeginMainFrameNotExpectedSoon() {}
340 344
341 void RemoteChannelImpl::DidCommitAndDrawFrame() {} 345 void RemoteChannelImpl::DidCommitAndDrawFrame() {}
342 346
343 void RemoteChannelImpl::SetAnimationEvents( 347 void RemoteChannelImpl::SetAnimationEvents(
344 std::unique_ptr<AnimationEvents> queue) {} 348 std::unique_ptr<AnimationEvents> queue) {}
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 void RemoteChannelImpl::SendMessageProto( 395 void RemoteChannelImpl::SendMessageProto(
392 std::unique_ptr<proto::CompositorMessage> proto) { 396 std::unique_ptr<proto::CompositorMessage> proto) {
393 DCHECK(task_runner_provider_->IsImplThread()); 397 DCHECK(task_runner_provider_->IsImplThread());
394 398
395 MainThreadTaskRunner()->PostTask( 399 MainThreadTaskRunner()->PostTask(
396 FROM_HERE, 400 FROM_HERE,
397 base::Bind(&RemoteChannelImpl::SendMessageProtoOnMain, 401 base::Bind(&RemoteChannelImpl::SendMessageProtoOnMain,
398 impl().remote_channel_weak_ptr, base::Passed(&proto))); 402 impl().remote_channel_weak_ptr, base::Passed(&proto)));
399 } 403 }
400 404
405 void RemoteChannelImpl::DidCompleteSwapBuffersOnMain() {
406 DCHECK(task_runner_provider_->IsMainThread());
407 main().layer_tree_host->DidCompleteSwapBuffers();
408 }
409
401 void RemoteChannelImpl::DidLoseOutputSurfaceOnMain() { 410 void RemoteChannelImpl::DidLoseOutputSurfaceOnMain() {
402 DCHECK(task_runner_provider_->IsMainThread()); 411 DCHECK(task_runner_provider_->IsMainThread());
403 412
404 main().layer_tree_host->DidLoseOutputSurface(); 413 main().layer_tree_host->DidLoseOutputSurface();
405 } 414 }
406 415
407 void RemoteChannelImpl::RequestNewOutputSurfaceOnMain() { 416 void RemoteChannelImpl::RequestNewOutputSurfaceOnMain() {
408 DCHECK(task_runner_provider_->IsMainThread()); 417 DCHECK(task_runner_provider_->IsMainThread());
409 418
410 main().layer_tree_host->RequestNewOutputSurface(); 419 main().layer_tree_host->RequestNewOutputSurface();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 537
529 RemoteChannelImpl::CompositorThreadOnly::CompositorThreadOnly( 538 RemoteChannelImpl::CompositorThreadOnly::CompositorThreadOnly(
530 base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr) 539 base::WeakPtr<RemoteChannelImpl> remote_channel_weak_ptr)
531 : proxy_impl(nullptr), 540 : proxy_impl(nullptr),
532 proxy_impl_weak_factory(nullptr), 541 proxy_impl_weak_factory(nullptr),
533 remote_channel_weak_ptr(remote_channel_weak_ptr) {} 542 remote_channel_weak_ptr(remote_channel_weak_ptr) {}
534 543
535 RemoteChannelImpl::CompositorThreadOnly::~CompositorThreadOnly() {} 544 RemoteChannelImpl::CompositorThreadOnly::~CompositorThreadOnly() {}
536 545
537 } // namespace cc 546 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698