| 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/exo/compositor_frame_sink.h" | 5 #include "components/exo/compositor_frame_sink.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "cc/surfaces/surface.h" | 8 #include "cc/surfaces/surface.h" |
| 9 #include "cc/surfaces/surface_manager.h" | 9 #include "cc/surfaces/surface_manager.h" |
| 10 #include "components/exo/compositor_frame_sink_holder.h" |
| 10 #include "mojo/public/cpp/bindings/strong_binding.h" | 11 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 11 | 12 |
| 12 namespace exo { | 13 namespace exo { |
| 13 | 14 |
| 14 //////////////////////////////////////////////////////////////////////////////// | 15 //////////////////////////////////////////////////////////////////////////////// |
| 15 // ExoComopositorFrameSink, public: | 16 // ExoComopositorFrameSink, public: |
| 16 | 17 |
| 17 CompositorFrameSink::CompositorFrameSink( | 18 CompositorFrameSink::CompositorFrameSink(const cc::FrameSinkId& frame_sink_id, |
| 18 const cc::FrameSinkId& frame_sink_id, | 19 cc::SurfaceManager* surface_manager, |
| 19 cc::SurfaceManager* surface_manager, | 20 CompositorFrameSinkHolder* client) |
| 20 cc::mojom::MojoCompositorFrameSinkClientPtr client) | |
| 21 : support_(this, surface_manager, frame_sink_id, nullptr, nullptr), | 21 : support_(this, surface_manager, frame_sink_id, nullptr, nullptr), |
| 22 client_(std::move(client)) {} | 22 client_(client) {} |
| 23 | 23 |
| 24 CompositorFrameSink::~CompositorFrameSink() {} | 24 CompositorFrameSink::~CompositorFrameSink() {} |
| 25 | 25 |
| 26 //////////////////////////////////////////////////////////////////////////////// | 26 //////////////////////////////////////////////////////////////////////////////// |
| 27 // cc::mojom::MojoCompositorFrameSink overrides: | 27 // cc::mojom::MojoCompositorFrameSink overrides: |
| 28 | 28 |
| 29 void CompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) { | 29 void CompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) { |
| 30 support_.SetNeedsBeginFrame(needs_begin_frame); | 30 support_.SetNeedsBeginFrame(needs_begin_frame); |
| 31 } | 31 } |
| 32 | 32 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 void CompositorFrameSink::ReclaimResources( | 75 void CompositorFrameSink::ReclaimResources( |
| 76 const cc::ReturnedResourceArray& resources) { | 76 const cc::ReturnedResourceArray& resources) { |
| 77 client_->ReclaimResources(resources); | 77 client_->ReclaimResources(resources); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void CompositorFrameSink::WillDrawSurface() { | 80 void CompositorFrameSink::WillDrawSurface() { |
| 81 client_->WillDrawSurface(); | 81 client_->WillDrawSurface(); |
| 82 } | 82 } |
| 83 | 83 |
| 84 } // namespace exo | 84 } // namespace exo |
| OLD | NEW |