| Index: cc/output/output_surface.h
|
| diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
|
| index 2645d84bf95b630540ed176d96d539cef5cc58a8..c82a08711b5abf23833fbea3f042664fe88e6909 100644
|
| --- a/cc/output/output_surface.h
|
| +++ b/cc/output/output_surface.h
|
| @@ -13,10 +13,10 @@
|
| #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/overlay_candidate_validator.h"
|
| #include "cc/output/software_output_device.h"
|
| -#include "cc/scheduler/frame_rate_controller.h"
|
|
|
| namespace base { class SingleThreadTaskRunner; }
|
|
|
| @@ -42,7 +42,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
|
| @@ -108,9 +108,6 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient {
|
| // Enable or disable vsync.
|
| void SetThrottleFrameProduction(bool enable);
|
|
|
| - void InitializeBeginFrameEmulation(base::SingleThreadTaskRunner* task_runner,
|
| - base::TimeDelta interval);
|
| -
|
| virtual void EnsureBackbuffer();
|
| virtual void DiscardBackbuffer();
|
|
|
| @@ -131,7 +128,7 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient {
|
| // Requests a BeginFrame notification from the output surface. The
|
| // notification will be delivered by calling
|
| // OutputSurfaceClient::BeginFrame until the callback is disabled.
|
| - virtual void SetNeedsBeginFrame(bool enable);
|
| + virtual void SetNeedsBeginFrame(bool enable) {}
|
|
|
| bool HasClient() { return !!client_; }
|
|
|
| @@ -145,6 +142,8 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient {
|
| }
|
|
|
| protected:
|
| + OutputSurfaceClient* client_;
|
| +
|
| // Synchronously initialize context3d and enter hardware mode.
|
| // This can only supported in threaded compositing mode.
|
| bool InitializeAndSetContext3d(
|
| @@ -159,29 +158,11 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient {
|
| scoped_ptr<OverlayCandidateValidator> overlay_candidate_validator_;
|
| gfx::Size surface_size_;
|
| float device_scale_factor_;
|
| - base::TimeDelta begin_frame_interval_;
|
|
|
| - // The FrameRateController is deprecated.
|
| - // Platforms should move to native BeginFrames instead.
|
| void CommitVSyncParameters(base::TimeTicks timebase,
|
| base::TimeDelta interval);
|
| - virtual void FrameRateControllerTick(const BeginFrameArgs& args) OVERRIDE;
|
| - scoped_ptr<FrameRateController> frame_rate_controller_;
|
| -
|
| - bool throttle_frame_production_;
|
| - bool needs_begin_frame_;
|
| - bool client_ready_for_begin_frame_;
|
| -
|
| - // This stores a BeginFrame that we couldn't process immediately,
|
| - // but might process retroactively in the near future.
|
| - BeginFrameArgs skipped_begin_frame_args_;
|
|
|
| - // Forwarded to OutputSurfaceClient but threaded through OutputSurface
|
| - // first so OutputSurface has a chance to update the FrameRateController
|
| void SetNeedsRedrawRect(const gfx::Rect& damage_rect);
|
| - void BeginFrame(const BeginFrameArgs& args);
|
| - void DidSwapBuffers();
|
| - void OnSwapBuffersComplete();
|
| void ReclaimResources(const CompositorFrameAck* ack);
|
| void DidLoseOutputSurface();
|
| void SetExternalStencilTest(bool enabled);
|
| @@ -190,22 +171,13 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient {
|
| const gfx::Rect& clip,
|
| bool valid_for_tile_management);
|
|
|
| - // virtual for testing.
|
| - virtual base::TimeTicks RetroactiveBeginFrameDeadline();
|
| - virtual void PostCheckForRetroactiveBeginFrame();
|
| - void CheckForRetroactiveBeginFrame();
|
| -
|
| private:
|
| - OutputSurfaceClient* client_;
|
| -
|
| void SetUpContext3d();
|
| void ResetContext3d();
|
| void SetMemoryPolicy(const ManagedMemoryPolicy& policy);
|
| void UpdateAndMeasureGpuLatency();
|
|
|
| - // check_for_retroactive_begin_frame_pending_ is used to avoid posting
|
| - // redundant checks for a retroactive BeginFrame.
|
| - bool check_for_retroactive_begin_frame_pending_;
|
| + void OnSwapBuffersComplete();
|
|
|
| bool external_stencil_test_enabled_;
|
|
|
|
|