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

Unified Diff: cc/scheduler/begin_frame_source.h

Issue 2888043004: [cc] Add and plumb CFS::DidNotProduceFrame. (Closed)
Patch Set: address nits, rename to DidNotProduceFrame. Created 3 years, 7 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 | « cc/output/compositor_frame_sink_unittest.cc ('k') | 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 f9c47c5522dc70e66d06235af8014094b42c76b0..98ea3771b397907cd7da351af4a4fd660d945134 100644
--- a/cc/scheduler/begin_frame_source.h
+++ b/cc/scheduler/begin_frame_source.h
@@ -247,54 +247,10 @@ class CC_EXPORT DelayBasedBeginFrameSource : public SyntheticBeginFrameSource,
DISALLOW_COPY_AND_ASSIGN(DelayBasedBeginFrameSource);
};
-// Helper class that tracks outstanding acknowledgments from
-// BeginFrameObservers.
-class CC_EXPORT BeginFrameObserverAckTracker {
- public:
- BeginFrameObserverAckTracker();
- ~BeginFrameObserverAckTracker();
-
- // The BeginFrameSource uses these methods to notify us when a BeginFrame was
- // started, an observer finished a frame, or an observer was added/removed.
- void OnBeginFrame(const BeginFrameArgs& args);
- void OnObserverFinishedFrame(BeginFrameObserver* obs,
- const BeginFrameAck& ack);
- void OnObserverAdded(BeginFrameObserver* obs);
- void OnObserverRemoved(BeginFrameObserver* obs);
-
- // Returns |true| if all the source's observers completed the current frame.
- bool AllObserversFinishedFrame() const;
-
- // Returns |true| if any observer had damage during the current frame.
- bool AnyObserversHadDamage() const;
-
- // Return the sequence number of the latest frame that all active observers
- // have confirmed.
- uint64_t LatestConfirmedSequenceNumber() const;
-
- void AsValueInto(base::trace_event::TracedValue* state) const;
-
- private:
- void SourceChanged(const BeginFrameArgs& args);
-
- uint32_t current_source_id_ = 0;
- uint64_t current_sequence_number_ = BeginFrameArgs::kStartingFrameNumber;
- // Small sets, but order matters for intersection computation.
- base::flat_set<BeginFrameObserver*> observers_;
- base::flat_set<BeginFrameObserver*> finished_observers_;
- bool observers_had_damage_ = false;
- base::flat_map<BeginFrameObserver*, uint64_t>
- latest_confirmed_sequence_numbers_;
-
- DISALLOW_COPY_AND_ASSIGN(BeginFrameObserverAckTracker);
-};
-
class CC_EXPORT ExternalBeginFrameSourceClient {
public:
// Only called when changed. Assumed false by default.
virtual void OnNeedsBeginFrames(bool needs_begin_frames) = 0;
- // Called when all observers have completed a frame.
- virtual void OnDidFinishFrame(const BeginFrameAck& ack) = 0;
};
// A BeginFrameSource that is only ticked manually. Usually the endpoint
@@ -319,15 +275,10 @@ class CC_EXPORT ExternalBeginFrameSource : public BeginFrameSource {
void OnBeginFrame(const BeginFrameArgs& args);
protected:
- void MaybeFinishFrame();
- void FinishFrame();
-
BeginFrameArgs last_begin_frame_args_;
std::unordered_set<BeginFrameObserver*> observers_;
ExternalBeginFrameSourceClient* client_;
bool paused_ = false;
- bool frame_active_ = false;
- BeginFrameObserverAckTracker ack_tracker_;
private:
DISALLOW_COPY_AND_ASSIGN(ExternalBeginFrameSource);
« no previous file with comments | « cc/output/compositor_frame_sink_unittest.cc ('k') | cc/scheduler/begin_frame_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698