OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/mus/surfaces/surfaces_scheduler.h" | 5 #include "components/mus/surfaces/surfaces_scheduler.h" |
6 | 6 |
7 #include "cc/debug/rendering_stats_instrumentation.h" | 7 #include "cc/debug/rendering_stats_instrumentation.h" |
8 #include "cc/scheduler/compositor_timing_history.h" | 8 #include "cc/scheduler/compositor_timing_history.h" |
9 #include "cc/surfaces/display.h" | 9 #include "cc/surfaces/display.h" |
10 | 10 |
11 namespace mus { | 11 namespace mus { |
12 | 12 |
13 SurfacesScheduler::SurfacesScheduler() | 13 SurfacesScheduler::SurfacesScheduler() |
14 : rendering_stats_instrumentation_( | 14 : rendering_stats_instrumentation_( |
15 cc::RenderingStatsInstrumentation::Create()) { | 15 cc::RenderingStatsInstrumentation::Create()) { |
16 cc::SchedulerSettings settings; | 16 cc::SchedulerSettings settings; |
17 scoped_ptr<cc::CompositorTimingHistory> compositor_timing_history( | 17 scoped_ptr<cc::CompositorTimingHistory> compositor_timing_history( |
18 new cc::CompositorTimingHistory(cc::CompositorTimingHistory::NULL_UMA, | 18 new cc::CompositorTimingHistory(cc::CompositorTimingHistory::NULL_UMA, |
19 rendering_stats_instrumentation_.get())); | 19 rendering_stats_instrumentation_.get())); |
20 scheduler_ = cc::Scheduler::Create( | 20 scheduler_ = cc::Scheduler::Create( |
21 this, settings, 0, base::MessageLoop::current()->task_runner().get(), | 21 this, settings, 0, base::MessageLoop::current()->task_runner().get(), |
22 nullptr, compositor_timing_history.Pass()); | 22 nullptr, compositor_timing_history.Pass()); |
23 scheduler_->SetCanStart(); | |
24 scheduler_->SetVisible(true); | 23 scheduler_->SetVisible(true); |
25 scheduler_->SetCanDraw(true); | 24 scheduler_->SetCanDraw(true); |
26 scheduler_->SetNeedsBeginMainFrame(); | 25 scheduler_->SetNeedsBeginMainFrame(); |
27 } | 26 } |
28 | 27 |
29 SurfacesScheduler::~SurfacesScheduler() {} | 28 SurfacesScheduler::~SurfacesScheduler() {} |
30 | 29 |
31 void SurfacesScheduler::SetNeedsDraw() { | 30 void SurfacesScheduler::SetNeedsDraw() { |
32 // Don't tell the scheduler we need to draw if we have no active displays | 31 // Don't tell the scheduler we need to draw if we have no active displays |
33 // which can happen if we haven't initialized displays yet or if all active | 32 // which can happen if we haven't initialized displays yet or if all active |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 void SurfacesScheduler::ScheduledActionPrepareTiles() {} | 91 void SurfacesScheduler::ScheduledActionPrepareTiles() {} |
93 | 92 |
94 void SurfacesScheduler::ScheduledActionInvalidateOutputSurface() {} | 93 void SurfacesScheduler::ScheduledActionInvalidateOutputSurface() {} |
95 | 94 |
96 void SurfacesScheduler::SendBeginFramesToChildren( | 95 void SurfacesScheduler::SendBeginFramesToChildren( |
97 const cc::BeginFrameArgs& args) {} | 96 const cc::BeginFrameArgs& args) {} |
98 | 97 |
99 void SurfacesScheduler::SendBeginMainFrameNotExpectedSoon() {} | 98 void SurfacesScheduler::SendBeginMainFrameNotExpectedSoon() {} |
100 | 99 |
101 } // namespace mus | 100 } // namespace mus |
OLD | NEW |