| 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> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "cc/ipc/compositor_frame.mojom.h" | 14 #include "cc/ipc/compositor_frame.mojom.h" |
| 15 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" | 15 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" |
| 16 #include "cc/output/context_provider.h" | 16 #include "cc/output/context_provider.h" |
| 17 #include "cc/output/in_process_context_provider.h" | 17 #include "cc/output/in_process_context_provider.h" |
| 18 #include "cc/scheduler/begin_frame_source.h" | 18 #include "cc/scheduler/begin_frame_source.h" |
| 19 #include "cc/surfaces/display.h" | 19 #include "cc/surfaces/display.h" |
| 20 #include "cc/surfaces/display_client.h" | 20 #include "cc/surfaces/display_client.h" |
| 21 #include "cc/surfaces/frame_sink_id.h" | 21 #include "cc/surfaces/frame_sink_id.h" |
| 22 #include "cc/surfaces/surface_factory.h" | 22 #include "cc/surfaces/surface_factory.h" |
| 23 #include "cc/surfaces/surface_factory_client.h" | 23 #include "cc/surfaces/surface_factory_client.h" |
| 24 #include "cc/surfaces/surface_id.h" | 24 #include "cc/surfaces/surface_id.h" |
| 25 #include "cc/surfaces/surface_id_allocator.h" | 25 #include "cc/surfaces/surface_id_allocator.h" |
| 26 #include "cc/surfaces/surface_reference.h" |
| 26 #include "mojo/public/cpp/bindings/binding.h" | 27 #include "mojo/public/cpp/bindings/binding.h" |
| 27 | 28 |
| 28 namespace base { | 29 namespace base { |
| 29 class SingleThreadTaskRunner; | 30 class SingleThreadTaskRunner; |
| 30 } | 31 } |
| 31 | 32 |
| 32 namespace gpu { | 33 namespace gpu { |
| 33 class GpuMemoryBufferManager; | 34 class GpuMemoryBufferManager; |
| 34 } | 35 } |
| 35 | 36 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 53 cc::mojom::MojoCompositorFrameSinkRequest request, | 54 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 54 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, | 55 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, |
| 55 cc::mojom::MojoCompositorFrameSinkClientPtr client); | 56 cc::mojom::MojoCompositorFrameSinkClientPtr client); |
| 56 | 57 |
| 57 ~GpuCompositorFrameSink() override; | 58 ~GpuCompositorFrameSink() override; |
| 58 | 59 |
| 59 // cc::mojom::MojoCompositorFrameSink: | 60 // cc::mojom::MojoCompositorFrameSink: |
| 60 void SetNeedsBeginFrame(bool needs_begin_frame) override; | 61 void SetNeedsBeginFrame(bool needs_begin_frame) override; |
| 61 void SubmitCompositorFrame(const cc::LocalFrameId& local_frame_id, | 62 void SubmitCompositorFrame(const cc::LocalFrameId& local_frame_id, |
| 62 cc::CompositorFrame frame) override; | 63 cc::CompositorFrame frame) override; |
| 64 void AddSurfaceReferences( |
| 65 const std::vector<cc::SurfaceReference>& references) override; |
| 66 void RemoveSurfaceReferences( |
| 67 const std::vector<cc::SurfaceReference>& references) override; |
| 63 | 68 |
| 64 // cc::mojom::MojoCompositorFrameSinkPrivate: | 69 // cc::mojom::MojoCompositorFrameSinkPrivate: |
| 65 void AddChildFrameSink(const cc::FrameSinkId& child_frame_sink_id) override; | 70 void AddChildFrameSink(const cc::FrameSinkId& child_frame_sink_id) override; |
| 66 void RemoveChildFrameSink( | 71 void RemoveChildFrameSink( |
| 67 const cc::FrameSinkId& child_frame_sink_id) override; | 72 const cc::FrameSinkId& child_frame_sink_id) override; |
| 68 | 73 |
| 69 private: | 74 private: |
| 70 void InitDisplay( | 75 void InitDisplay( |
| 71 gpu::SurfaceHandle widget, | 76 gpu::SurfaceHandle widget, |
| 72 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 77 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> private_binding_; | 136 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> private_binding_; |
| 132 | 137 |
| 133 base::WeakPtrFactory<GpuCompositorFrameSink> weak_factory_; | 138 base::WeakPtrFactory<GpuCompositorFrameSink> weak_factory_; |
| 134 | 139 |
| 135 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); | 140 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); |
| 136 }; | 141 }; |
| 137 | 142 |
| 138 } // namespace ui | 143 } // namespace ui |
| 139 | 144 |
| 140 #endif // SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_ | 145 #endif // SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_ |
| OLD | NEW |