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

Unified Diff: cc/scheduler/frame_rate_controller.h

Issue 221833009: cc: Move scheduling logic out of OutputSurface (Closed) Base URL: http://git.chromium.org/chromium/src.git@swapAck2Sched11
Patch Set: rebase; add comment about race Created 6 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/output_surface_unittest.cc ('k') | cc/scheduler/frame_rate_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/frame_rate_controller.h
diff --git a/cc/scheduler/frame_rate_controller.h b/cc/scheduler/frame_rate_controller.h
deleted file mode 100644
index 2ec62aca72d5d5b4610c3d2c6c63e5933b545fd7..0000000000000000000000000000000000000000
--- a/cc/scheduler/frame_rate_controller.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2011 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.
-
-#ifndef CC_SCHEDULER_FRAME_RATE_CONTROLLER_H_
-#define CC_SCHEDULER_FRAME_RATE_CONTROLLER_H_
-
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "base/time/time.h"
-#include "cc/base/cc_export.h"
-#include "cc/output/begin_frame_args.h"
-#include "cc/scheduler/time_source.h"
-
-namespace base { class SingleThreadTaskRunner; }
-
-namespace cc {
-
-class TimeSource;
-class FrameRateController;
-
-class CC_EXPORT FrameRateControllerClient {
- protected:
- virtual ~FrameRateControllerClient() {}
-
- public:
- virtual void FrameRateControllerTick(const BeginFrameArgs& args) = 0;
-};
-
-// The FrameRateController is used in cases where we self-tick (i.e. BeginFrame
-// is not sent by a parent compositor.
-class CC_EXPORT FrameRateController : TimeSourceClient {
- public:
- explicit FrameRateController(scoped_refptr<TimeSource> timer);
- virtual ~FrameRateController();
-
- void SetClient(FrameRateControllerClient* client) { client_ = client; }
-
- // Returns a valid BeginFrame on activation to potentially be used
- // retroactively.
- BeginFrameArgs SetActive(bool active);
-
- bool IsActive() { return active_; }
-
- void SetTimebaseAndInterval(base::TimeTicks timebase,
- base::TimeDelta interval);
- void SetDeadlineAdjustment(base::TimeDelta delta);
-
- virtual void OnTimerTick() OVERRIDE;
-
- protected:
- // This returns null for unthrottled frame-rate.
- base::TimeTicks NextTickTime();
- // This returns now for unthrottled frame-rate.
- base::TimeTicks LastTickTime();
-
- FrameRateControllerClient* client_;
- base::TimeDelta interval_;
- base::TimeDelta deadline_adjustment_;
- scoped_refptr<TimeSource> time_source_;
- bool active_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FrameRateController);
-};
-
-} // namespace cc
-
-#endif // CC_SCHEDULER_FRAME_RATE_CONTROLLER_H_
« no previous file with comments | « cc/output/output_surface_unittest.cc ('k') | cc/scheduler/frame_rate_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698