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

Unified Diff: cc/scheduler/frame_rate_controller.h

Issue 16863005: cc: Add BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@nofrc12
Patch Set: Rebase Created 7 years, 6 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
index bf6674460175da870121e53351b6f1715cfafc84..32e757bfc961502f25904c63aee02b8704bd9478 100644
--- a/cc/scheduler/frame_rate_controller.h
+++ b/cc/scheduler/frame_rate_controller.h
@@ -10,6 +10,7 @@
#include "base/memory/weak_ptr.h"
#include "base/time.h"
#include "cc/base/cc_export.h"
+#include "cc/output/begin_frame_args.h"
namespace base { class SingleThreadTaskRunner; }
@@ -24,7 +25,8 @@ class CC_EXPORT FrameRateControllerClient {
public:
// Throttled is true when we have a maximum number of frames pending.
- virtual void FrameRateControllerTick(bool throttled) = 0;
+ virtual void FrameRateControllerTick(bool throttled,
+ const BeginFrameArgs& args) = 0;
};
class FrameRateControllerTimeSourceAdapter;
@@ -33,10 +35,6 @@ class FrameRateControllerTimeSourceAdapter;
// is not sent by a parent compositor.
class CC_EXPORT FrameRateController {
public:
- enum {
- DEFAULT_MAX_FRAMES_PENDING = 2
- };
-
explicit FrameRateController(scoped_refptr<TimeSource> timer);
// Alternate form of FrameRateController with unthrottled frame-rate.
explicit FrameRateController(base::SingleThreadTaskRunner* task_runner);
@@ -68,6 +66,7 @@ class CC_EXPORT FrameRateController {
void SetTimebaseAndInterval(base::TimeTicks timebase,
base::TimeDelta interval);
+ void SetDeadlineAdjustment(base::TimeDelta delta);
protected:
friend class FrameRateControllerTimeSourceAdapter;
@@ -79,6 +78,8 @@ class CC_EXPORT FrameRateController {
FrameRateControllerClient* client_;
int num_frames_pending_;
int max_swaps_pending_;
+ base::TimeDelta interval_;
+ base::TimeDelta deadline_adjustment_;
scoped_refptr<TimeSource> time_source_;
scoped_ptr<FrameRateControllerTimeSourceAdapter> time_source_client_adapter_;
bool active_;
« 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