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

Unified Diff: cc/scheduler/begin_frame_source.h

Issue 1765723002: Hoist begin frame sources out of scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scheduler_remove_throttle_flag
Patch Set: Rebase Created 4 years, 9 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 085088458cb6a3ea7ad2b1af2bee4f547bf96b5c..6815d4285ff7e1cb62303404143e43b793305c17 100644
--- a/cc/scheduler/begin_frame_source.h
+++ b/cc/scheduler/begin_frame_source.h
@@ -249,57 +249,6 @@ class CC_EXPORT SyntheticBeginFrameSource : public BeginFrameSourceBase,
DISALLOW_COPY_AND_ASSIGN(SyntheticBeginFrameSource);
};
-// A "virtual" frame source which lets you switch between multiple other frame
-// sources while making sure the BeginFrameArgs stays increasing (possibly
-// enforcing minimum boundry between BeginFrameArgs messages).
-class CC_EXPORT BeginFrameSourceMultiplexer : public BeginFrameSourceBase,
- public BeginFrameObserver {
- public:
- static scoped_ptr<BeginFrameSourceMultiplexer> Create();
- ~BeginFrameSourceMultiplexer() override;
-
- void SetMinimumInterval(base::TimeDelta new_minimum_interval);
-
- void AddSource(BeginFrameSource* new_source);
- void RemoveSource(BeginFrameSource* existing_source);
- void SetActiveSource(BeginFrameSource* new_source);
- const BeginFrameSource* ActiveSource();
-
- // BeginFrameObserver
- // The mux is an BeginFrameObserver as it needs to proxy the OnBeginFrame
- // calls to preserve the monotonicity of the BeginFrameArgs when switching
- // sources.
- void OnBeginFrame(const BeginFrameArgs& args) override;
- const BeginFrameArgs& LastUsedBeginFrameArgs() const override;
- void OnBeginFrameSourcePausedChanged(bool paused) override;
-
- // BeginFrameSourceBase
- void DidFinishFrame(size_t remaining_frames) override;
- void AddObserver(BeginFrameObserver* obs) override;
- void OnNeedsBeginFramesChanged(bool needs_begin_frames) override;
-
- // Tracing
- void AsValueInto(base::trace_event::TracedValue* dict) const override;
-
- protected:
- BeginFrameSourceMultiplexer();
- explicit BeginFrameSourceMultiplexer(base::TimeDelta minimum_interval);
-
- bool HasSource(BeginFrameSource* source);
- bool IsIncreasing(const BeginFrameArgs& args);
-
- base::TimeDelta minimum_interval_;
-
- BeginFrameSource* active_source_;
- std::set<BeginFrameSource*> source_list_;
-
- BeginFrameArgs last_begin_frame_args_;
- bool inside_add_observer_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BeginFrameSourceMultiplexer);
-};
-
} // namespace cc
#endif // CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_
« 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