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

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

Issue 2612083002: DirectCompositorFrameSink Uses CompositorFrameSinkSupport (Closed)
Patch Set: Addressed comments Created 3 years, 10 months 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 <vector> 9 #include <vector>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 DisplayCompositor* const display_compositor_; 62 DisplayCompositor* const display_compositor_;
63 cc::CompositorFrameSinkSupport support_; 63 cc::CompositorFrameSinkSupport support_;
64 64
65 private: 65 private:
66 // cc::CompositorFrameSinkSupportClient implementation: 66 // cc::CompositorFrameSinkSupportClient implementation:
67 void DidReceiveCompositorFrameAck() override; 67 void DidReceiveCompositorFrameAck() override;
68 void OnBeginFrame(const cc::BeginFrameArgs& args) override; 68 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
69 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; 69 void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
70 void WillDrawSurface() override; 70 void WillDrawSurface() override;
71 71
72 // GpuCompositorFrameSink holds a Display and its BeginFrameSource if it
73 // created with non-null gpu::SurfaceHandle. In the window server, the display
74 // root window's CompositorFrameSink will have a valid gpu::SurfaceHandle.
75 std::unique_ptr<cc::Display> display_;
76 std::unique_ptr<cc::BeginFrameSource> display_begin_frame_source_;
77
72 // Track the surface references for the surface corresponding to this 78 // Track the surface references for the surface corresponding to this
73 // compositor frame sink. 79 // compositor frame sink.
74 cc::ReferencedSurfaceTracker surface_tracker_; 80 cc::ReferencedSurfaceTracker surface_tracker_;
75 81
76 bool client_connection_lost_ = false; 82 bool client_connection_lost_ = false;
77 bool private_connection_lost_ = false; 83 bool private_connection_lost_ = false;
78 84
79 cc::mojom::MojoCompositorFrameSinkClientPtr client_; 85 cc::mojom::MojoCompositorFrameSinkClientPtr client_;
80 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate> 86 mojo::Binding<cc::mojom::MojoCompositorFrameSinkPrivate>
81 compositor_frame_sink_private_binding_; 87 compositor_frame_sink_private_binding_;
82 88
83 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink); 89 DISALLOW_COPY_AND_ASSIGN(GpuCompositorFrameSink);
84 }; 90 };
85 91
86 } // namespace ui 92 } // namespace ui
87 93
88 #endif // SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_ 94 #endif // SERVICES_UI_SURFACES_GPU_COMPOSITOR_FRAME_SINK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698