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

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: 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
Index: cc/scheduler/frame_rate_controller.h
diff --git a/cc/scheduler/frame_rate_controller.h b/cc/scheduler/frame_rate_controller.h
index 70964e25f9834410a49e45033f384076e65d911f..5d1199e2a448de012d1fa7929df0d01cd843aa54 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 cc {
@@ -23,7 +24,7 @@ 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, BeginFrameArgs args) = 0;
};
class FrameRateControllerTimeSourceAdapter;
@@ -32,10 +33,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(Thread* thread);
@@ -67,6 +64,7 @@ class CC_EXPORT FrameRateController {
void SetTimebaseAndInterval(base::TimeTicks timebase,
base::TimeDelta interval);
+ void SetDeadlineAdjustment(base::TimeDelta delta);
protected:
friend class FrameRateControllerTimeSourceAdapter;
@@ -78,6 +76,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_;

Powered by Google App Engine
This is Rietveld 408576698