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

Unified Diff: cc/scheduler/frame_rate_controller.h

Issue 15836005: cc: Emulate BeginFrame in OutputSurfaces that don't support it natively (Closed) Base URL: http://git.chromium.org/chromium/src.git@nofrc
Patch Set: Created 7 years, 7 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 9210a670d9992523c055a35e16310fcddbc6318b..5f8f5c8e81158cafa87ec85f76549cfbd9c81019 100644
--- a/cc/scheduler/frame_rate_controller.h
+++ b/cc/scheduler/frame_rate_controller.h
@@ -15,18 +15,21 @@ namespace cc {
class Thread;
class TimeSource;
+class FrameRateController;
class CC_EXPORT FrameRateControllerClient {
- public:
- // Throttled is true when we have a maximum number of frames pending.
- virtual void BeginFrame(bool throttled) = 0;
-
protected:
virtual ~FrameRateControllerClient() {}
+
+ public:
+ // Throttled is true when we have a maximum number of frames pending.
+ virtual void FrameRateControllerTick(bool throttled) = 0;
};
class FrameRateControllerTimeSourceAdapter;
+// The FrameRateController is used in cases where we self-tick (i.e. BeginFrame
+// is not sent by a parent compositor.
class CC_EXPORT FrameRateController {
public:
enum {
@@ -48,7 +51,7 @@ class CC_EXPORT FrameRateController {
// DidFinishFrame should be posted.
//
// If the rendering pipeline crashes, call DidAbortAllPendingFrames.
- void DidSwapBuffers();
+ void WillSwapBuffers();
void DidSwapBuffersComplete();
void DidAbortAllPendingFrames();
void SetMaxFramesPending(int max_frames_pending); // 0 for unlimited.

Powered by Google App Engine
This is Rietveld 408576698