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); |
}; |