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

Unified Diff: cc/output/output_surface.h

Issue 199523002: cc: Throttle swaps in Scheduler instead of OutputSurface (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase; DidSwapBuffersComplete Created 6 years, 8 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/output/output_surface.h
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index a5d4d7bc77b47badb8fa4551993cd439350543a3..8904ac19bea56373561178480347da7587c9ef16 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -105,12 +105,12 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient {
// thread.
virtual bool BindToClient(OutputSurfaceClient* client);
+ // Enable or disable vsync.
+ void SetThrottleFrameProduction(bool enable);
+
void InitializeBeginFrameEmulation(base::SingleThreadTaskRunner* task_runner,
- bool throttle_frame_production,
base::TimeDelta interval);
- void SetMaxFramesPending(int max_frames_pending);
-
virtual void EnsureBackbuffer();
virtual void DiscardBackbuffer();
@@ -162,16 +162,16 @@ 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(bool throttled,
- const BeginFrameArgs& args) OVERRIDE;
+ virtual void FrameRateControllerTick(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_frame_;
bool client_ready_for_begin_frame_;
@@ -206,6 +206,8 @@ class CC_EXPORT OutputSurface : public FrameRateControllerClient {
void SetMemoryPolicy(const ManagedMemoryPolicy& policy);
void UpdateAndMeasureGpuLatency();
+ bool is_lost_;
+
// check_for_retroactive_begin_frame_pending_ is used to avoid posting
// redundant checks for a retroactive BeginFrame.
bool check_for_retroactive_begin_frame_pending_;

Powered by Google App Engine
This is Rietveld 408576698