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

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

Issue 2579693004: GpuCompositorFrameSink implements cc::mojom::DisplayPrivate (Closed)
Patch Set: Addressed 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..77ca5ba3b4259592a927b347d13398272fb18da5 100644
--- a/services/ui/surfaces/gpu_compositor_frame_sink.cc
+++ b/services/ui/surfaces/gpu_compositor_frame_sink.cc
@@ -15,7 +15,8 @@ GpuCompositorFrameSink::GpuCompositorFrameSink(
std::unique_ptr<cc::BeginFrameSource> begin_frame_source,
cc::mojom::MojoCompositorFrameSinkRequest request,
cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request,
Fady Samuel 2016/12/16 17:18:18 compositor_frame_sink_private_request
Alex Z. 2016/12/19 19:27:47 Done.
- cc::mojom::MojoCompositorFrameSinkClientPtr client)
+ cc::mojom::MojoCompositorFrameSinkClientPtr client,
+ cc::mojom::DisplayPrivateRequest display_request)
Fady Samuel 2016/12/16 17:18:18 display_private_request
Alex Z. 2016/12/19 19:27:47 Done.
: display_compositor_(display_compositor),
support_(this,
display_compositor->manager(),
@@ -24,7 +25,8 @@ GpuCompositorFrameSink::GpuCompositorFrameSink(
std::move(begin_frame_source)),
client_(std::move(client)),
binding_(this, std::move(request)),
- private_binding_(this, std::move(private_request)) {
+ private_binding_(this, std::move(private_request)),
Fady Samuel 2016/12/16 17:18:18 compositor_frame_sink_private_binding_
Alex Z. 2016/12/19 19:27:47 Done.
+ display_binding_(this, std::move(display_request)) {
Fady Samuel 2016/12/16 17:18:19 display_private_binding_
Alex Z. 2016/12/19 19:27:47 Done.
binding_.set_connection_error_handler(base::Bind(
&GpuCompositorFrameSink::OnClientConnectionLost, base::Unretained(this)));
@@ -83,6 +85,27 @@ void GpuCompositorFrameSink::RemoveChildFrameSink(
support_.RemoveChildFrameSink(child_frame_sink_id);
}
+void GpuCompositorFrameSink::SetDisplayVisible(bool visible) {
+ if (support_.GetDisplay())
+ support_.GetDisplay()->SetVisible(visible);
+}
+
+void GpuCompositorFrameSink::ResizeDisplay(const gfx::Size& size) {
+ if (support_.GetDisplay())
+ support_.GetDisplay()->Resize(size);
+}
+
+void GpuCompositorFrameSink::SetDisplayColorSpace(
+ const gfx::ColorSpace& color_space) {
+ if (support_.GetDisplay())
+ support_.GetDisplay()->SetColorSpace(color_space);
+}
+
+void GpuCompositorFrameSink::SetOutputIsSecure(bool secure) {
+ if (support_.GetDisplay())
+ support_.GetDisplay()->SetOutputIsSecure(secure);
+}
+
void GpuCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) {
if (client_)
client_->OnBeginFrame(args);

Powered by Google App Engine
This is Rietveld 408576698