Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: services/ui/surfaces/gpu_compositor_frame_sink.h

Issue 2527443002: Display Compositor: Allocate LocalFrameId in client. (Closed)
Patch Set: Rebased + Restored BUILD files Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_ 5 #ifndef SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_
6 #define SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_ 6 #define SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 50 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
51 scoped_refptr<cc::InProcessContextProvider> context_provider, 51 scoped_refptr<cc::InProcessContextProvider> context_provider,
52 cc::mojom::MojoCompositorFrameSinkRequest request, 52 cc::mojom::MojoCompositorFrameSinkRequest request,
53 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, 53 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request,
54 cc::mojom::MojoCompositorFrameSinkClientPtr client); 54 cc::mojom::MojoCompositorFrameSinkClientPtr client);
55 55
56 ~GpuCompositorFrameSink() override; 56 ~GpuCompositorFrameSink() override;
57 57
58 // cc::mojom::MojoCompositorFrameSink: 58 // cc::mojom::MojoCompositorFrameSink:
59 void SetNeedsBeginFrame(bool needs_begin_frame) override; 59 void SetNeedsBeginFrame(bool needs_begin_frame) override;
60 void SubmitCompositorFrame(cc::CompositorFrame frame) override; 60 void SubmitCompositorFrame(const cc::LocalFrameId& local_frame_id,
61 cc::CompositorFrame frame) override;
61 62
62 // cc::mojom::MojoCompositorFrameSinkPrivate: 63 // cc::mojom::MojoCompositorFrameSinkPrivate:
63 void AddChildFrameSink(const cc::FrameSinkId& child_frame_sink_id) override; 64 void AddChildFrameSink(const cc::FrameSinkId& child_frame_sink_id) override;
64 void RemoveChildFrameSink( 65 void RemoveChildFrameSink(
65 const cc::FrameSinkId& child_frame_sink_id) override; 66 const cc::FrameSinkId& child_frame_sink_id) override;
66 67
67 private: 68 private:
68 void InitDisplay( 69 void InitDisplay(
69 gpu::SurfaceHandle widget, 70 gpu::SurfaceHandle widget,
70 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 71 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
(...skipping 19 matching lines...) Expand all
90 void UpdateNeedsBeginFramesInternal(); 91 void UpdateNeedsBeginFramesInternal();
91 92
92 void OnClientConnectionLost(); 93 void OnClientConnectionLost();
93 void OnPrivateConnectionLost(); 94 void OnPrivateConnectionLost();
94 95
95 const cc::FrameSinkId frame_sink_id_; 96 const cc::FrameSinkId frame_sink_id_;
96 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 97 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
97 98
98 DisplayCompositor* display_compositor_; // owns this. 99 DisplayCompositor* display_compositor_; // owns this.
99 100
100 gfx::Size last_submitted_frame_size_;
101 // GpuCompositorFrameSink holds a cc::Display if it created with 101 // GpuCompositorFrameSink holds a cc::Display if it created with
102 // non-null gpu::SurfaceHandle. In the window server, the display root 102 // non-null gpu::SurfaceHandle. In the window server, the display root
103 // window's CompositorFrameSink will have a valid gpu::SurfaceHandle. 103 // window's CompositorFrameSink will have a valid gpu::SurfaceHandle.
104 std::unique_ptr<cc::Display> display_; 104 std::unique_ptr<cc::Display> display_;
105 105
106 cc::LocalFrameId local_frame_id_; 106 cc::LocalFrameId local_frame_id_;
107 cc::SurfaceIdAllocator surface_id_allocator_;
108 cc::SurfaceFactory surface_factory_; 107 cc::SurfaceFactory surface_factory_;
109 // Counts the number of CompositorFrames that have been submitted and have not 108 // Counts the number of CompositorFrames that have been submitted and have not
110 // yet received an ACK. 109 // yet received an ACK.
111 int ack_pending_count_ = 0; 110 int ack_pending_count_ = 0;
112 cc::ReturnedResourceArray surface_returned_resources_; 111 cc::ReturnedResourceArray surface_returned_resources_;
113 112
114 bool client_connection_lost_ = false; 113 bool client_connection_lost_ = false;
115 bool private_connection_lost_ = false; 114 bool private_connection_lost_ = false;
116 115
117 // The begin frame source being observered. Null if none. 116 // The begin frame source being observered. Null if none.
(...skipping 11 matching lines...) Expand all
129 cc::mojom::MojoCompositorFrameSinkClientPtr client_; 128 cc::mojom::MojoCompositorFrameSinkClientPtr client_;
130 mojo::Binding<cc::mojom::MojoCompositorFrameSink> binding_; 129 mojo::Binding<cc::mojom::MojoCompositorFrameSink> binding_;
131 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> private_binding_; 130 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> private_binding_;
132 131
133 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); 132 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink);
134 }; 133 };
135 134
136 } // namespace ui 135 } // namespace ui
137 136
138 #endif // SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_ 137 #endif // SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_
OLDNEW
« no previous file with comments | « services/ui/public/cpp/window_compositor_frame_sink.cc ('k') | services/ui/surfaces/gpu_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698