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

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

Issue 1418273002: cc: Move draw params from SetExternalDrawConstraints to OnDraw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/debug/benchmark_instrumentation.h" 10 #include "cc/debug/benchmark_instrumentation.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 DebugScopedSetImplThread impl(task_runner_provider_); 347 DebugScopedSetImplThread impl(task_runner_provider_);
348 348
349 BlockingTaskRunner::CapturePostTasks blocked( 349 BlockingTaskRunner::CapturePostTasks blocked(
350 task_runner_provider_->blocking_main_thread_task_runner()); 350 task_runner_provider_->blocking_main_thread_task_runner());
351 scheduler_on_impl_thread_ = nullptr; 351 scheduler_on_impl_thread_ = nullptr;
352 layer_tree_host_impl_ = nullptr; 352 layer_tree_host_impl_ = nullptr;
353 } 353 }
354 layer_tree_host_ = NULL; 354 layer_tree_host_ = NULL;
355 } 355 }
356 356
357 void SingleThreadProxy::OnResourcelessSoftareDrawStateChanged(
358 bool resourceless_draw) {
359 NOTREACHED();
360 }
361
362 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) { 357 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) {
363 TRACE_EVENT1( 358 TRACE_EVENT1(
364 "cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); 359 "cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw);
365 DCHECK(task_runner_provider_->IsImplThread()); 360 DCHECK(task_runner_provider_->IsImplThread());
366 if (scheduler_on_impl_thread_) 361 if (scheduler_on_impl_thread_)
367 scheduler_on_impl_thread_->SetCanDraw(can_draw); 362 scheduler_on_impl_thread_->SetCanDraw(can_draw);
368 } 363 }
369 364
370 void SingleThreadProxy::NotifyReadyToActivate() { 365 void SingleThreadProxy::NotifyReadyToActivate() {
371 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToActivate"); 366 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToActivate");
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 } 488 }
494 489
495 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { 490 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() {
496 TRACE_EVENT0("cc,benchmark", 491 TRACE_EVENT0("cc,benchmark",
497 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); 492 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread");
498 if (scheduler_on_impl_thread_) 493 if (scheduler_on_impl_thread_)
499 scheduler_on_impl_thread_->DidSwapBuffersComplete(); 494 scheduler_on_impl_thread_->DidSwapBuffersComplete();
500 layer_tree_host_->DidCompleteSwapBuffers(); 495 layer_tree_host_->DidCompleteSwapBuffers();
501 } 496 }
502 497
503 void SingleThreadProxy::OnDrawForOutputSurface() { 498 void SingleThreadProxy::OnDrawForOutputSurface(
499 bool resourceless_software_draw) {
504 NOTREACHED() << "Implemented by ThreadProxy for synchronous compositor."; 500 NOTREACHED() << "Implemented by ThreadProxy for synchronous compositor.";
505 } 501 }
506 502
507 void SingleThreadProxy::PostFrameTimingEventsOnImplThread( 503 void SingleThreadProxy::PostFrameTimingEventsOnImplThread(
508 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, 504 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
509 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { 505 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
510 layer_tree_host_->RecordFrameTimingEvents(std::move(composite_events), 506 layer_tree_host_->RecordFrameTimingEvents(std::move(composite_events),
511 std::move(main_frame_events)); 507 std::move(main_frame_events));
512 } 508 }
513 509
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 << "DidFinishImplFrame called while not inside an impl frame!"; 875 << "DidFinishImplFrame called while not inside an impl frame!";
880 inside_impl_frame_ = false; 876 inside_impl_frame_ = false;
881 #endif 877 #endif
882 } 878 }
883 879
884 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { 880 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
885 layer_tree_host_->SendBeginFramesToChildren(args); 881 layer_tree_host_->SendBeginFramesToChildren(args);
886 } 882 }
887 883
888 } // namespace cc 884 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698