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

Side by Side Diff: services/ui/surfaces/gpu_display_compositor_frame_sink.cc

Issue 2651213004: Revert of Decouple GpuCompositorFrameSink from DisplayCompositor (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "services/ui/surfaces/gpu_display_compositor_frame_sink.h"
6
7 namespace ui {
8
9 GpuDisplayCompositorFrameSink::GpuDisplayCompositorFrameSink(
10 DisplayCompositor* display_compositor,
11 const cc::FrameSinkId& frame_sink_id,
12 std::unique_ptr<cc::Display> display,
13 std::unique_ptr<cc::BeginFrameSource> begin_frame_source,
14 cc::mojom::MojoCompositorFrameSinkAssociatedRequest request,
15 cc::mojom::MojoCompositorFrameSinkPrivateRequest
16 compositor_frame_sink_private_request,
17 cc::mojom::MojoCompositorFrameSinkClientPtr client,
18 cc::mojom::DisplayPrivateAssociatedRequest display_private_request)
19 : GpuCompositorFrameSink(display_compositor,
20 frame_sink_id,
21 std::move(display),
22 std::move(begin_frame_source),
23 std::move(compositor_frame_sink_private_request),
24 std::move(client)),
25 binding_(this, std::move(request)),
26 display_private_binding_(this, std::move(display_private_request)) {
27 binding_.set_connection_error_handler(
28 base::Bind(&GpuDisplayCompositorFrameSink::OnClientConnectionLost,
29 base::Unretained(this)));
30 }
31
32 GpuDisplayCompositorFrameSink::~GpuDisplayCompositorFrameSink() = default;
33
34 void GpuDisplayCompositorFrameSink::SetDisplayVisible(bool visible) {
35 DCHECK(support_.display());
36 support_.display()->SetVisible(visible);
37 }
38
39 void GpuDisplayCompositorFrameSink::ResizeDisplay(const gfx::Size& size) {
40 DCHECK(support_.display());
41 support_.display()->Resize(size);
42 }
43
44 void GpuDisplayCompositorFrameSink::SetDisplayColorSpace(
45 const gfx::ColorSpace& color_space) {
46 DCHECK(support_.display());
47 support_.display()->SetColorSpace(color_space);
48 }
49
50 void GpuDisplayCompositorFrameSink::SetOutputIsSecure(bool secure) {
51 DCHECK(support_.display());
52 support_.display()->SetOutputIsSecure(secure);
53 }
54
55 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/surfaces/gpu_display_compositor_frame_sink.h ('k') | services/ui/surfaces/gpu_offscreen_compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698