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

Unified Diff: trunk/src/cc/scheduler/frame_rate_controller.h

Issue 17204002: Revert 206020 "cc: Emulate BeginFrame in OutputSurfaces that don..." (Closed) Base URL: svn://svn.chromium.org/chrome/
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
« no previous file with comments | « trunk/src/cc/output/output_surface_unittest.cc ('k') | trunk/src/cc/scheduler/frame_rate_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/scheduler/frame_rate_controller.h
===================================================================
--- trunk/src/cc/scheduler/frame_rate_controller.h (revision 206654)
+++ trunk/src/cc/scheduler/frame_rate_controller.h (working copy)
@@ -15,21 +15,18 @@
class Thread;
class TimeSource;
-class FrameRateController;
class CC_EXPORT FrameRateControllerClient {
- protected:
- virtual ~FrameRateControllerClient() {}
-
public:
// Throttled is true when we have a maximum number of frames pending.
- virtual void FrameRateControllerTick(bool throttled) = 0;
+ virtual void BeginFrame(bool throttled) = 0;
+
+ protected:
+ virtual ~FrameRateControllerClient() {}
};
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 {
@@ -44,7 +41,6 @@
void SetClient(FrameRateControllerClient* client) { client_ = client; }
void SetActive(bool active);
- bool IsActive() { return active_; }
// Use the following methods to adjust target frame rate.
//
@@ -55,9 +51,9 @@
void DidSwapBuffers();
void DidSwapBuffersComplete();
void DidAbortAllPendingFrames();
- void SetMaxSwapsPending(int max_swaps_pending); // 0 for unlimited.
- int MaxSwapsPending() const { return max_swaps_pending_; }
- int NumSwapsPendingForTesting() const { return num_frames_pending_; }
+ void SetMaxFramesPending(int max_frames_pending); // 0 for unlimited.
+ int MaxFramesPending() const { return max_frames_pending_; }
+ int NumFramesPendingForTesting() const { return num_frames_pending_; }
// This returns null for unthrottled frame-rate.
base::TimeTicks NextTickTime();
@@ -77,7 +73,7 @@
FrameRateControllerClient* client_;
int num_frames_pending_;
- int max_swaps_pending_;
+ int max_frames_pending_;
scoped_refptr<TimeSource> time_source_;
scoped_ptr<FrameRateControllerTimeSourceAdapter> time_source_client_adapter_;
bool active_;
@@ -87,7 +83,6 @@
base::WeakPtrFactory<FrameRateController> weak_factory_;
Thread* thread_;
- private:
DISALLOW_COPY_AND_ASSIGN(FrameRateController);
};
« no previous file with comments | « trunk/src/cc/output/output_surface_unittest.cc ('k') | trunk/src/cc/scheduler/frame_rate_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698