OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PUBLIC_CPP_WINDOW_COMPOSITOR_FRAME_SINK_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_COMPOSITOR_FRAME_SINK_H_ |
6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_COMPOSITOR_FRAME_SINK_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_COMPOSITOR_FRAME_SINK_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" | 9 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" |
10 #include "cc/output/compositor_frame_sink.h" | 10 #include "cc/output/compositor_frame_sink.h" |
11 #include "cc/output/context_provider.h" | 11 #include "cc/output/context_provider.h" |
12 #include "cc/scheduler/begin_frame_source.h" | 12 #include "cc/scheduler/begin_frame_source.h" |
| 13 #include "cc/surfaces/local_surface_id_allocator.h" |
13 #include "cc/surfaces/surface_id.h" | 14 #include "cc/surfaces/surface_id.h" |
14 #include "cc/surfaces/surface_id_allocator.h" | |
15 #include "mojo/public/cpp/bindings/binding.h" | 15 #include "mojo/public/cpp/bindings/binding.h" |
16 | 16 |
17 namespace ui { | 17 namespace ui { |
18 | 18 |
19 class WindowCompositorFrameSinkBinding; | 19 class WindowCompositorFrameSinkBinding; |
20 | 20 |
21 class WindowCompositorFrameSink | 21 class WindowCompositorFrameSink |
22 : public cc::CompositorFrameSink, | 22 : public cc::CompositorFrameSink, |
23 public cc::mojom::MojoCompositorFrameSinkClient, | 23 public cc::mojom::MojoCompositorFrameSinkClient, |
24 public cc::ExternalBeginFrameSourceClient { | 24 public cc::ExternalBeginFrameSourceClient { |
(...skipping 26 matching lines...) Expand all Loading... |
51 void OnBeginFrame(const cc::BeginFrameArgs& begin_frame_args) override; | 51 void OnBeginFrame(const cc::BeginFrameArgs& begin_frame_args) override; |
52 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; | 52 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; |
53 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id, | 53 void WillDrawSurface(const cc::LocalSurfaceId& local_surface_id, |
54 const gfx::Rect& damage_rect) override; | 54 const gfx::Rect& damage_rect) override; |
55 | 55 |
56 // cc::ExternalBeginFrameSourceClient implementation. | 56 // cc::ExternalBeginFrameSourceClient implementation. |
57 void OnNeedsBeginFrames(bool needs_begin_frames) override; | 57 void OnNeedsBeginFrames(bool needs_begin_frames) override; |
58 | 58 |
59 gfx::Size last_submitted_frame_size_; | 59 gfx::Size last_submitted_frame_size_; |
60 cc::LocalSurfaceId local_surface_id_; | 60 cc::LocalSurfaceId local_surface_id_; |
61 cc::SurfaceIdAllocator id_allocator_; | 61 cc::LocalSurfaceIdAllocator id_allocator_; |
62 std::unique_ptr<cc::ExternalBeginFrameSource> begin_frame_source_; | 62 std::unique_ptr<cc::ExternalBeginFrameSource> begin_frame_source_; |
63 cc::mojom::MojoCompositorFrameSinkPtrInfo compositor_frame_sink_info_; | 63 cc::mojom::MojoCompositorFrameSinkPtrInfo compositor_frame_sink_info_; |
64 cc::mojom::MojoCompositorFrameSinkClientRequest client_request_; | 64 cc::mojom::MojoCompositorFrameSinkClientRequest client_request_; |
65 cc::mojom::MojoCompositorFrameSinkPtr compositor_frame_sink_; | 65 cc::mojom::MojoCompositorFrameSinkPtr compositor_frame_sink_; |
66 std::unique_ptr<mojo::Binding<cc::mojom::MojoCompositorFrameSinkClient>> | 66 std::unique_ptr<mojo::Binding<cc::mojom::MojoCompositorFrameSinkClient>> |
67 client_binding_; | 67 client_binding_; |
68 std::unique_ptr<base::ThreadChecker> thread_checker_; | 68 std::unique_ptr<base::ThreadChecker> thread_checker_; |
69 const cc::FrameSinkId frame_sink_id_; | 69 const cc::FrameSinkId frame_sink_id_; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(WindowCompositorFrameSink); | 71 DISALLOW_COPY_AND_ASSIGN(WindowCompositorFrameSink); |
(...skipping 21 matching lines...) Expand all Loading... |
93 compositor_frame_sink_client); | 93 compositor_frame_sink_client); |
94 | 94 |
95 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink_request_; | 95 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink_request_; |
96 cc::mojom::MojoCompositorFrameSinkClientPtrInfo compositor_frame_sink_client_; | 96 cc::mojom::MojoCompositorFrameSinkClientPtrInfo compositor_frame_sink_client_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(WindowCompositorFrameSinkBinding); | 98 DISALLOW_COPY_AND_ASSIGN(WindowCompositorFrameSinkBinding); |
99 }; | 99 }; |
100 } // namespace ui | 100 } // namespace ui |
101 | 101 |
102 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_COMPOSITOR_FRAME_SINK_H_ | 102 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_COMPOSITOR_FRAME_SINK_H_ |
OLD | NEW |