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