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

Unified Diff: cc/scheduler/begin_frame_source.h

Issue 1887243002: cc: Remove retro frames from scheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | cc/scheduler/begin_frame_source.cc » ('j') | cc/scheduler/begin_frame_source.cc » ('J')
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 cc238deb616928183134b0f9f2bc2f16f872c880..f33d98d83512dcbf2d7b4d12788d961dc9cc66f5 100644
--- a/cc/scheduler/begin_frame_source.h
+++ b/cc/scheduler/begin_frame_source.h
@@ -66,42 +66,6 @@ class CC_EXPORT BeginFrameObserver {
virtual void AsValueInto(base::trace_event::TracedValue* dict) const = 0;
};
-// Simple base class which implements a BeginFrameObserver which checks the
-// incoming values meet the BeginFrameObserver requirements and implements the
-// required LastUsedBeginFrameArgs behaviour.
-//
-// Users of this class should;
-// - Implement the OnBeginFrameDerivedImpl function.
-// - Recommended (but not required) to call
-// BeginFrameObserverBase::OnValueInto in their overridden OnValueInto
-// function.
-class CC_EXPORT BeginFrameObserverBase : public BeginFrameObserver {
enne (OOO) 2016/04/14 23:02:26 Hmm, this was useful because it implemented some f
- public:
- BeginFrameObserverBase();
-
- // BeginFrameObserver
-
- // Traces |args| and DCHECK |args| satisfies pre-conditions then calls
- // OnBeginFrameDerivedImpl and updates the last_begin_frame_args_ value on
- // true.
- void OnBeginFrame(const BeginFrameArgs& args) override;
- const BeginFrameArgs& LastUsedBeginFrameArgs() const override;
-
- // Outputs last_begin_frame_args_
- void AsValueInto(base::trace_event::TracedValue* dict) const override;
-
- protected:
- // Subclasses should override this method!
- // Return true if the given argument is (or will be) used.
- virtual bool OnBeginFrameDerivedImpl(const BeginFrameArgs& args) = 0;
-
- BeginFrameArgs last_begin_frame_args_;
- int64_t dropped_begin_frame_args_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BeginFrameObserverBase);
-};
-
// Interface for a class which produces BeginFrame calls to a
// BeginFrameObserver.
//
@@ -119,7 +83,7 @@ class CC_EXPORT BeginFrameSource {
// processing (rather than toggling SetNeedsBeginFrames every frame). It is
// used by systems like the BackToBackFrameSource to make sure only one frame
// is pending at a time.
- virtual void DidFinishFrame(size_t remaining_frames) = 0;
+ virtual void DidFinishFrame(BeginFrameObserver* obs) = 0;
// Add/Remove an observer from the source. When no observers are added the BFS
// should shut down its timers, disable vsync, etc.
@@ -143,7 +107,7 @@ class CC_EXPORT BeginFrameSourceBase : public BeginFrameSource {
~BeginFrameSourceBase() override;
// BeginFrameSource
- void DidFinishFrame(size_t remaining_frames) override {}
+ void DidFinishFrame(BeginFrameObserver* obs) override {}
void AddObserver(BeginFrameObserver* obs) override;
void RemoveObserver(BeginFrameObserver* obs) override;
@@ -182,10 +146,8 @@ class CC_EXPORT BackToBackBeginFrameSource : public BeginFrameSourceBase {
base::SingleThreadTaskRunner* task_runner);
~BackToBackBeginFrameSource() override;
- // BeginFrameSource
- void DidFinishFrame(size_t remaining_frames) override;
-
// BeginFrameSourceBase
+ void DidFinishFrame(BeginFrameObserver* obs) override;
void AddObserver(BeginFrameObserver* obs) override;
void OnNeedsBeginFramesChanged(bool needs_begin_frames) override;
@@ -222,6 +184,7 @@ class CC_EXPORT SyntheticBeginFrameSource : public BeginFrameSourceBase,
base::TimeDelta new_vsync_interval);
// BeginFrameSourceBase
+ void DidFinishFrame(BeginFrameObserver* obs) override;
void AddObserver(BeginFrameObserver* obs) override;
void OnNeedsBeginFramesChanged(bool needs_begin_frames) override;
« no previous file with comments | « no previous file | cc/scheduler/begin_frame_source.cc » ('j') | cc/scheduler/begin_frame_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698