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

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

Issue 2579693004: GpuCompositorFrameSink implements cc::mojom::DisplayPrivate (Closed)
Patch Set: Address comments Created 4 years 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 aa58c0aaa82c81dc2cdecee2fc01e760122f572c..34ef009d4fd1206f85067b472a8321c400c702b3 100644
--- a/services/ui/surfaces/gpu_compositor_frame_sink.cc
+++ b/services/ui/surfaces/gpu_compositor_frame_sink.cc
@@ -14,8 +14,10 @@ GpuCompositorFrameSink::GpuCompositorFrameSink(
std::unique_ptr<cc::Display> display,
std::unique_ptr<cc::BeginFrameSource> begin_frame_source,
cc::mojom::MojoCompositorFrameSinkRequest request,
- cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request,
- cc::mojom::MojoCompositorFrameSinkClientPtr client)
+ cc::mojom::MojoCompositorFrameSinkPrivateRequest
+ compositor_frame_sink_private_request,
+ cc::mojom::MojoCompositorFrameSinkClientPtr client,
+ cc::mojom::DisplayPrivateRequest display_private_request)
: display_compositor_(display_compositor),
support_(this,
display_compositor->manager(),
@@ -24,11 +26,14 @@ GpuCompositorFrameSink::GpuCompositorFrameSink(
std::move(begin_frame_source)),
client_(std::move(client)),
binding_(this, std::move(request)),
- private_binding_(this, std::move(private_request)) {
+ compositor_frame_sink_private_binding_(
+ this,
+ std::move(compositor_frame_sink_private_request)),
+ display_private_binding_(this, std::move(display_private_request)) {
binding_.set_connection_error_handler(base::Bind(
&GpuCompositorFrameSink::OnClientConnectionLost, base::Unretained(this)));
- private_binding_.set_connection_error_handler(
+ compositor_frame_sink_private_binding_.set_connection_error_handler(
base::Bind(&GpuCompositorFrameSink::OnPrivateConnectionLost,
base::Unretained(this)));
}
@@ -83,6 +88,27 @@ void GpuCompositorFrameSink::RemoveChildFrameSink(
support_.RemoveChildFrameSink(child_frame_sink_id);
}
+void GpuCompositorFrameSink::SetDisplayVisible(bool visible) {
+ if (support_.display())
+ support_.display()->SetVisible(visible);
+}
+
+void GpuCompositorFrameSink::ResizeDisplay(const gfx::Size& size) {
+ if (support_.display())
+ support_.display()->Resize(size);
+}
+
+void GpuCompositorFrameSink::SetDisplayColorSpace(
+ const gfx::ColorSpace& color_space) {
+ if (support_.display())
+ support_.display()->SetColorSpace(color_space);
+}
+
+void GpuCompositorFrameSink::SetOutputIsSecure(bool secure) {
+ if (support_.display())
+ support_.display()->SetOutputIsSecure(secure);
+}
+
void GpuCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) {
if (client_)
client_->OnBeginFrame(args);

Powered by Google App Engine
This is Rietveld 408576698