Chromium Code Reviews| 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 "components/exo/compositor_frame_sink_holder.h" |
| 11 #include "mojo/public/cpp/bindings/strong_binding.h" | 11 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 12 | 12 |
| 13 namespace exo { | 13 namespace exo { |
| 14 | 14 |
| 15 //////////////////////////////////////////////////////////////////////////////// | 15 //////////////////////////////////////////////////////////////////////////////// |
| 16 // ExoComopositorFrameSink, public: | 16 // ExoComopositorFrameSink, public: |
| 17 | 17 |
| 18 CompositorFrameSink::CompositorFrameSink(const cc::FrameSinkId& frame_sink_id, | 18 CompositorFrameSink::CompositorFrameSink(const cc::FrameSinkId& frame_sink_id, |
| 19 cc::SurfaceManager* surface_manager, | 19 cc::SurfaceManager* surface_manager, |
| 20 CompositorFrameSinkHolder* client) | 20 CompositorFrameSinkHolder* client) |
| 21 : support_(this, surface_manager, frame_sink_id, nullptr, nullptr), | 21 : support_(this, surface_manager, frame_sink_id, nullptr), |
| 22 client_(client) {} | 22 client_(client) {} |
| 23 | 23 |
| 24 CompositorFrameSink::~CompositorFrameSink() {} | 24 CompositorFrameSink::~CompositorFrameSink() { |
| 25 support_.InvalidateFrameSinkId(); | |
|
Fady Samuel
2017/01/23 21:56:12
Why is this necessary? support should do this auto
| |
| 26 } | |
| 25 | 27 |
| 26 //////////////////////////////////////////////////////////////////////////////// | 28 //////////////////////////////////////////////////////////////////////////////// |
| 27 // cc::mojom::MojoCompositorFrameSink overrides: | 29 // cc::mojom::MojoCompositorFrameSink overrides: |
| 28 | 30 |
| 29 void CompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) { | 31 void CompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) { |
| 30 support_.SetNeedsBeginFrame(needs_begin_frame); | 32 support_.SetNeedsBeginFrame(needs_begin_frame); |
| 31 } | 33 } |
| 32 | 34 |
| 33 void CompositorFrameSink::SubmitCompositorFrame( | 35 void CompositorFrameSink::SubmitCompositorFrame( |
| 34 const cc::LocalFrameId& local_frame_id, | 36 const cc::LocalFrameId& local_frame_id, |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 63 void CompositorFrameSink::ReclaimResources( | 65 void CompositorFrameSink::ReclaimResources( |
| 64 const cc::ReturnedResourceArray& resources) { | 66 const cc::ReturnedResourceArray& resources) { |
| 65 client_->ReclaimResources(resources); | 67 client_->ReclaimResources(resources); |
| 66 } | 68 } |
| 67 | 69 |
| 68 void CompositorFrameSink::WillDrawSurface() { | 70 void CompositorFrameSink::WillDrawSurface() { |
| 69 client_->WillDrawSurface(); | 71 client_->WillDrawSurface(); |
| 70 } | 72 } |
| 71 | 73 |
| 72 } // namespace exo | 74 } // namespace exo |
| OLD | NEW |