| 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 #ifndef COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_ | 5 #ifndef COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_ |
| 6 #define COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_ | 6 #define COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 void SetResourceReleaseCallback(cc::ResourceId id, | 38 void SetResourceReleaseCallback(cc::ResourceId id, |
| 39 const cc::ReleaseCallback& callback); | 39 const cc::ReleaseCallback& callback); |
| 40 | 40 |
| 41 CompositorFrameSink* GetCompositorFrameSink() { return frame_sink_.get(); } | 41 CompositorFrameSink* GetCompositorFrameSink() { return frame_sink_.get(); } |
| 42 | 42 |
| 43 base::WeakPtr<CompositorFrameSinkHolder> GetWeakPtr() { | 43 base::WeakPtr<CompositorFrameSinkHolder> GetWeakPtr() { |
| 44 return weak_factory_.GetWeakPtr(); | 44 return weak_factory_.GetWeakPtr(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 // Overridden from cc::mojom::MojoCompositorFrameSinkClient: | 47 // Overridden from cc::mojom::MojoCompositorFrameSinkClient: |
| 48 void DidReceiveCompositorFrameAck() override; | 48 void DidReceiveCompositorFrameAck( |
| 49 const cc::ReturnedResourceArray& resources) override; |
| 49 void OnBeginFrame(const cc::BeginFrameArgs& args) override; | 50 void OnBeginFrame(const cc::BeginFrameArgs& args) override; |
| 50 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; | 51 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; |
| 51 | 52 |
| 52 // Overridden from cc::ExternalBeginFrameSourceClient: | 53 // Overridden from cc::ExternalBeginFrameSourceClient: |
| 53 void OnNeedsBeginFrames(bool needs_begin_frames) override; | 54 void OnNeedsBeginFrames(bool needs_begin_frames) override; |
| 54 void OnDidFinishFrame(const cc::BeginFrameAck& ack) override; | 55 void OnDidFinishFrame(const cc::BeginFrameAck& ack) override; |
| 55 | 56 |
| 56 // Overridden from SurfaceObserver: | 57 // Overridden from SurfaceObserver: |
| 57 void OnSurfaceDestroying(Surface* surface) override; | 58 void OnSurfaceDestroying(Surface* surface) override; |
| 58 | 59 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 70 std::unique_ptr<cc::ExternalBeginFrameSource> begin_frame_source_; | 71 std::unique_ptr<cc::ExternalBeginFrameSource> begin_frame_source_; |
| 71 | 72 |
| 72 base::WeakPtrFactory<CompositorFrameSinkHolder> weak_factory_; | 73 base::WeakPtrFactory<CompositorFrameSinkHolder> weak_factory_; |
| 73 | 74 |
| 74 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkHolder); | 75 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkHolder); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 } // namespace exo | 78 } // namespace exo |
| 78 | 79 |
| 79 #endif // COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_ | 80 #endif // COMPONENTS_EXO_COMPOSITOR_FRAME_SINK_HOLDER_H_ |
| OLD | NEW |