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

Unified Diff: services/ui/surfaces/gpu_compositor_frame_sink.cc

Issue 2612083002: DirectCompositorFrameSink Uses CompositorFrameSinkSupport (Closed)
Patch Set: Addressed comments Created 3 years, 11 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/surfaces/gpu_compositor_frame_sink.cc
diff --git a/services/ui/surfaces/gpu_compositor_frame_sink.cc b/services/ui/surfaces/gpu_compositor_frame_sink.cc
index 34ef009d4fd1206f85067b472a8321c400c702b3..a97aa69b1f6f1eaad885f8abcd02e160d6cdd9fc 100644
--- a/services/ui/surfaces/gpu_compositor_frame_sink.cc
+++ b/services/ui/surfaces/gpu_compositor_frame_sink.cc
@@ -19,10 +19,11 @@ GpuCompositorFrameSink::GpuCompositorFrameSink(
cc::mojom::MojoCompositorFrameSinkClientPtr client,
cc::mojom::DisplayPrivateRequest display_private_request)
: display_compositor_(display_compositor),
+ display_(std::move(display)),
support_(this,
display_compositor->manager(),
frame_sink_id,
- std::move(display),
+ display_.get(),
std::move(begin_frame_source)),
client_(std::move(client)),
binding_(this, std::move(request)),
@@ -30,6 +31,8 @@ GpuCompositorFrameSink::GpuCompositorFrameSink(
this,
std::move(compositor_frame_sink_private_request)),
display_private_binding_(this, std::move(display_private_request)) {
+ support_.display()->SetVisible(true);
+ support_.RegisterFrameSinkId();
binding_.set_connection_error_handler(base::Bind(
&GpuCompositorFrameSink::OnClientConnectionLost, base::Unretained(this)));
@@ -38,7 +41,9 @@ GpuCompositorFrameSink::GpuCompositorFrameSink(
base::Unretained(this)));
}
-GpuCompositorFrameSink::~GpuCompositorFrameSink() {}
+GpuCompositorFrameSink::~GpuCompositorFrameSink() {
+ support_.InvalidateFrameSinkId();
+}
void GpuCompositorFrameSink::EvictFrame() {
support_.EvictFrame();

Powered by Google App Engine
This is Rietveld 408576698