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

Unified Diff: services/ui/public/cpp/client_compositor_frame_sink.cc

Issue 2888043004: [cc] Add and plumb CFS::DidNotProduceFrame. (Closed)
Patch Set: 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
Index: services/ui/public/cpp/client_compositor_frame_sink.cc
diff --git a/services/ui/public/cpp/client_compositor_frame_sink.cc b/services/ui/public/cpp/client_compositor_frame_sink.cc
index ef014e05ae77d58a8dbc11cf528072e859106aa0..87a051458575260b641229680de04f7b4f89a52d 100644
--- a/services/ui/public/cpp/client_compositor_frame_sink.cc
+++ b/services/ui/public/cpp/client_compositor_frame_sink.cc
@@ -78,6 +78,7 @@ void ClientCompositorFrameSink::SubmitCompositorFrame(
if (!compositor_frame_sink_)
return;
+ DCHECK(frame.metadata.begin_frame_ack.has_damage);
DCHECK_LE(cc::BeginFrameArgs::kStartingFrameNumber,
frame.metadata.begin_frame_ack.sequence_number);
@@ -92,6 +93,13 @@ void ClientCompositorFrameSink::SubmitCompositorFrame(
last_submitted_frame_size_ = frame_size;
}
+void ClientCompositorFrameSink::BeginFrameDidNotProduceFrame(
+ const cc::BeginFrameAck& ack) {
+ DCHECK(!ack.has_damage);
+ DCHECK_LE(cc::BeginFrameArgs::kStartingFrameNumber, ack.sequence_number);
+ compositor_frame_sink_->BeginFrameDidNotProduceFrame(ack);
+}
+
ClientCompositorFrameSink::ClientCompositorFrameSink(
const cc::FrameSinkId& frame_sink_id,
scoped_refptr<cc::ContextProvider> context_provider,
@@ -139,9 +147,6 @@ void ClientCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) {
}
void ClientCompositorFrameSink::OnDidFinishFrame(const cc::BeginFrameAck& ack) {
- // If there was damage, the submitted CompositorFrame includes the ack.
- if (!ack.has_damage)
- compositor_frame_sink_->BeginFrameDidNotSwap(ack);
}
ClientCompositorFrameSinkBinding::~ClientCompositorFrameSinkBinding() {}

Powered by Google App Engine
This is Rietveld 408576698