| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_ | 5 #ifndef SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_ |
| 6 #define SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_ | 6 #define SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 #include <vector> |
| 10 |
| 8 #include "base/macros.h" | 11 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 10 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" | 13 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" |
| 11 #include "cc/surfaces/compositor_frame_sink_support.h" | 14 #include "cc/surfaces/compositor_frame_sink_support.h" |
| 12 #include "cc/surfaces/compositor_frame_sink_support_client.h" | 15 #include "cc/surfaces/compositor_frame_sink_support_client.h" |
| 13 #include "mojo/public/cpp/bindings/binding.h" | 16 #include "mojo/public/cpp/bindings/binding.h" |
| 14 | 17 |
| 15 namespace cc { | 18 namespace cc { |
| 16 class Display; | 19 class Display; |
| 17 } | 20 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 34 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, | 37 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, |
| 35 cc::mojom::MojoCompositorFrameSinkClientPtr client); | 38 cc::mojom::MojoCompositorFrameSinkClientPtr client); |
| 36 | 39 |
| 37 ~GpuCompositorFrameSink() override; | 40 ~GpuCompositorFrameSink() override; |
| 38 | 41 |
| 39 // cc::mojom::MojoCompositorFrameSink: | 42 // cc::mojom::MojoCompositorFrameSink: |
| 40 void EvictFrame() override; | 43 void EvictFrame() override; |
| 41 void SetNeedsBeginFrame(bool needs_begin_frame) override; | 44 void SetNeedsBeginFrame(bool needs_begin_frame) override; |
| 42 void SubmitCompositorFrame(const cc::LocalFrameId& local_frame_id, | 45 void SubmitCompositorFrame(const cc::LocalFrameId& local_frame_id, |
| 43 cc::CompositorFrame frame) override; | 46 cc::CompositorFrame frame) override; |
| 47 void AddSurfaceReferences( |
| 48 const std::vector<cc::SurfaceReference>& references) override; |
| 49 void RemoveSurfaceReferences( |
| 50 const std::vector<cc::SurfaceReference>& references) override; |
| 44 | 51 |
| 45 // cc::mojom::MojoCompositorFrameSinkPrivate: | 52 // cc::mojom::MojoCompositorFrameSinkPrivate: |
| 46 void AddChildFrameSink(const cc::FrameSinkId& child_frame_sink_id) override; | 53 void AddChildFrameSink(const cc::FrameSinkId& child_frame_sink_id) override; |
| 47 void RemoveChildFrameSink( | 54 void RemoveChildFrameSink( |
| 48 const cc::FrameSinkId& child_frame_sink_id) override; | 55 const cc::FrameSinkId& child_frame_sink_id) override; |
| 49 | 56 |
| 50 private: | 57 private: |
| 51 // cc::CompositorFrameSinkSupportClient implementation: | 58 // cc::CompositorFrameSinkSupportClient implementation: |
| 52 void DidReceiveCompositorFrameAck() override; | 59 void DidReceiveCompositorFrameAck() override; |
| 53 void OnBeginFrame(const cc::BeginFrameArgs& args) override; | 60 void OnBeginFrame(const cc::BeginFrameArgs& args) override; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 67 cc::mojom::MojoCompositorFrameSinkClientPtr client_; | 74 cc::mojom::MojoCompositorFrameSinkClientPtr client_; |
| 68 mojo::Binding<cc::mojom::MojoCompositorFrameSink> binding_; | 75 mojo::Binding<cc::mojom::MojoCompositorFrameSink> binding_; |
| 69 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> private_binding_; | 76 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> private_binding_; |
| 70 | 77 |
| 71 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); | 78 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); |
| 72 }; | 79 }; |
| 73 | 80 |
| 74 } // namespace ui | 81 } // namespace ui |
| 75 | 82 |
| 76 #endif // SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_ | 83 #endif // SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_ |
| OLD | NEW |