| 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_WS_GPU_COMPOSITOR_FRAME_SINK_H_ | 5 #ifndef SERVICES_UI_WS_GPU_COMPOSITOR_FRAME_SINK_H_ |
| 6 #define SERVICES_UI_WS_GPU_COMPOSITOR_FRAME_SINK_H_ | 6 #define SERVICES_UI_WS_GPU_COMPOSITOR_FRAME_SINK_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // TODO(fsamuel): DisplayCompositor should own | 48 // TODO(fsamuel): DisplayCompositor should own |
| 49 // GpuCompositorFrameSink. GpuCompositorFrameSink should not | 49 // GpuCompositorFrameSink. GpuCompositorFrameSink should not |
| 50 // refer to GpuCompositorFrameSinkManager. | 50 // refer to GpuCompositorFrameSinkManager. |
| 51 GpuCompositorFrameSink( | 51 GpuCompositorFrameSink( |
| 52 scoped_refptr<DisplayCompositor> display_compositor, | 52 scoped_refptr<DisplayCompositor> display_compositor, |
| 53 const cc::FrameSinkId& frame_sink_id, | 53 const cc::FrameSinkId& frame_sink_id, |
| 54 gfx::AcceleratedWidget widget, | 54 gfx::AcceleratedWidget widget, |
| 55 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 55 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 56 scoped_refptr<SurfacesContextProvider> context_provider, | 56 scoped_refptr<SurfacesContextProvider> context_provider, |
| 57 cc::mojom::MojoCompositorFrameSinkRequest request, | 57 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 58 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, |
| 58 cc::mojom::MojoCompositorFrameSinkClientPtr client); | 59 cc::mojom::MojoCompositorFrameSinkClientPtr client); |
| 59 | 60 |
| 60 ~GpuCompositorFrameSink() override; | 61 ~GpuCompositorFrameSink() override; |
| 61 | 62 |
| 62 // cc::mojom::MojoCompositorFrameSink: | 63 // cc::mojom::MojoCompositorFrameSink: |
| 63 void SetNeedsBeginFrame(bool needs_begin_frame) override; | 64 void SetNeedsBeginFrame(bool needs_begin_frame) override; |
| 64 void SubmitCompositorFrame(cc::CompositorFrame frame) override; | 65 void SubmitCompositorFrame(cc::CompositorFrame frame) override; |
| 65 | 66 |
| 66 // cc::mojom::MojoCompositorFrameSinkPrivate: | 67 // cc::mojom::MojoCompositorFrameSinkPrivate: |
| 67 void AddChildFrameSink(const cc::FrameSinkId& child_frame_sink_id) override; | 68 void AddChildFrameSink(const cc::FrameSinkId& child_frame_sink_id) override; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 cc::BeginFrameArgs last_begin_frame_args_; | 122 cc::BeginFrameArgs last_begin_frame_args_; |
| 122 | 123 |
| 123 // Whether a request for begin frames has been issued. | 124 // Whether a request for begin frames has been issued. |
| 124 bool needs_begin_frame_ = false; | 125 bool needs_begin_frame_ = false; |
| 125 | 126 |
| 126 // Whether or not a frame observer has been added. | 127 // Whether or not a frame observer has been added. |
| 127 bool added_frame_observer_ = false; | 128 bool added_frame_observer_ = false; |
| 128 | 129 |
| 129 cc::mojom::MojoCompositorFrameSinkClientPtr client_; | 130 cc::mojom::MojoCompositorFrameSinkClientPtr client_; |
| 130 mojo::Binding<cc::mojom::MojoCompositorFrameSink> binding_; | 131 mojo::Binding<cc::mojom::MojoCompositorFrameSink> binding_; |
| 132 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> private_binding_; |
| 131 | 133 |
| 132 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); | 134 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); |
| 133 }; | 135 }; |
| 134 | 136 |
| 135 } // namespace ws | 137 } // namespace ws |
| 136 | 138 |
| 137 } // namespace ui | 139 } // namespace ui |
| 138 | 140 |
| 139 #endif // SERVICES_UI_WS_GPU_COMPOSITOR_FRAME_SINK_H_ | 141 #endif // SERVICES_UI_WS_GPU_COMPOSITOR_FRAME_SINK_H_ |
| OLD | NEW |