Index: components/view_manager/surfaces/surfaces_scheduler.cc |
diff --git a/components/view_manager/surfaces/surfaces_scheduler.cc b/components/view_manager/surfaces/surfaces_scheduler.cc |
deleted file mode 100644 |
index fcffc63a1f8bdc25519e71d109b6f4385545e190..0000000000000000000000000000000000000000 |
--- a/components/view_manager/surfaces/surfaces_scheduler.cc |
+++ /dev/null |
@@ -1,110 +0,0 @@ |
-// Copyright 2014 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#include "components/view_manager/surfaces/surfaces_scheduler.h" |
- |
-#include "cc/debug/rendering_stats_instrumentation.h" |
-#include "cc/scheduler/compositor_timing_history.h" |
-#include "cc/surfaces/display.h" |
- |
-namespace surfaces { |
- |
-SurfacesScheduler::SurfacesScheduler() |
- : rendering_stats_instrumentation_( |
- cc::RenderingStatsInstrumentation::Create()) { |
- cc::SchedulerSettings settings; |
- scoped_ptr<cc::CompositorTimingHistory> compositor_timing_history( |
- new cc::CompositorTimingHistory(cc::CompositorTimingHistory::NULL_UMA, |
- rendering_stats_instrumentation_.get())); |
- scheduler_ = cc::Scheduler::Create( |
- this, settings, 0, base::MessageLoop::current()->task_runner().get(), |
- nullptr, compositor_timing_history.Pass()); |
- scheduler_->SetCanStart(); |
- scheduler_->SetVisible(true); |
- scheduler_->SetCanDraw(true); |
- scheduler_->SetNeedsBeginMainFrame(); |
-} |
- |
-SurfacesScheduler::~SurfacesScheduler() { |
-} |
- |
-void SurfacesScheduler::SetNeedsDraw() { |
- // Don't tell the scheduler we need to draw if we have no active displays |
- // which can happen if we haven't initialized displays yet or if all active |
- // displays have lost their context. |
- if (!displays_.empty()) |
- scheduler_->SetNeedsRedraw(); |
-} |
- |
-void SurfacesScheduler::OnVSyncParametersUpdated(base::TimeTicks timebase, |
- base::TimeDelta interval) { |
- scheduler_->CommitVSyncParameters(timebase, interval); |
-} |
- |
-void SurfacesScheduler::AddDisplay(cc::Display* display) { |
- DCHECK(displays_.find(display) == displays_.end()); |
- displays_.insert(display); |
- |
- // A draw might be necessary (e.g., this display might be getting added on |
- // resumption from the app being in the background as happens on android). |
- SetNeedsDraw(); |
-} |
- |
-void SurfacesScheduler::RemoveDisplay(cc::Display* display) { |
- auto it = displays_.find(display); |
- DCHECK(it != displays_.end()); |
- displays_.erase(it); |
-} |
- |
-void SurfacesScheduler::WillBeginImplFrame(const cc::BeginFrameArgs& args) { |
-} |
- |
-void SurfacesScheduler::DidFinishImplFrame() { |
-} |
- |
-void SurfacesScheduler::ScheduledActionSendBeginMainFrame() { |
- scheduler_->NotifyBeginMainFrameStarted(); |
- scheduler_->NotifyReadyToCommit(); |
-} |
- |
-cc::DrawResult SurfacesScheduler::ScheduledActionDrawAndSwapIfPossible() { |
- for (const auto& it : displays_) { |
- it->DrawAndSwap(); |
- } |
- return cc::DRAW_SUCCESS; |
-} |
- |
-cc::DrawResult SurfacesScheduler::ScheduledActionDrawAndSwapForced() { |
- NOTREACHED() << "ScheduledActionDrawAndSwapIfPossible always succeeds."; |
- return cc::DRAW_SUCCESS; |
-} |
- |
-void SurfacesScheduler::ScheduledActionAnimate() { |
-} |
- |
-void SurfacesScheduler::ScheduledActionCommit() { |
- scheduler_->NotifyReadyToActivate(); |
-} |
- |
-void SurfacesScheduler::ScheduledActionActivateSyncTree() { |
-} |
- |
-void SurfacesScheduler::ScheduledActionBeginOutputSurfaceCreation() { |
- scheduler_->DidCreateAndInitializeOutputSurface(); |
-} |
- |
-void SurfacesScheduler::ScheduledActionPrepareTiles() { |
-} |
- |
-void SurfacesScheduler::ScheduledActionInvalidateOutputSurface() { |
-} |
- |
-void SurfacesScheduler::SendBeginFramesToChildren( |
- const cc::BeginFrameArgs& args) { |
-} |
- |
-void SurfacesScheduler::SendBeginMainFrameNotExpectedSoon() { |
-} |
- |
-} // namespace mojo |