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

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: More Init 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 {
(...skipping 18 matching lines...) Expand all
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)),
35 compositor_frame_sink_private_binding_( 35 compositor_frame_sink_private_binding_(
36 this, 36 this,
37 std::move(compositor_frame_sink_private_request)), 37 std::move(compositor_frame_sink_private_request)),
38 display_private_binding_(this, std::move(display_private_request)) { 38 display_private_binding_(this, std::move(display_private_request)) {
39 support_->Init();
39 compositor_frame_sink_binding_.set_connection_error_handler( 40 compositor_frame_sink_binding_.set_connection_error_handler(
40 base::Bind(&GpuRootCompositorFrameSink::OnClientConnectionLost, 41 base::Bind(&GpuRootCompositorFrameSink::OnClientConnectionLost,
41 base::Unretained(this))); 42 base::Unretained(this)));
42 compositor_frame_sink_private_binding_.set_connection_error_handler( 43 compositor_frame_sink_private_binding_.set_connection_error_handler(
43 base::Bind(&GpuRootCompositorFrameSink::OnPrivateConnectionLost, 44 base::Bind(&GpuRootCompositorFrameSink::OnPrivateConnectionLost,
44 base::Unretained(this))); 45 base::Unretained(this)));
45 display_->Initialize(this, surface_manager); 46 display_->Initialize(this, surface_manager);
46 display_->SetVisible(true); 47 display_->SetVisible(true);
47 } 48 }
48 49
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 147 }
147 148
148 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { 149 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() {
149 private_connection_lost_ = true; 150 private_connection_lost_ = true;
150 // Request destruction of |this| only if both connections are lost. 151 // Request destruction of |this| only if both connections are lost.
151 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), 152 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(),
152 client_connection_lost_); 153 client_connection_lost_);
153 } 154 }
154 155
155 } // namespace viz 156 } // namespace viz
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698