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

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

Issue 2711043002: Remove latest_submitted_surface_info (Closed)
Patch Set: Remove latest_submitted_surface_info 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
« no previous file with comments | « no previous file | services/ui/ws/server_window_compositor_frame_sink_manager.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_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_
6 #define SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ 6 #define SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "cc/ipc/compositor_frame.mojom.h" 9 #include "cc/ipc/compositor_frame.mojom.h"
10 #include "cc/ipc/display_compositor.mojom.h" 10 #include "cc/ipc/display_compositor.mojom.h"
11 #include "cc/output/context_provider.h" 11 #include "cc/output/context_provider.h"
12 #include "cc/surfaces/surface_id.h" 12 #include "cc/surfaces/surface_id.h"
13 #include "mojo/public/cpp/bindings/binding.h" 13 #include "mojo/public/cpp/bindings/binding.h"
14 #include "services/ui/public/interfaces/window_tree.mojom.h" 14 #include "services/ui/public/interfaces/window_tree.mojom.h"
15 15
16 namespace ui { 16 namespace ui {
17 namespace ws { 17 namespace ws {
18 18
19 class ServerWindow; 19 class ServerWindow;
20 class ServerWindowCompositorFrameSink; 20 class ServerWindowCompositorFrameSink;
21 class ServerWindowCompositorFrameSinkManagerTestApi; 21 class ServerWindowCompositorFrameSinkManagerTestApi;
22 22
23 struct CompositorFrameSinkData { 23 struct CompositorFrameSinkData {
24 CompositorFrameSinkData(); 24 CompositorFrameSinkData();
25 CompositorFrameSinkData(CompositorFrameSinkData&& other); 25 CompositorFrameSinkData(CompositorFrameSinkData&& other);
26 ~CompositorFrameSinkData(); 26 ~CompositorFrameSinkData();
27 27
28 CompositorFrameSinkData& operator=(CompositorFrameSinkData&& other); 28 CompositorFrameSinkData& operator=(CompositorFrameSinkData&& other);
29 29
30 cc::SurfaceInfo latest_submitted_surface_info;
31 cc::mojom::MojoCompositorFrameSinkPrivatePtr compositor_frame_sink; 30 cc::mojom::MojoCompositorFrameSinkPrivatePtr compositor_frame_sink;
32 cc::mojom::MojoCompositorFrameSinkPrivateRequest 31 cc::mojom::MojoCompositorFrameSinkPrivateRequest
33 pending_compositor_frame_sink_request; 32 pending_compositor_frame_sink_request;
34 cc::FrameSinkId frame_sink_id; 33 cc::FrameSinkId frame_sink_id;
35 }; 34 };
36 35
37 // ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a 36 // ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a
38 // ServerWindow. 37 // ServerWindow.
39 class ServerWindowCompositorFrameSinkManager { 38 class ServerWindowCompositorFrameSinkManager {
40 public: 39 public:
(...skipping 15 matching lines...) Expand all
56 // Adds the provided |frame_sink_id| to this ServerWindow's associated 55 // Adds the provided |frame_sink_id| to this ServerWindow's associated
57 // CompositorFrameSink if possible. If this ServerWindow does not have 56 // CompositorFrameSink if possible. If this ServerWindow does not have
58 // an associated CompositorFrameSink then this method will recursively 57 // an associated CompositorFrameSink then this method will recursively
59 // walk up the window hierarchy and register itself with the first ancestor 58 // walk up the window hierarchy and register itself with the first ancestor
60 // that has a CompositorFrameSink of the same type. This method returns 59 // that has a CompositorFrameSink of the same type. This method returns
61 // the FrameSinkId that is the first composited ancestor of the ServerWindow 60 // the FrameSinkId that is the first composited ancestor of the ServerWindow
62 // assocaited with the provided |frame_sink_id|. 61 // assocaited with the provided |frame_sink_id|.
63 void AddChildFrameSinkId(const cc::FrameSinkId& frame_sink_id); 62 void AddChildFrameSinkId(const cc::FrameSinkId& frame_sink_id);
64 void RemoveChildFrameSinkId(const cc::FrameSinkId& frame_sink_id); 63 void RemoveChildFrameSinkId(const cc::FrameSinkId& frame_sink_id);
65 64
66 gfx::Size GetLatestFrameSize() const;
67 void SetLatestSurfaceInfo(const cc::SurfaceInfo& surface_info);
68
69 void OnRootChanged(ServerWindow* old_root, ServerWindow* new_root); 65 void OnRootChanged(ServerWindow* old_root, ServerWindow* new_root);
70 66
71 private: 67 private:
72 friend class ServerWindowCompositorFrameSinkManagerTestApi; 68 friend class ServerWindowCompositorFrameSinkManagerTestApi;
73 friend class ServerWindowCompositorFrameSink; 69 friend class ServerWindowCompositorFrameSink;
74 70
75 ServerWindow* window_; 71 ServerWindow* window_;
76 72
77 std::unique_ptr<CompositorFrameSinkData> frame_sink_data_; 73 std::unique_ptr<CompositorFrameSinkData> frame_sink_data_;
78 74
79 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); 75 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager);
80 }; 76 };
81 77
82 } // namespace ws 78 } // namespace ws
83 } // namespace ui 79 } // namespace ui
84 80
85 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ 81 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | 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