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

Side by Side Diff: services/ui/ws/server_window_compositor_frame_sink_manager.h

Issue 2478383002: Remove SurfaceSequence from mus client code. (Closed)
Patch Set: Only cleanup. 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_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_
6 #define SERVICES_UI_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ 6 #define SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "cc/ipc/compositor_frame.mojom.h" 11 #include "cc/ipc/compositor_frame.mojom.h"
12 #include "cc/output/context_provider.h" 12 #include "cc/output/context_provider.h"
13 #include "cc/surfaces/surface_factory.h" 13 #include "cc/surfaces/surface_factory.h"
14 #include "cc/surfaces/surface_id.h" 14 #include "cc/surfaces/surface_id.h"
15 #include "cc/surfaces/surface_sequence_generator.h"
16 #include "mojo/public/cpp/bindings/binding.h" 15 #include "mojo/public/cpp/bindings/binding.h"
17 #include "services/ui/public/interfaces/window_tree.mojom.h" 16 #include "services/ui/public/interfaces/window_tree.mojom.h"
18 #include "services/ui/surfaces/surfaces_context_provider.h" 17 #include "services/ui/surfaces/surfaces_context_provider.h"
19 18
20 namespace gpu { 19 namespace gpu {
21 class GpuMemoryBufferManager; 20 class GpuMemoryBufferManager;
22 } 21 }
23 22
24 namespace ui { 23 namespace ui {
25 namespace ws { 24 namespace ws {
26 25
27 class ServerWindow; 26 class ServerWindow;
28 class ServerWindowCompositorFrameSink; 27 class ServerWindowCompositorFrameSink;
29 class ServerWindowCompositorFrameSinkManagerTestApi; 28 class ServerWindowCompositorFrameSinkManagerTestApi;
30 29
31 struct CompositorFrameSinkData { 30 struct CompositorFrameSinkData {
32 CompositorFrameSinkData(); 31 CompositorFrameSinkData();
33 CompositorFrameSinkData(CompositorFrameSinkData&& other); 32 CompositorFrameSinkData(CompositorFrameSinkData&& other);
34 ~CompositorFrameSinkData(); 33 ~CompositorFrameSinkData();
35 34
36 CompositorFrameSinkData& operator=(CompositorFrameSinkData&& other); 35 CompositorFrameSinkData& operator=(CompositorFrameSinkData&& other);
37 36
38 cc::SurfaceId latest_submitted_surface_id; 37 cc::SurfaceId latest_submitted_surface_id;
39 gfx::Size latest_submitted_frame_size; 38 gfx::Size latest_submitted_frame_size;
40 cc::SurfaceSequenceGenerator surface_sequence_generator;
41 cc::mojom::MojoCompositorFrameSinkPrivatePtr compositor_frame_sink; 39 cc::mojom::MojoCompositorFrameSinkPrivatePtr compositor_frame_sink;
42 cc::mojom::MojoCompositorFrameSinkPrivateRequest 40 cc::mojom::MojoCompositorFrameSinkPrivateRequest
43 pending_compositor_frame_sink_request; 41 pending_compositor_frame_sink_request;
44 }; 42 };
45 43
46 // ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a 44 // ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a
47 // ServerWindow. 45 // ServerWindow.
48 // TODO(fsamuel): Delete this once window decorations are managed in the window 46 // TODO(fsamuel): Delete this once window decorations are managed in the window
49 // manager. 47 // manager.
50 class ServerWindowCompositorFrameSinkManager { 48 class ServerWindowCompositorFrameSinkManager {
(...skipping 26 matching lines...) Expand all
77 const cc::FrameSinkId& frame_sink_id); 75 const cc::FrameSinkId& frame_sink_id);
78 void RemoveChildFrameSinkId( 76 void RemoveChildFrameSinkId(
79 mojom::CompositorFrameSinkType compositor_frame_sink_type, 77 mojom::CompositorFrameSinkType compositor_frame_sink_type,
80 const cc::FrameSinkId& frame_sink_id); 78 const cc::FrameSinkId& frame_sink_id);
81 79
82 ServerWindow* window() { return window_; } 80 ServerWindow* window() { return window_; }
83 81
84 bool HasCompositorFrameSinkOfType(mojom::CompositorFrameSinkType type) const; 82 bool HasCompositorFrameSinkOfType(mojom::CompositorFrameSinkType type) const;
85 bool HasAnyCompositorFrameSink() const; 83 bool HasAnyCompositorFrameSink() const;
86 84
87 // Creates a surface dependency token that expires when the
88 // CompositorFrameSink of type |type| goes away associated with this window.
89 cc::SurfaceSequence CreateSurfaceSequence(
90 mojom::CompositorFrameSinkType type);
91 gfx::Size GetLatestFrameSize(mojom::CompositorFrameSinkType type) const; 85 gfx::Size GetLatestFrameSize(mojom::CompositorFrameSinkType type) const;
92 cc::SurfaceId GetLatestSurfaceId(mojom::CompositorFrameSinkType type) const; 86 cc::SurfaceId GetLatestSurfaceId(mojom::CompositorFrameSinkType type) const;
93 void SetLatestSurfaceInfo(mojom::CompositorFrameSinkType type, 87 void SetLatestSurfaceInfo(mojom::CompositorFrameSinkType type,
94 const cc::SurfaceId& surface_id, 88 const cc::SurfaceId& surface_id,
95 const gfx::Size& frame_size); 89 const gfx::Size& frame_size);
96 90
97 cc::SurfaceManager* GetCompositorFrameSinkManager(); 91 cc::SurfaceManager* GetCompositorFrameSinkManager();
98 92
99 private: 93 private:
100 friend class ServerWindowCompositorFrameSinkManagerTestApi; 94 friend class ServerWindowCompositorFrameSinkManagerTestApi;
(...skipping 17 matching lines...) Expand all
118 // least that of the window. Ideally we would wait for sizes to match, but 112 // least that of the window. Ideally we would wait for sizes to match, but
119 // the underlay is not necessarily as big as the window. 113 // the underlay is not necessarily as big as the window.
120 bool waiting_for_initial_frames_; 114 bool waiting_for_initial_frames_;
121 115
122 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); 116 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager);
123 }; 117 };
124 118
125 } // namespace ws 119 } // namespace ws
126 } // namespace ui 120 } // namespace ui
127 121
128 #endif // SERVICES_UI_WS_SERVER_WINDOW_SURFACE_MANAGER_H_ 122 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_
OLDNEW
« no previous file with comments | « services/ui/public/interfaces/window_tree.mojom ('k') | services/ui/ws/server_window_compositor_frame_sink_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698