| 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 COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ | 5 #ifndef COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ |
| 6 #define COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ | 6 #define COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "cc/ipc/display_compositor.mojom.h" | 13 #include "cc/ipc/display_compositor.mojom.h" |
| 14 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" | 14 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" |
| 15 #include "cc/surfaces/compositor_frame_sink_support.h" | 15 #include "cc/surfaces/compositor_frame_sink_support.h" |
| 16 #include "cc/surfaces/compositor_frame_sink_support_client.h" | 16 #include "cc/surfaces/compositor_frame_sink_support_client.h" |
| 17 #include "cc/surfaces/frame_sink_id.h" |
| 18 #include "cc/surfaces/local_surface_id.h" |
| 19 #include "cc/surfaces/surface_id.h" |
| 17 #include "components/display_compositor/display_compositor_export.h" | 20 #include "components/display_compositor/display_compositor_export.h" |
| 18 #include "components/display_compositor/gpu_compositor_frame_sink_delegate.h" | 21 #include "components/display_compositor/gpu_compositor_frame_sink_delegate.h" |
| 19 #include "mojo/public/cpp/bindings/binding.h" | 22 #include "mojo/public/cpp/bindings/binding.h" |
| 20 | 23 |
| 21 namespace display_compositor { | 24 namespace display_compositor { |
| 22 | 25 |
| 23 // Server side representation of a WindowSurface. | 26 // Server side representation of a WindowSurface. |
| 24 class DISPLAY_COMPOSITOR_EXPORT GpuCompositorFrameSink | 27 class DISPLAY_COMPOSITOR_EXPORT GpuCompositorFrameSink |
| 25 : public NON_EXPORTED_BASE(cc::CompositorFrameSinkSupportClient), | 28 : public NON_EXPORTED_BASE(cc::CompositorFrameSinkSupportClient), |
| 26 public NON_EXPORTED_BASE(cc::mojom::MojoCompositorFrameSink), | 29 public NON_EXPORTED_BASE(cc::mojom::MojoCompositorFrameSink), |
| (...skipping 15 matching lines...) Expand all Loading... |
| 42 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, | 45 void SubmitCompositorFrame(const cc::LocalSurfaceId& local_surface_id, |
| 43 cc::CompositorFrame frame) override; | 46 cc::CompositorFrame frame) override; |
| 44 void Require(const cc::LocalSurfaceId& local_surface_id, | 47 void Require(const cc::LocalSurfaceId& local_surface_id, |
| 45 const cc::SurfaceSequence& sequence) override; | 48 const cc::SurfaceSequence& sequence) override; |
| 46 void Satisfy(const cc::SurfaceSequence& sequence) override; | 49 void Satisfy(const cc::SurfaceSequence& sequence) override; |
| 47 | 50 |
| 48 // cc::mojom::MojoCompositorFrameSinkPrivate: | 51 // cc::mojom::MojoCompositorFrameSinkPrivate: |
| 49 void AddChildFrameSink(const cc::FrameSinkId& child_frame_sink_id) override; | 52 void AddChildFrameSink(const cc::FrameSinkId& child_frame_sink_id) override; |
| 50 void RemoveChildFrameSink( | 53 void RemoveChildFrameSink( |
| 51 const cc::FrameSinkId& child_frame_sink_id) override; | 54 const cc::FrameSinkId& child_frame_sink_id) override; |
| 55 void ClaimTemporaryReference(const cc::SurfaceId& surface_id) override; |
| 52 void RequestCopyOfSurface( | 56 void RequestCopyOfSurface( |
| 53 std::unique_ptr<cc::CopyOutputRequest> request) override; | 57 std::unique_ptr<cc::CopyOutputRequest> request) override; |
| 54 | 58 |
| 55 private: | 59 private: |
| 56 // cc::CompositorFrameSinkSupportClient implementation: | 60 // cc::CompositorFrameSinkSupportClient implementation: |
| 57 void DidReceiveCompositorFrameAck() override; | 61 void DidReceiveCompositorFrameAck() override; |
| 58 void OnBeginFrame(const cc::BeginFrameArgs& args) override; | 62 void OnBeginFrame(const cc::BeginFrameArgs& args) override; |
| 59 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; | 63 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; |
| 60 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id, | 64 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id, |
| 61 const gfx::Rect& damage_rect) override; | 65 const gfx::Rect& damage_rect) override; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 74 compositor_frame_sink_binding_; | 78 compositor_frame_sink_binding_; |
| 75 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> | 79 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> |
| 76 compositor_frame_sink_private_binding_; | 80 compositor_frame_sink_private_binding_; |
| 77 | 81 |
| 78 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); | 82 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); |
| 79 }; | 83 }; |
| 80 | 84 |
| 81 } // namespace display_compositor | 85 } // namespace display_compositor |
| 82 | 86 |
| 83 #endif // COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ | 87 #endif // COMPONENTS_DISPLAY_COMPOSITOR_GPU_COMPOSITOR_FRAME_SINK_H_ |
| OLD | NEW |