Index: cc/output/output_surface.h |
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h |
index b751f06c9416b1ccfec2e2cb26ad723d6925fa4d..d150e22cabf384ab627f2a0fafaeea20864d51f0 100644 |
--- a/cc/output/output_surface.h |
+++ b/cc/output/output_surface.h |
@@ -13,9 +13,9 @@ |
#include "base/memory/weak_ptr.h" |
#include "cc/base/cc_export.h" |
#include "cc/base/rolling_time_delta_history.h" |
+#include "cc/output/begin_frame_args.h" |
#include "cc/output/context_provider.h" |
#include "cc/output/software_output_device.h" |
-#include "cc/scheduler/frame_rate_controller.h" |
namespace base { class SingleThreadTaskRunner; } |
@@ -41,7 +41,7 @@ class OutputSurfaceClient; |
// From here on, it will only be used on the compositor thread. |
// 3. If the 3D context is lost, then the compositor will delete the output |
// surface (on the compositor thread) and go back to step 1. |
-class CC_EXPORT OutputSurface : public FrameRateControllerClient { |
+class CC_EXPORT OutputSurface { |
public: |
enum { |
DEFAULT_MAX_FRAMES_PENDING = 2 |
@@ -104,12 +104,8 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient { |
// thread. |
virtual bool BindToClient(OutputSurfaceClient* client); |
- void InitializeBeginImplFrameEmulation( |
- base::SingleThreadTaskRunner* task_runner, |
- bool throttle_frame_production, |
- base::TimeDelta interval); |
- |
- void SetMaxFramesPending(int max_frames_pending); |
+ // Enable or disable vsync. |
+ void SetThrottleFrameProduction(bool enable); |
virtual void EnsureBackbuffer(); |
virtual void DiscardBackbuffer(); |
@@ -156,16 +152,11 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient { |
scoped_ptr<SoftwareOutputDevice> software_device_; |
gfx::Size surface_size_; |
float device_scale_factor_; |
+ base::TimeDelta begin_impl_frame_interval_; |
- // The FrameRateController is deprecated. |
- // Platforms should move to native BeginImplFrames instead. |
void CommitVSyncParameters(base::TimeTicks timebase, |
base::TimeDelta interval); |
- virtual void FrameRateControllerTick(bool throttled, |
- const BeginFrameArgs& args) OVERRIDE; |
- scoped_ptr<FrameRateController> frame_rate_controller_; |
- int max_frames_pending_; |
- int pending_swap_buffers_; |
+ bool throttle_frame_production_; |
bool needs_begin_impl_frame_; |
bool client_ready_for_begin_impl_frame_; |
@@ -174,7 +165,7 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient { |
BeginFrameArgs skipped_begin_impl_frame_args_; |
// Forwarded to OutputSurfaceClient but threaded through OutputSurface |
- // first so OutputSurface has a chance to update the FrameRateController |
+ // first so OutputSurface has a chance to update the BeginFrameSource |
void SetNeedsRedrawRect(const gfx::Rect& damage_rect); |
void BeginImplFrame(const BeginFrameArgs& args); |
void DidSwapBuffers(); |
@@ -200,6 +191,8 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient { |
void SetMemoryPolicy(const ManagedMemoryPolicy& policy); |
void UpdateAndMeasureGpuLatency(); |
+ bool is_lost_; |
+ |
// check_for_retroactive_begin_impl_frame_pending_ is used to avoid posting |
// redundant checks for a retroactive BeginImplFrame. |
bool check_for_retroactive_begin_impl_frame_pending_; |