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

Side by Side Diff: components/viz/frame_sinks/gpu_root_compositor_frame_sink.cc

Issue 2807653003: Move Work From CompositorFrameSinkSupport() To Init() (Closed)
Patch Set: Add CompositorFrameSinkSupport::Create Created 3 years, 8 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/viz/frame_sinks/gpu_root_compositor_frame_sink.h" 5 #include "components/viz/frame_sinks/gpu_root_compositor_frame_sink.h"
6 6
7 #include "cc/surfaces/compositor_frame_sink_support.h" 7 #include "cc/surfaces/compositor_frame_sink_support.h"
8 #include "cc/surfaces/display.h" 8 #include "cc/surfaces/display.h"
9 9
10 namespace viz { 10 namespace viz {
11 11
12 GpuRootCompositorFrameSink::GpuRootCompositorFrameSink( 12 GpuRootCompositorFrameSink::GpuRootCompositorFrameSink(
13 GpuCompositorFrameSinkDelegate* delegate, 13 GpuCompositorFrameSinkDelegate* delegate,
14 cc::SurfaceManager* surface_manager, 14 cc::SurfaceManager* surface_manager,
15 const cc::FrameSinkId& frame_sink_id, 15 const cc::FrameSinkId& frame_sink_id,
16 std::unique_ptr<cc::Display> display, 16 std::unique_ptr<cc::Display> display,
17 std::unique_ptr<cc::BeginFrameSource> begin_frame_source, 17 std::unique_ptr<cc::BeginFrameSource> begin_frame_source,
18 cc::mojom::MojoCompositorFrameSinkAssociatedRequest request, 18 cc::mojom::MojoCompositorFrameSinkAssociatedRequest request,
19 cc::mojom::MojoCompositorFrameSinkPrivateRequest 19 cc::mojom::MojoCompositorFrameSinkPrivateRequest
20 compositor_frame_sink_private_request, 20 compositor_frame_sink_private_request,
21 cc::mojom::MojoCompositorFrameSinkClientPtr client, 21 cc::mojom::MojoCompositorFrameSinkClientPtr client,
22 cc::mojom::DisplayPrivateAssociatedRequest display_private_request) 22 cc::mojom::DisplayPrivateAssociatedRequest display_private_request)
23 : delegate_(delegate), 23 : delegate_(delegate),
24 support_(base::MakeUnique<cc::CompositorFrameSinkSupport>( 24 support_(cc::CompositorFrameSinkSupport::Create(
25 this, 25 this,
26 surface_manager, 26 surface_manager,
27 frame_sink_id, 27 frame_sink_id,
28 true /* is_root */, 28 true /* is_root */,
29 true /* handles_frame_sink_id_invalidation */, 29 true /* handles_frame_sink_id_invalidation */,
30 true /* needs_sync_points */)), 30 true /* needs_sync_points */)),
31 display_begin_frame_source_(std::move(begin_frame_source)), 31 display_begin_frame_source_(std::move(begin_frame_source)),
32 display_(std::move(display)), 32 display_(std::move(display)),
33 client_(std::move(client)), 33 client_(std::move(client)),
34 compositor_frame_sink_binding_(this, std::move(request)), 34 compositor_frame_sink_binding_(this, std::move(request)),
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 143 }
144 144
145 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { 145 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() {
146 private_connection_lost_ = true; 146 private_connection_lost_ = true;
147 // Request destruction of |this| only if both connections are lost. 147 // Request destruction of |this| only if both connections are lost.
148 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), 148 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(),
149 client_connection_lost_); 149 client_connection_lost_);
150 } 150 }
151 151
152 } // namespace viz 152 } // namespace viz
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698