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

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

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
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 487ef4dba3bf40963b51e683c91dfb7deaa23bae..6a5ec5573b2fac2ee3d6a7b183f41fb233c55014 100644
--- a/services/ui/public/cpp/client_compositor_frame_sink.cc
+++ b/services/ui/public/cpp/client_compositor_frame_sink.cc
@@ -77,6 +77,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);
@@ -91,6 +92,13 @@ void ClientCompositorFrameSink::SubmitCompositorFrame(
std::move(frame));
}
+void ClientCompositorFrameSink::DidNotProduceFrame(
+ const cc::BeginFrameAck& ack) {
+ DCHECK(!ack.has_damage);
+ DCHECK_LE(cc::BeginFrameArgs::kStartingFrameNumber, ack.sequence_number);
+ compositor_frame_sink_->DidNotProduceFrame(ack);
+}
+
ClientCompositorFrameSink::ClientCompositorFrameSink(
scoped_refptr<cc::ContextProvider> context_provider,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
@@ -133,12 +141,6 @@ void ClientCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) {
compositor_frame_sink_->SetNeedsBeginFrame(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() {}
ClientCompositorFrameSinkBinding::ClientCompositorFrameSinkBinding(
« no previous file with comments | « services/ui/public/cpp/client_compositor_frame_sink.h ('k') | services/ui/ws/compositor_frame_sink_client_binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698