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

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

Issue 2612083002: DirectCompositorFrameSink Uses CompositorFrameSinkSupport (Closed)
Patch Set: Use MakeUnique 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 0e1584f94e80ffb369c5c68aa56f3a592ad8c7a4..96a60ae57de78a4bce8e7f7d7467d72e9dfe898d 100644
--- a/services/ui/surfaces/gpu_compositor_frame_sink.cc
+++ b/services/ui/surfaces/gpu_compositor_frame_sink.cc
@@ -20,11 +20,12 @@ GpuCompositorFrameSink::GpuCompositorFrameSink(
cc::mojom::MojoCompositorFrameSinkClientPtr client,
cc::mojom::DisplayPrivateRequest display_private_request)
: display_compositor_(display_compositor),
+ display_(std::move(display)),
+ display_begin_frame_source_(std::move(begin_frame_source)),
support_(this,
display_compositor->manager(),
frame_sink_id,
- std::move(display),
- std::move(begin_frame_source)),
+ display_.get()),
surface_tracker_(frame_sink_id),
client_(std::move(client)),
binding_(this, std::move(request)),
@@ -32,6 +33,8 @@ GpuCompositorFrameSink::GpuCompositorFrameSink(
this,
std::move(compositor_frame_sink_private_request)),
display_private_binding_(this, std::move(display_private_request)) {
+ if (display_.get())
+ display_->SetVisible(true);
binding_.set_connection_error_handler(base::Bind(
&GpuCompositorFrameSink::OnClientConnectionLost, base::Unretained(this)));
@@ -50,6 +53,7 @@ GpuCompositorFrameSink::~GpuCompositorFrameSink() {
top_level_root_surface_id, surface_tracker_.current_surface_id())};
display_compositor_->RemoveSurfaceReferences(references_to_remove);
}
+ support_.InvalidateFrameSinkId();
Fady Samuel 2017/01/23 21:56:12 Why?
}
void GpuCompositorFrameSink::EvictFrame() {
« components/exo/compositor_frame_sink.cc ('K') | « services/ui/surfaces/gpu_compositor_frame_sink.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698