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

Unified Diff: cc/scheduler/begin_frame_source.h

Issue 2323123002: Make disable vsync run the renderer independently (Closed)
Patch Set: Rebase Created 4 years, 3 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 | « no previous file | cc/scheduler/begin_frame_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/begin_frame_source.h
diff --git a/cc/scheduler/begin_frame_source.h b/cc/scheduler/begin_frame_source.h
index 4a0668cd9fb4534deea2cb214e39c917ea70ee12..bde01afd79ec6bd72a1d525c85b9d6d49bafe9d0 100644
--- a/cc/scheduler/begin_frame_source.h
+++ b/cc/scheduler/begin_frame_source.h
@@ -112,15 +112,20 @@ class CC_EXPORT BeginFrameSource {
// should shut down its timers, disable vsync, etc.
virtual void AddObserver(BeginFrameObserver* obs) = 0;
virtual void RemoveObserver(BeginFrameObserver* obs) = 0;
+
+ // Returns false if the begin frame source will just continue to produce
+ // begin frames without waiting.
+ virtual bool IsThrottled() const = 0;
};
// A BeginFrameSource that does nothing.
-class StubBeginFrameSource : public BeginFrameSource {
+class CC_EXPORT StubBeginFrameSource : public BeginFrameSource {
public:
void DidFinishFrame(BeginFrameObserver* obs,
size_t remaining_frames) override {}
void AddObserver(BeginFrameObserver* obs) override {}
void RemoveObserver(BeginFrameObserver* obs) override {}
+ bool IsThrottled() const override;
};
// A frame source which ticks itself independently.
@@ -148,6 +153,7 @@ class CC_EXPORT BackToBackBeginFrameSource : public SyntheticBeginFrameSource,
void RemoveObserver(BeginFrameObserver* obs) override;
void DidFinishFrame(BeginFrameObserver* obs,
size_t remaining_frames) override;
+ bool IsThrottled() const override;
// SyntheticBeginFrameSource implementation.
void OnUpdateVSyncParameters(base::TimeTicks timebase,
@@ -180,6 +186,7 @@ class CC_EXPORT DelayBasedBeginFrameSource : public SyntheticBeginFrameSource,
void RemoveObserver(BeginFrameObserver* obs) override;
void DidFinishFrame(BeginFrameObserver* obs,
size_t remaining_frames) override {}
+ bool IsThrottled() const override;
// SyntheticBeginFrameSource implementation.
void OnUpdateVSyncParameters(base::TimeTicks timebase,
@@ -222,6 +229,7 @@ class CC_EXPORT ExternalBeginFrameSource : public BeginFrameSource {
void RemoveObserver(BeginFrameObserver* obs) override;
void DidFinishFrame(BeginFrameObserver* obs,
size_t remaining_frames) override {}
+ bool IsThrottled() const override;
void OnSetBeginFrameSourcePaused(bool paused);
void OnBeginFrame(const BeginFrameArgs& args);
« no previous file with comments | « no previous file | cc/scheduler/begin_frame_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698