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_VIZ_FRAME_SINKS_GPU_ROOT_COMPOSITOR_FRAME_SINK_H_ | 5 #ifndef COMPONENTS_VIZ_FRAME_SINKS_GPU_ROOT_COMPOSITOR_FRAME_SINK_H_ |
6 #define COMPONENTS_VIZ_FRAME_SINKS_GPU_ROOT_COMPOSITOR_FRAME_SINK_H_ | 6 #define COMPONENTS_VIZ_FRAME_SINKS_GPU_ROOT_COMPOSITOR_FRAME_SINK_H_ |
7 | 7 |
8 #include "cc/ipc/frame_sink_manager.mojom.h" | 8 #include "cc/ipc/frame_sink_manager.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" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 const cc::RenderPassList& render_passes) override; | 73 const cc::RenderPassList& render_passes) override; |
74 void DisplayDidDrawAndSwap() override; | 74 void DisplayDidDrawAndSwap() override; |
75 | 75 |
76 // cc::CompositorFrameSinkSupportClient: | 76 // cc::CompositorFrameSinkSupportClient: |
77 void DidReceiveCompositorFrameAck( | 77 void DidReceiveCompositorFrameAck( |
78 const cc::ReturnedResourceArray& resources) override; | 78 const cc::ReturnedResourceArray& resources) override; |
79 void OnBeginFrame(const cc::BeginFrameArgs& args) override; | 79 void OnBeginFrame(const cc::BeginFrameArgs& args) override; |
80 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; | 80 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; |
81 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id, | 81 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id, |
82 const gfx::Rect& damage_rect) override; | 82 const gfx::Rect& damage_rect) override; |
| 83 void DidRejectCompositorFrame() override; |
83 | 84 |
84 void OnClientConnectionLost(); | 85 void OnClientConnectionLost(); |
85 void OnPrivateConnectionLost(); | 86 void OnPrivateConnectionLost(); |
86 | 87 |
87 GpuCompositorFrameSinkDelegate* const delegate_; | 88 GpuCompositorFrameSinkDelegate* const delegate_; |
88 std::unique_ptr<cc::CompositorFrameSinkSupport> support_; | 89 std::unique_ptr<cc::CompositorFrameSinkSupport> support_; |
89 | 90 |
90 // GpuRootCompositorFrameSink holds a Display and its BeginFrameSource if | 91 // GpuRootCompositorFrameSink holds a Display and its BeginFrameSource if |
91 // it was created with a non-null gpu::SurfaceHandle. | 92 // it was created with a non-null gpu::SurfaceHandle. |
92 std::unique_ptr<cc::BeginFrameSource> display_begin_frame_source_; | 93 std::unique_ptr<cc::BeginFrameSource> display_begin_frame_source_; |
93 std::unique_ptr<cc::Display> display_; | 94 std::unique_ptr<cc::Display> display_; |
94 | 95 |
95 bool client_connection_lost_ = false; | 96 bool client_connection_lost_ = false; |
96 bool private_connection_lost_ = false; | 97 bool private_connection_lost_ = false; |
97 | 98 |
98 cc::mojom::MojoCompositorFrameSinkClientPtr client_; | 99 cc::mojom::MojoCompositorFrameSinkClientPtr client_; |
99 mojo::AssociatedBinding<cc::mojom::MojoCompositorFrameSink> | 100 mojo::AssociatedBinding<cc::mojom::MojoCompositorFrameSink> |
100 compositor_frame_sink_binding_; | 101 compositor_frame_sink_binding_; |
101 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> | 102 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> |
102 compositor_frame_sink_private_binding_; | 103 compositor_frame_sink_private_binding_; |
103 mojo::AssociatedBinding<cc::mojom::DisplayPrivate> display_private_binding_; | 104 mojo::AssociatedBinding<cc::mojom::DisplayPrivate> display_private_binding_; |
104 | 105 |
105 DISALLOW_COPY_AND_ASSIGN(GpuRootCompositorFrameSink); | 106 DISALLOW_COPY_AND_ASSIGN(GpuRootCompositorFrameSink); |
106 }; | 107 }; |
107 | 108 |
108 } // namespace viz | 109 } // namespace viz |
109 | 110 |
110 #endif // COMPONENTS_VIZ_FRAME_SINKS_GPU_ROOT_COMPOSITOR_FRAME_SINK_H_ | 111 #endif // COMPONENTS_VIZ_FRAME_SINKS_GPU_ROOT_COMPOSITOR_FRAME_SINK_H_ |
OLD | NEW |