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

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: EXPECT_SCOPED 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 DebugScopedSetImplThread impl(task_runner_provider_); 345 DebugScopedSetImplThread impl(task_runner_provider_);
346 346
347 BlockingTaskRunner::CapturePostTasks blocked( 347 BlockingTaskRunner::CapturePostTasks blocked(
348 task_runner_provider_->blocking_main_thread_task_runner()); 348 task_runner_provider_->blocking_main_thread_task_runner());
349 scheduler_on_impl_thread_ = nullptr; 349 scheduler_on_impl_thread_ = nullptr;
350 layer_tree_host_impl_ = nullptr; 350 layer_tree_host_impl_ = nullptr;
351 } 351 }
352 layer_tree_host_ = NULL; 352 layer_tree_host_ = NULL;
353 } 353 }
354 354
355 void SingleThreadProxy::OnResourcelessSoftareDrawStateChanged(
356 bool resourceless_draw) {
357 NOTREACHED();
358 }
359
360 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) { 355 void SingleThreadProxy::OnCanDrawStateChanged(bool can_draw) {
361 TRACE_EVENT1( 356 TRACE_EVENT1(
362 "cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); 357 "cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw);
363 DCHECK(task_runner_provider_->IsImplThread()); 358 DCHECK(task_runner_provider_->IsImplThread());
364 if (scheduler_on_impl_thread_) 359 if (scheduler_on_impl_thread_)
365 scheduler_on_impl_thread_->SetCanDraw(can_draw); 360 scheduler_on_impl_thread_->SetCanDraw(can_draw);
366 } 361 }
367 362
368 void SingleThreadProxy::NotifyReadyToActivate() { 363 void SingleThreadProxy::NotifyReadyToActivate() {
369 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToActivate"); 364 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToActivate");
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 } 486 }
492 487
493 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { 488 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() {
494 TRACE_EVENT0("cc,benchmark", 489 TRACE_EVENT0("cc,benchmark",
495 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); 490 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread");
496 if (scheduler_on_impl_thread_) 491 if (scheduler_on_impl_thread_)
497 scheduler_on_impl_thread_->DidSwapBuffersComplete(); 492 scheduler_on_impl_thread_->DidSwapBuffersComplete();
498 layer_tree_host_->DidCompleteSwapBuffers(); 493 layer_tree_host_->DidCompleteSwapBuffers();
499 } 494 }
500 495
501 void SingleThreadProxy::OnDrawForOutputSurface() { 496 void SingleThreadProxy::OnDrawForOutputSurface(
497 bool resourceless_software_draw) {
502 NOTREACHED() << "Implemented by ThreadProxy for synchronous compositor."; 498 NOTREACHED() << "Implemented by ThreadProxy for synchronous compositor.";
503 } 499 }
504 500
505 void SingleThreadProxy::PostFrameTimingEventsOnImplThread( 501 void SingleThreadProxy::PostFrameTimingEventsOnImplThread(
506 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, 502 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
507 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { 503 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) {
508 layer_tree_host_->RecordFrameTimingEvents(std::move(composite_events), 504 layer_tree_host_->RecordFrameTimingEvents(std::move(composite_events),
509 std::move(main_frame_events)); 505 std::move(main_frame_events));
510 } 506 }
511 507
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 << "DidFinishImplFrame called while not inside an impl frame!"; 873 << "DidFinishImplFrame called while not inside an impl frame!";
878 inside_impl_frame_ = false; 874 inside_impl_frame_ = false;
879 #endif 875 #endif
880 } 876 }
881 877
882 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { 878 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) {
883 layer_tree_host_->SendBeginFramesToChildren(args); 879 layer_tree_host_->SendBeginFramesToChildren(args);
884 } 880 }
885 881
886 } // namespace cc 882 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | content/renderer/android/synchronous_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698