| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 COMPONENTS_DISPLAY_COMPOSITOR_GPU_ROOT_COMPOSITOR_FRAME_SINK_H_ | 5 #ifndef COMPONENTS_DISPLAY_COMPOSITOR_GPU_ROOT_COMPOSITOR_FRAME_SINK_H_ |
| 6 #define COMPONENTS_DISPLAY_COMPOSITOR_GPU_ROOT_COMPOSITOR_FRAME_SINK_H_ | 6 #define COMPONENTS_DISPLAY_COMPOSITOR_GPU_ROOT_COMPOSITOR_FRAME_SINK_H_ |
| 7 | 7 |
| 8 #include "cc/ipc/display_compositor.mojom.h" | 8 #include "cc/ipc/display_compositor.mojom.h" |
| 9 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" | 9 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" |
| 10 #include "cc/surfaces/compositor_frame_sink_support_client.h" | 10 #include "cc/surfaces/compositor_frame_sink_support_client.h" |
| 11 #include "cc/surfaces/display_client.h" | 11 #include "cc/surfaces/display_client.h" |
| 12 #include "cc/surfaces/local_surface_id.h" |
| 13 #include "cc/surfaces/surface_id.h" |
| 12 #include "components/display_compositor/display_compositor_export.h" | 14 #include "components/display_compositor/display_compositor_export.h" |
| 13 #include "components/display_compositor/gpu_compositor_frame_sink_delegate.h" | 15 #include "components/display_compositor/gpu_compositor_frame_sink_delegate.h" |
| 14 #include "mojo/public/cpp/bindings/associated_binding.h" | 16 #include "mojo/public/cpp/bindings/associated_binding.h" |
| 15 #include "mojo/public/cpp/bindings/binding.h" | 17 #include "mojo/public/cpp/bindings/binding.h" |
| 16 | 18 |
| 17 namespace cc { | 19 namespace cc { |
| 18 class BeginFrameSource; | 20 class BeginFrameSource; |
| 19 class CompositorFrameSinkSupport; | 21 class CompositorFrameSinkSupport; |
| 20 class Display; | 22 class Display; |
| 21 class FrameSinkId; | |
| 22 class SurfaceManager; | 23 class SurfaceManager; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace display_compositor { | 26 namespace display_compositor { |
| 26 | 27 |
| 27 class GpuCompositorFrameSinkDelegate; | 28 class GpuCompositorFrameSinkDelegate; |
| 28 | 29 |
| 29 class DISPLAY_COMPOSITOR_EXPORT GpuRootCompositorFrameSink | 30 class DISPLAY_COMPOSITOR_EXPORT GpuRootCompositorFrameSink |
| 30 : public NON_EXPORTED_BASE(cc::CompositorFrameSinkSupportClient), | 31 : public NON_EXPORTED_BASE(cc::CompositorFrameSinkSupportClient), |
| 31 public NON_EXPORTED_BASE(cc::mojom::MojoCompositorFrameSink), | 32 public NON_EXPORTED_BASE(cc::mojom::MojoCompositorFrameSink), |
| (...skipping 22 matching lines...) Expand all Loading... |
| 54 void SetLocalSurfaceId(const cc::LocalSurfaceId& local_surface_id, | 55 void SetLocalSurfaceId(const cc::LocalSurfaceId& local_surface_id, |
| 55 float scale_factor) override; | 56 float scale_factor) override; |
| 56 | 57 |
| 57 // cc::mojom::MojoCompositorFrameSink: | 58 // cc::mojom::MojoCompositorFrameSink: |
| 58 void EvictFrame() override; | 59 void EvictFrame() override; |
| 59 void SetNeedsBeginFrame(bool needs_begin_frame) override; | 60 void SetNeedsBeginFrame(bool needs_begin_frame) override; |
| 60 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, | 61 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, |
| 61 cc::CompositorFrame frame) override; | 62 cc::CompositorFrame frame) override; |
| 62 | 63 |
| 63 // cc::mojom::MojoCompositorFrameSinkPrivate: | 64 // cc::mojom::MojoCompositorFrameSinkPrivate: |
| 65 void ClaimTemporaryReference(const cc::SurfaceId& surface_id) override; |
| 64 void RequestCopyOfSurface( | 66 void RequestCopyOfSurface( |
| 65 std::unique_ptr<cc::CopyOutputRequest> request) override; | 67 std::unique_ptr<cc::CopyOutputRequest> request) override; |
| 66 | 68 |
| 67 private: | 69 private: |
| 68 // cc::DisplayClient: | 70 // cc::DisplayClient: |
| 69 void DisplayOutputSurfaceLost() override; | 71 void DisplayOutputSurfaceLost() override; |
| 70 void DisplayWillDrawAndSwap(bool will_draw_and_swap, | 72 void DisplayWillDrawAndSwap(bool will_draw_and_swap, |
| 71 const cc::RenderPassList& render_passes) override; | 73 const cc::RenderPassList& render_passes) override; |
| 72 void DisplayDidDrawAndSwap() override; | 74 void DisplayDidDrawAndSwap() override; |
| 73 | 75 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 98 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> | 100 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> |
| 99 compositor_frame_sink_private_binding_; | 101 compositor_frame_sink_private_binding_; |
| 100 mojo::AssociatedBinding<cc::mojom::DisplayPrivate> display_private_binding_; | 102 mojo::AssociatedBinding<cc::mojom::DisplayPrivate> display_private_binding_; |
| 101 | 103 |
| 102 DISALLOW_COPY_AND_ASSIGN(GpuRootCompositorFrameSink); | 104 DISALLOW_COPY_AND_ASSIGN(GpuRootCompositorFrameSink); |
| 103 }; | 105 }; |
| 104 | 106 |
| 105 } // namespace display_compositor | 107 } // namespace display_compositor |
| 106 | 108 |
| 107 #endif // COMPONENTS_DISPLAY_COMPOSITOR_GPU_ROOT_COMPOSITOR_FRAME_SINK_H_ | 109 #endif // COMPONENTS_DISPLAY_COMPOSITOR_GPU_ROOT_COMPOSITOR_FRAME_SINK_H_ |
| OLD | NEW |