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

Side by Side Diff: ui/aura/mus/window_port_mus.h

Issue 2875753002: Implement aura::WindowPortMus::CreateCompositorFrameSink() (Closed)
Patch Set: Address review issues. Created 3 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 UI_AURA_MUS_WINDOW_PORT_MUS_H_ 5 #ifndef UI_AURA_MUS_WINDOW_PORT_MUS_H_
6 #define UI_AURA_MUS_WINDOW_PORT_MUS_H_ 6 #define UI_AURA_MUS_WINDOW_PORT_MUS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 // Sets whether this window can accept drops, defaults to false. 70 // Sets whether this window can accept drops, defaults to false.
71 void SetCanAcceptDrops(bool can_accept_drops); 71 void SetCanAcceptDrops(bool can_accept_drops);
72 72
73 // Embeds a new client in this Window. See WindowTreeClient::Embed() for 73 // Embeds a new client in this Window. See WindowTreeClient::Embed() for
74 // details on arguments. 74 // details on arguments.
75 void Embed(ui::mojom::WindowTreeClientPtr client, 75 void Embed(ui::mojom::WindowTreeClientPtr client,
76 uint32_t flags, 76 uint32_t flags,
77 const ui::mojom::WindowTree::EmbedCallback& callback); 77 const ui::mojom::WindowTree::EmbedCallback& callback);
78 78
79 std::unique_ptr<cc::CompositorFrameSink> RequestCompositorFrameSink( 79 std::unique_ptr<cc::CompositorFrameSink>
80 CreateCompositorFrameSinkWithContextAndBufferManager(
80 scoped_refptr<cc::ContextProvider> context_provider, 81 scoped_refptr<cc::ContextProvider> context_provider,
81 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); 82 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager);
82 83
83 private: 84 private:
84 friend class WindowPortMusTestApi; 85 friend class WindowPortMusTestApi;
85 friend class WindowTreeClient; 86 friend class WindowTreeClient;
86 friend class WindowTreeClientPrivate; 87 friend class WindowTreeClientPrivate;
87 friend class WindowTreeHostMus; 88 friend class WindowTreeHostMus;
88 89
89 using ServerChangeIdType = uint8_t; 90 using ServerChangeIdType = uint8_t;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 const base::Optional<cc::LocalSurfaceId>& local_surface_id) override; 213 const base::Optional<cc::LocalSurfaceId>& local_surface_id) override;
213 void SetVisibleFromServer(bool visible) override; 214 void SetVisibleFromServer(bool visible) override;
214 void SetOpacityFromServer(float opacity) override; 215 void SetOpacityFromServer(float opacity) override;
215 void SetCursorFromServer(const ui::CursorData& cursor) override; 216 void SetCursorFromServer(const ui::CursorData& cursor) override;
216 void SetPropertyFromServer( 217 void SetPropertyFromServer(
217 const std::string& property_name, 218 const std::string& property_name,
218 const std::vector<uint8_t>* property_data) override; 219 const std::vector<uint8_t>* property_data) override;
219 void SetFrameSinkIdFromServer(const cc::FrameSinkId& frame_sink_id) override; 220 void SetFrameSinkIdFromServer(const cc::FrameSinkId& frame_sink_id) override;
220 const cc::LocalSurfaceId& GetOrAllocateLocalSurfaceId( 221 const cc::LocalSurfaceId& GetOrAllocateLocalSurfaceId(
221 const gfx::Size& surface_size) override; 222 const gfx::Size& surface_size) override;
222 void SetPrimarySurfaceInfo(const cc::SurfaceInfo& surface_info) override; 223 void SetSurfaceInfoFromServer(const cc::SurfaceInfo& surface_info) override;
223 void SetFallbackSurfaceInfo(const cc::SurfaceInfo& surface_info) override;
224 void DestroyFromServer() override; 224 void DestroyFromServer() override;
225 void AddTransientChildFromServer(WindowMus* child) override; 225 void AddTransientChildFromServer(WindowMus* child) override;
226 void RemoveTransientChildFromServer(WindowMus* child) override; 226 void RemoveTransientChildFromServer(WindowMus* child) override;
227 ChangeSource OnTransientChildAdded(WindowMus* child) override; 227 ChangeSource OnTransientChildAdded(WindowMus* child) override;
228 ChangeSource OnTransientChildRemoved(WindowMus* child) override; 228 ChangeSource OnTransientChildRemoved(WindowMus* child) override;
229 const cc::LocalSurfaceId& GetLocalSurfaceId() override; 229 const cc::LocalSurfaceId& GetLocalSurfaceId() override;
230 std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange( 230 std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange(
231 const gfx::Rect& bounds) override; 231 const gfx::Rect& bounds) override;
232 std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange( 232 std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange(
233 bool value) override; 233 bool value) override;
(...skipping 16 matching lines...) Expand all
250 void OnPropertyChanged(const void* key, 250 void OnPropertyChanged(const void* key,
251 int64_t old_value, 251 int64_t old_value,
252 std::unique_ptr<ui::PropertyData> data) override; 252 std::unique_ptr<ui::PropertyData> data) override;
253 std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink() override; 253 std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink() override;
254 cc::SurfaceId GetSurfaceId() const override; 254 cc::SurfaceId GetSurfaceId() const override;
255 void OnWindowAddedToRootWindow() override {} 255 void OnWindowAddedToRootWindow() override {}
256 void OnWillRemoveWindowFromRootWindow() override {} 256 void OnWillRemoveWindowFromRootWindow() override {}
257 257
258 void UpdatePrimarySurfaceInfo(); 258 void UpdatePrimarySurfaceInfo();
259 void UpdateClientSurfaceEmbedder(); 259 void UpdateClientSurfaceEmbedder();
260 void OnSurfaceChangedForLocalWindow(
261 const cc::LocalSurfaceId& local_surface_id,
262 const gfx::Size& size);
260 263
261 WindowTreeClient* window_tree_client_; 264 WindowTreeClient* window_tree_client_;
262 265
263 Window* window_ = nullptr; 266 Window* window_ = nullptr;
264 267
265 // Used when this window is embedding a client. 268 // Used when this window is embedding a client.
266 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder_; 269 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder_;
267 270
268 ServerChangeIdType next_server_change_id_ = 0; 271 ServerChangeIdType next_server_change_id_ = 0;
269 ServerChanges server_changes_; 272 ServerChanges server_changes_;
270 273
271 cc::FrameSinkId frame_sink_id_; 274 cc::FrameSinkId frame_sink_id_;
272 275
273 cc::SurfaceInfo primary_surface_info_; 276 cc::SurfaceInfo primary_surface_info_;
274 cc::SurfaceInfo fallback_surface_info_; 277 cc::SurfaceInfo fallback_surface_info_;
275 278
276 cc::LocalSurfaceId local_surface_id_; 279 cc::LocalSurfaceId local_surface_id_;
277 cc::LocalSurfaceIdAllocator local_surface_id_allocator_; 280 cc::LocalSurfaceIdAllocator local_surface_id_allocator_;
278 gfx::Size last_surface_size_; 281 gfx::Size last_surface_size_;
279 282
280 ui::CursorData cursor_; 283 ui::CursorData cursor_;
281 284
285 base::WeakPtrFactory<WindowPortMus> weak_factory_;
286
282 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); 287 DISALLOW_COPY_AND_ASSIGN(WindowPortMus);
283 }; 288 };
284 289
285 } // namespace aura 290 } // namespace aura
286 291
287 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ 292 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698