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

Side by Side Diff: components/display_compositor/gpu_offscreen_compositor_frame_sink.cc

Issue 2703503002: WIP: move OffscreenCanvas into new display compositor
Patch Set: Refine connection lost Created 3 years, 10 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/display_compositor/gpu_offscreen_compositor_frame_sink.h" 5 #include "components/display_compositor/gpu_offscreen_compositor_frame_sink.h"
6 6
7 namespace display_compositor { 7 namespace display_compositor {
8 8
9 GpuOffscreenCompositorFrameSink::GpuOffscreenCompositorFrameSink( 9 GpuOffscreenCompositorFrameSink::GpuOffscreenCompositorFrameSink(
10 GpuCompositorFrameSinkDelegate* delegate, 10 GpuCompositorFrameSinkDelegate* delegate,
11 cc::SurfaceManager* surface_manager, 11 cc::SurfaceManager* surface_manager,
12 const cc::FrameSinkId& frame_sink_id, 12 const cc::FrameSinkId& frame_sink_id,
13 cc::mojom::MojoCompositorFrameSinkRequest request, 13 cc::mojom::MojoCompositorFrameSinkRequest request,
14 cc::mojom::MojoCompositorFrameSinkPrivateRequest 14 cc::mojom::MojoCompositorFrameSinkPrivateRequest
15 compositor_frame_sink_private_request, 15 compositor_frame_sink_private_request,
16 cc::mojom::MojoCompositorFrameSinkClientPtr client) 16 cc::mojom::MojoCompositorFrameSinkClientPtr client)
17 : GpuCompositorFrameSink(delegate, 17 : GpuCompositorFrameSinkBase(
18 base::MakeUnique<cc::CompositorFrameSinkSupport>( 18 delegate,
19 this, 19 base::MakeUnique<cc::CompositorFrameSinkSupport>(
20 surface_manager, 20 this,
21 frame_sink_id, 21 surface_manager,
22 false /* is_root */, 22 frame_sink_id,
23 true /* handles_frame_sink_id_invalidation */, 23 false /* is_root */,
24 true /* needs_sync_points */), 24 true /* handles_frame_sink_id_invalidation */,
25 std::move(compositor_frame_sink_private_request), 25 true /* needs_sync_points */),
26 std::move(client)), 26 std::move(compositor_frame_sink_private_request),
27 std::move(client)),
27 binding_(this, std::move(request)) { 28 binding_(this, std::move(request)) {
28 binding_.set_connection_error_handler( 29 binding_.set_connection_error_handler(
29 base::Bind(&GpuOffscreenCompositorFrameSink::OnClientConnectionLost, 30 base::Bind(&GpuOffscreenCompositorFrameSink::OnClientConnectionLost,
30 base::Unretained(this))); 31 base::Unretained(this)));
31 } 32 }
32 33
33 GpuOffscreenCompositorFrameSink::~GpuOffscreenCompositorFrameSink() = default; 34 GpuOffscreenCompositorFrameSink::~GpuOffscreenCompositorFrameSink() = default;
34 35
35 } // namespace display_compositor 36 } // namespace display_compositor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698