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

Unified Diff: components/viz/frame_sinks/gpu_compositor_frame_sink.cc

Issue 2878113002: mus: Embedder can request and observe BeginFrame for embedded client. (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: components/viz/frame_sinks/gpu_compositor_frame_sink.cc
diff --git a/components/viz/frame_sinks/gpu_compositor_frame_sink.cc b/components/viz/frame_sinks/gpu_compositor_frame_sink.cc
index 81acb033feac9d9e22793a384d1266586768d906..ee5b3f63bd3f13d81919231a9d13bcc41882d366 100644
--- a/components/viz/frame_sinks/gpu_compositor_frame_sink.cc
+++ b/components/viz/frame_sinks/gpu_compositor_frame_sink.cc
@@ -71,9 +71,16 @@ void GpuCompositorFrameSink::RequestCopyOfSurface(
support_->RequestCopyOfSurface(std::move(request));
}
+void GpuCompositorFrameSink::RequestBeginFrames(
+ cc::mojom::FrameSinkObserverPtr observer) {
+ observer_ = std::move(observer);
+}
+
void GpuCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) {
if (client_)
client_->OnBeginFrame(args);
+ if (observer_.is_bound())
+ observer_->OnBeginFrame();
}
void GpuCompositorFrameSink::ReclaimResources(

Powered by Google App Engine
This is Rietveld 408576698