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 "components/mus/gpu/display_compositor/compositor_frame_sink_impl.h" | 5 #include "components/mus/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 "components/mus/gpu/display_compositor/compositor_frame_sink_delegate.h
" | 9 #include "components/mus/gpu/display_compositor/compositor_frame_sink_delegate.h
" |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 | 74 |
75 void CompositorFrameSinkImpl::ReturnResources( | 75 void CompositorFrameSinkImpl::ReturnResources( |
76 const cc::ReturnedResourceArray& resources) { | 76 const cc::ReturnedResourceArray& resources) { |
77 if (!client_) | 77 if (!client_) |
78 return; | 78 return; |
79 | 79 |
80 client_->ReturnResources(mojo::Array<cc::ReturnedResource>::From(resources)); | 80 client_->ReturnResources(mojo::Array<cc::ReturnedResource>::From(resources)); |
81 } | 81 } |
82 | 82 |
83 void CompositorFrameSinkImpl::WillDrawSurface(cc::SurfaceId surface_id, | 83 void CompositorFrameSinkImpl::WillDrawSurface(const cc::SurfaceId& surface_id, |
84 const gfx::Rect& damage_rect) { | 84 const gfx::Rect& damage_rect) { |
85 NOTIMPLEMENTED(); | 85 NOTIMPLEMENTED(); |
86 } | 86 } |
87 | 87 |
88 void CompositorFrameSinkImpl::SetBeginFrameSource( | 88 void CompositorFrameSinkImpl::SetBeginFrameSource( |
89 cc::BeginFrameSource* begin_frame_source) { | 89 cc::BeginFrameSource* begin_frame_source) { |
90 begin_frame_source_ = begin_frame_source; | 90 begin_frame_source_ = begin_frame_source; |
91 } | 91 } |
92 | 92 |
93 void CompositorFrameSinkImpl::OnBeginFrame(const cc::BeginFrameArgs& args) { | 93 void CompositorFrameSinkImpl::OnBeginFrame(const cc::BeginFrameArgs& args) { |
94 // TODO(fsamuel): Implement this. | 94 // TODO(fsamuel): Implement this. |
95 } | 95 } |
96 | 96 |
97 const cc::BeginFrameArgs& CompositorFrameSinkImpl::LastUsedBeginFrameArgs() | 97 const cc::BeginFrameArgs& CompositorFrameSinkImpl::LastUsedBeginFrameArgs() |
98 const { | 98 const { |
99 // TODO(fsamuel): Implement this. | 99 // TODO(fsamuel): Implement this. |
100 return last_used_begin_frame_args_; | 100 return last_used_begin_frame_args_; |
101 } | 101 } |
102 | 102 |
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 mus | 112 } // namespace mus |
OLD | NEW |