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

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

Issue 2576723002: Split cc::mojom::DisplayCompositor::CreateCompositorFrameSink() into CreateDisplayCompositorFrameSi… (Closed)
Patch Set: In DisplayCompositor::CreateDisplayCompositorFrameSink, let a local variable hold the result of Cre… Created 4 years 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
« no previous file with comments | « cc/ipc/display_compositor.mojom ('k') | services/ui/surfaces/display_compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DISPLAY_COMPOSITOR_H_ 5 #ifndef SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_
6 #define SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ 6 #define SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // compositor host and the client drop their connection to avoid getting into 76 // compositor host and the client drop their connection to avoid getting into
77 // a state where surfaces references are inconsistent. 77 // a state where surfaces references are inconsistent.
78 void OnCompositorFrameSinkClientConnectionLost( 78 void OnCompositorFrameSinkClientConnectionLost(
79 const cc::FrameSinkId& frame_sink_id, 79 const cc::FrameSinkId& frame_sink_id,
80 bool destroy_compositor_frame_sink); 80 bool destroy_compositor_frame_sink);
81 void OnCompositorFrameSinkPrivateConnectionLost( 81 void OnCompositorFrameSinkPrivateConnectionLost(
82 const cc::FrameSinkId& frame_sink_id, 82 const cc::FrameSinkId& frame_sink_id,
83 bool destroy_compositor_frame_sink); 83 bool destroy_compositor_frame_sink);
84 84
85 // cc::mojom::DisplayCompositor implementation: 85 // cc::mojom::DisplayCompositor implementation:
86 void CreateCompositorFrameSink( 86 void CreateDisplayCompositorFrameSink(
87 const cc::FrameSinkId& frame_sink_id, 87 const cc::FrameSinkId& frame_sink_id,
88 gpu::SurfaceHandle surface_handle, 88 gpu::SurfaceHandle surface_handle,
89 cc::mojom::MojoCompositorFrameSinkRequest request, 89 cc::mojom::MojoCompositorFrameSinkRequest request,
90 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, 90 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request,
91 cc::mojom::MojoCompositorFrameSinkClientPtr client) override; 91 cc::mojom::MojoCompositorFrameSinkClientPtr client) override;
92 void CreateOffscreenCompositorFrameSink(
93 const cc::FrameSinkId& frame_sink_id,
94 cc::mojom::MojoCompositorFrameSinkRequest request,
95 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request,
96 cc::mojom::MojoCompositorFrameSinkClientPtr client) override;
92 97
93 private: 98 private:
94 friend class test::DisplayCompositorTest; 99 friend class test::DisplayCompositorTest;
95 100
96 void AddSurfaceReference(const cc::SurfaceReference& ref); 101 void AddSurfaceReference(const cc::SurfaceReference& ref);
97 void RemoveSurfaceReference(const cc::SurfaceReference& ref); 102 void RemoveSurfaceReference(const cc::SurfaceReference& ref);
98 103
99 std::unique_ptr<cc::Display> CreateDisplay( 104 std::unique_ptr<cc::Display> CreateDisplay(
100 const cc::FrameSinkId& frame_sink_id, 105 const cc::FrameSinkId& frame_sink_id,
101 gpu::SurfaceHandle surface_handle, 106 gpu::SurfaceHandle surface_handle,
102 cc::SyntheticBeginFrameSource* begin_frame_source); 107 cc::SyntheticBeginFrameSource* begin_frame_source);
103 108
109 void CreateCompositorFrameSinkInternal(
110 const cc::FrameSinkId& frame_sink_id,
111 gpu::SurfaceHandle surface_handle,
112 std::unique_ptr<cc::Display> display,
113 std::unique_ptr<cc::SyntheticBeginFrameSource> begin_frame_source,
114 cc::mojom::MojoCompositorFrameSinkRequest request,
115 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request,
116 cc::mojom::MojoCompositorFrameSinkClientPtr client);
117
104 const cc::SurfaceId& GetRootSurfaceId() const; 118 const cc::SurfaceId& GetRootSurfaceId() const;
105 119
106 // cc::SurfaceObserver implementation. 120 // cc::SurfaceObserver implementation.
107 void OnSurfaceCreated(const cc::SurfaceId& surface_id, 121 void OnSurfaceCreated(const cc::SurfaceId& surface_id,
108 const gfx::Size& frame_size, 122 const gfx::Size& frame_size,
109 float device_scale_factor) override; 123 float device_scale_factor) override;
110 void OnSurfaceDamaged(const cc::SurfaceId& surface_id, 124 void OnSurfaceDamaged(const cc::SurfaceId& surface_id,
111 bool* changed) override; 125 bool* changed) override;
112 126
113 // SurfaceManager should be the first object constructed and the last object 127 // SurfaceManager should be the first object constructed and the last object
(...skipping 30 matching lines...) Expand all
144 158
145 cc::mojom::DisplayCompositorClientPtr client_; 159 cc::mojom::DisplayCompositorClientPtr client_;
146 mojo::Binding<cc::mojom::DisplayCompositor> binding_; 160 mojo::Binding<cc::mojom::DisplayCompositor> binding_;
147 161
148 DISALLOW_COPY_AND_ASSIGN(DisplayCompositor); 162 DISALLOW_COPY_AND_ASSIGN(DisplayCompositor);
149 }; 163 };
150 164
151 } // namespace ui 165 } // namespace ui
152 166
153 #endif // SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ 167 #endif // SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « cc/ipc/display_compositor.mojom ('k') | services/ui/surfaces/display_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698