OLD | NEW |
---|---|
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 |
11 namespace ui { | 11 namespace ui { |
12 namespace gpu { | 12 namespace gpu { |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 void CallCallback( | 16 void CallCallback( |
sky
2016/07/20 15:56:35
Is this function still needed? Can the callback be
Fady Samuel
2016/07/20 20:31:33
Done.
| |
17 const mojom::CompositorFrameSink::SubmitCompositorFrameCallback& callback, | 17 const mojom::CompositorFrameSink::SubmitCompositorFrameCallback& callback) { |
18 cc::SurfaceDrawStatus draw_status) { | 18 callback.Run(); |
19 callback.Run(static_cast<mojom::CompositorFrameDrawStatus>(draw_status)); | |
20 } | 19 } |
21 } | 20 } |
22 | 21 |
23 CompositorFrameSinkImpl::CompositorFrameSinkImpl( | 22 CompositorFrameSinkImpl::CompositorFrameSinkImpl( |
24 CompositorFrameSinkDelegate* delegate, | 23 CompositorFrameSinkDelegate* delegate, |
25 int sink_id, | 24 int sink_id, |
26 const scoped_refptr<SurfacesState>& surfaces_state, | 25 const scoped_refptr<SurfacesState>& surfaces_state, |
27 mojo::InterfaceRequest<mojom::CompositorFrameSink> request, | 26 mojo::InterfaceRequest<mojom::CompositorFrameSink> request, |
28 mojom::CompositorFrameSinkClientPtr client) | 27 mojom::CompositorFrameSinkClientPtr client) |
29 : delegate_(delegate), | 28 : delegate_(delegate), |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 void CompositorFrameSinkImpl::OnBeginFrameSourcePausedChanged(bool paused) { | 102 void CompositorFrameSinkImpl::OnBeginFrameSourcePausedChanged(bool paused) { |
104 // TODO(fsamuel): Implement this. | 103 // TODO(fsamuel): Implement this. |
105 } | 104 } |
106 | 105 |
107 void CompositorFrameSinkImpl::OnConnectionLost() { | 106 void CompositorFrameSinkImpl::OnConnectionLost() { |
108 delegate_->CompositorFrameSinkConnectionLost(sink_id_); | 107 delegate_->CompositorFrameSinkConnectionLost(sink_id_); |
109 } | 108 } |
110 | 109 |
111 } // namespace gpu | 110 } // namespace gpu |
112 } // namespace ui | 111 } // namespace ui |
OLD | NEW |