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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 } | 76 } |
77 | 77 |
78 void CompositorFrameSinkImpl::ReturnResources( | 78 void CompositorFrameSinkImpl::ReturnResources( |
79 const cc::ReturnedResourceArray& resources) { | 79 const cc::ReturnedResourceArray& resources) { |
80 if (!client_) | 80 if (!client_) |
81 return; | 81 return; |
82 | 82 |
83 client_->ReturnResources(mojo::Array<cc::ReturnedResource>::From(resources)); | 83 client_->ReturnResources(mojo::Array<cc::ReturnedResource>::From(resources)); |
84 } | 84 } |
85 | 85 |
86 void CompositorFrameSinkImpl::WillDrawSurface(cc::SurfaceId surface_id, | 86 void CompositorFrameSinkImpl::WillDrawSurface(const cc::SurfaceId& surface_id, |
87 const gfx::Rect& damage_rect) { | 87 const gfx::Rect& damage_rect) { |
88 NOTIMPLEMENTED(); | 88 NOTIMPLEMENTED(); |
89 } | 89 } |
90 | 90 |
91 void CompositorFrameSinkImpl::SetBeginFrameSource( | 91 void CompositorFrameSinkImpl::SetBeginFrameSource( |
92 cc::BeginFrameSource* begin_frame_source) { | 92 cc::BeginFrameSource* begin_frame_source) { |
93 begin_frame_source_ = begin_frame_source; | 93 begin_frame_source_ = begin_frame_source; |
94 } | 94 } |
95 | 95 |
96 void CompositorFrameSinkImpl::OnBeginFrame(const cc::BeginFrameArgs& args) { | 96 void CompositorFrameSinkImpl::OnBeginFrame(const cc::BeginFrameArgs& args) { |
97 // TODO(fsamuel): Implement this. | 97 // TODO(fsamuel): Implement this. |
98 } | 98 } |
99 | 99 |
100 const cc::BeginFrameArgs& CompositorFrameSinkImpl::LastUsedBeginFrameArgs() | 100 const cc::BeginFrameArgs& CompositorFrameSinkImpl::LastUsedBeginFrameArgs() |
101 const { | 101 const { |
102 // TODO(fsamuel): Implement this. | 102 // TODO(fsamuel): Implement this. |
103 return last_used_begin_frame_args_; | 103 return last_used_begin_frame_args_; |
104 } | 104 } |
105 | 105 |
106 void CompositorFrameSinkImpl::OnBeginFrameSourcePausedChanged(bool paused) { | 106 void CompositorFrameSinkImpl::OnBeginFrameSourcePausedChanged(bool paused) { |
107 // TODO(fsamuel): Implement this. | 107 // TODO(fsamuel): Implement this. |
108 } | 108 } |
109 | 109 |
110 void CompositorFrameSinkImpl::OnConnectionLost() { | 110 void CompositorFrameSinkImpl::OnConnectionLost() { |
111 delegate_->CompositorFrameSinkConnectionLost(sink_id_); | 111 delegate_->CompositorFrameSinkConnectionLost(sink_id_); |
112 } | 112 } |
113 | 113 |
114 } // namespace gpu | 114 } // namespace gpu |
115 } // namespace mus | 115 } // namespace mus |
OLD | NEW |