Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / components / view_manager / surfaces / surfaces_scheduler.h
blobfad331286236bccd83e12719cce6c6c25c70593a
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_VIEW_MANAGER_SURFACES_SURFACES_SCHEDULER_H_
6 #define COMPONENTS_VIEW_MANAGER_SURFACES_SURFACES_SCHEDULER_H_
8 #include <set>
10 #include "cc/scheduler/scheduler.h"
12 namespace cc {
13 class Display;
14 class RenderingStatsInstrumentation;
17 namespace surfaces {
19 // TODO(brianderson): Reconcile with DisplayScheduler crbug.com/476676
20 class SurfacesScheduler : public cc::SchedulerClient {
21 public:
22 SurfacesScheduler();
23 ~SurfacesScheduler() override;
25 void SetNeedsDraw();
27 void OnVSyncParametersUpdated(base::TimeTicks timebase,
28 base::TimeDelta interval);
30 void AddDisplay(cc::Display* display);
31 void RemoveDisplay(cc::Display* display);
33 private:
34 void WillBeginImplFrame(const cc::BeginFrameArgs& args) override;
35 void DidFinishImplFrame() override;
36 void ScheduledActionSendBeginMainFrame() override;
37 cc::DrawResult ScheduledActionDrawAndSwapIfPossible() override;
38 cc::DrawResult ScheduledActionDrawAndSwapForced() override;
39 void ScheduledActionAnimate() override;
40 void ScheduledActionCommit() override;
41 void ScheduledActionActivateSyncTree() override;
42 void ScheduledActionBeginOutputSurfaceCreation() override;
43 void ScheduledActionPrepareTiles() override;
44 void ScheduledActionInvalidateOutputSurface() override;
45 void SendBeginFramesToChildren(const cc::BeginFrameArgs& args) override;
46 void SendBeginMainFrameNotExpectedSoon() override;
48 std::set<cc::Display*> displays_;
49 scoped_ptr<cc::Scheduler> scheduler_;
50 scoped_ptr<cc::RenderingStatsInstrumentation>
51 rendering_stats_instrumentation_;
53 DISALLOW_COPY_AND_ASSIGN(SurfacesScheduler);
56 } // namespace surfaces
58 #endif // COMPONENTS_VIEW_MANAGER_SURFACES_SURFACES_SCHEDULER_H_