| 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 "cc/surfaces/surface.h" | 7 #include "cc/surfaces/surface.h" |
| 8 #include "cc/surfaces/surface_manager.h" | 8 #include "cc/surfaces/surface_manager.h" |
| 9 #include "mojo/public/cpp/bindings/strong_binding.h" | 9 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 std::move(client)); | 24 std::move(client)); |
| 25 CompositorFrameSink* compositor_frame_sink = impl.get(); | 25 CompositorFrameSink* compositor_frame_sink = impl.get(); |
| 26 compositor_frame_sink->binding_ = | 26 compositor_frame_sink->binding_ = |
| 27 mojo::MakeStrongBinding(std::move(impl), std::move(request)); | 27 mojo::MakeStrongBinding(std::move(impl), std::move(request)); |
| 28 } | 28 } |
| 29 | 29 |
| 30 CompositorFrameSink::CompositorFrameSink( | 30 CompositorFrameSink::CompositorFrameSink( |
| 31 const cc::FrameSinkId& frame_sink_id, | 31 const cc::FrameSinkId& frame_sink_id, |
| 32 cc::SurfaceManager* surface_manager, | 32 cc::SurfaceManager* surface_manager, |
| 33 cc::mojom::MojoCompositorFrameSinkClientPtr client) | 33 cc::mojom::MojoCompositorFrameSinkClientPtr client) |
| 34 : support_(this, surface_manager, frame_sink_id, nullptr), | 34 : support_(this, surface_manager, frame_sink_id, nullptr, nullptr), |
| 35 client_(std::move(client)) {} | 35 client_(std::move(client)) {} |
| 36 | 36 |
| 37 CompositorFrameSink::~CompositorFrameSink() {} | 37 CompositorFrameSink::~CompositorFrameSink() {} |
| 38 | 38 |
| 39 //////////////////////////////////////////////////////////////////////////////// | 39 //////////////////////////////////////////////////////////////////////////////// |
| 40 // cc::mojom::MojoCompositorFrameSink overrides: | 40 // cc::mojom::MojoCompositorFrameSink overrides: |
| 41 | 41 |
| 42 void CompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) { | 42 void CompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) { |
| 43 support_.SetNeedsBeginFrame(needs_begin_frame); | 43 support_.SetNeedsBeginFrame(needs_begin_frame); |
| 44 } | 44 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 if (client_) | 92 if (client_) |
| 93 client_->ReclaimResources(resources); | 93 client_->ReclaimResources(resources); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void CompositorFrameSink::WillDrawSurface() { | 96 void CompositorFrameSink::WillDrawSurface() { |
| 97 if (client_) | 97 if (client_) |
| 98 client_->WillDrawSurface(); | 98 client_->WillDrawSurface(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace exo | 101 } // namespace exo |
| OLD | NEW |