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

Side by Side Diff: services/ui/gpu/display_compositor/compositor_frame_sink_impl.cc

Issue 2144733005: [WIP] cc: Plumb SurfaceId from clients Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure only SurfaceFactoy and tests can update hierarchy Created 4 years, 5 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
« no previous file with comments | « content/test/test_render_view_host.cc ('k') | services/ui/surfaces/display_compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/ui/gpu/display_compositor/compositor_frame_sink_impl.h" 5 #include "services/ui/gpu/display_compositor/compositor_frame_sink_impl.h"
6 6
7 #include "cc/ipc/compositor_frame.mojom.h" 7 #include "cc/ipc/compositor_frame.mojom.h"
8 #include "cc/surfaces/surface_factory.h" 8 #include "cc/surfaces/surface_factory.h"
9 #include "services/ui/gpu/display_compositor/compositor_frame_sink_delegate.h" 9 #include "services/ui/gpu/display_compositor/compositor_frame_sink_delegate.h"
10 10
(...skipping 13 matching lines...) Expand all
24 CompositorFrameSinkDelegate* delegate, 24 CompositorFrameSinkDelegate* delegate,
25 int sink_id, 25 int sink_id,
26 const scoped_refptr<SurfacesState>& surfaces_state, 26 const scoped_refptr<SurfacesState>& surfaces_state,
27 mojo::InterfaceRequest<mojom::CompositorFrameSink> request, 27 mojo::InterfaceRequest<mojom::CompositorFrameSink> request,
28 mojom::CompositorFrameSinkClientPtr client) 28 mojom::CompositorFrameSinkClientPtr client)
29 : delegate_(delegate), 29 : delegate_(delegate),
30 surfaces_state_(surfaces_state), 30 surfaces_state_(surfaces_state),
31 sink_id_(sink_id), 31 sink_id_(sink_id),
32 begin_frame_source_(nullptr), 32 begin_frame_source_(nullptr),
33 needs_begin_frame_(false), 33 needs_begin_frame_(false),
34 factory_(surfaces_state->manager(), this), 34 factory_(sink_id, surfaces_state->manager(), this),
35 client_(std::move(client)), 35 client_(std::move(client)),
36 binding_(this, std::move(request)) { 36 binding_(this, std::move(request)) {
37 DCHECK(delegate_); 37 DCHECK(delegate_);
38 binding_.set_connection_error_handler(base::Bind( 38 binding_.set_connection_error_handler(base::Bind(
39 &CompositorFrameSinkImpl::OnConnectionLost, base::Unretained(this))); 39 &CompositorFrameSinkImpl::OnConnectionLost, base::Unretained(this)));
40 } 40 }
41 41
42 CompositorFrameSinkImpl::~CompositorFrameSinkImpl() {} 42 CompositorFrameSinkImpl::~CompositorFrameSinkImpl() {}
43 43
44 void CompositorFrameSinkImpl::SetNeedsBeginFrame(bool needs_begin_frame) { 44 void CompositorFrameSinkImpl::SetNeedsBeginFrame(bool needs_begin_frame) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void CompositorFrameSinkImpl::OnBeginFrameSourcePausedChanged(bool paused) { 103 void CompositorFrameSinkImpl::OnBeginFrameSourcePausedChanged(bool paused) {
104 // TODO(fsamuel): Implement this. 104 // TODO(fsamuel): Implement this.
105 } 105 }
106 106
107 void CompositorFrameSinkImpl::OnConnectionLost() { 107 void CompositorFrameSinkImpl::OnConnectionLost() {
108 delegate_->CompositorFrameSinkConnectionLost(sink_id_); 108 delegate_->CompositorFrameSinkConnectionLost(sink_id_);
109 } 109 }
110 110
111 } // namespace gpu 111 } // namespace gpu
112 } // namespace ui 112 } // namespace ui
OLDNEW
« no previous file with comments | « content/test/test_render_view_host.cc ('k') | services/ui/surfaces/display_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698