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

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

Issue 2715663007: Implement temporary reference assignment with DisplayCompositor. (Closed)
Patch Set: Cleanup. Created 3 years, 9 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_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"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Adds the provided |frame_sink_id| to this ServerWindow's associated 55 // Adds the provided |frame_sink_id| to this ServerWindow's associated
56 // CompositorFrameSink if possible. If this ServerWindow does not have 56 // CompositorFrameSink if possible. If this ServerWindow does not have
57 // an associated CompositorFrameSink then this method will recursively 57 // an associated CompositorFrameSink then this method will recursively
58 // 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
59 // that has a CompositorFrameSink of the same type. This method returns 59 // that has a CompositorFrameSink of the same type. This method returns
60 // the FrameSinkId that is the first composited ancestor of the ServerWindow 60 // the FrameSinkId that is the first composited ancestor of the ServerWindow
61 // assocaited with the provided |frame_sink_id|. 61 // assocaited with the provided |frame_sink_id|.
62 void AddChildFrameSinkId(const cc::FrameSinkId& frame_sink_id); 62 void AddChildFrameSinkId(const cc::FrameSinkId& frame_sink_id);
63 void RemoveChildFrameSinkId(const cc::FrameSinkId& frame_sink_id); 63 void RemoveChildFrameSinkId(const cc::FrameSinkId& frame_sink_id);
64 64
65 // Claims this FrameSinkId will embed |surface_id| so it should own the
66 // temporary reference to |surface_id|.
67 void ClaimTemporaryReference(const cc::SurfaceId& surface_id);
68
65 void OnRootChanged(ServerWindow* old_root, ServerWindow* new_root); 69 void OnRootChanged(ServerWindow* old_root, ServerWindow* new_root);
66 70
67 private: 71 private:
68 friend class ServerWindowCompositorFrameSinkManagerTestApi; 72 friend class ServerWindowCompositorFrameSinkManagerTestApi;
69 friend class ServerWindowCompositorFrameSink; 73 friend class ServerWindowCompositorFrameSink;
70 74
71 ServerWindow* window_; 75 void CreateCompositorFrameSinkData();
76
77 ServerWindow* const window_;
72 78
73 std::unique_ptr<CompositorFrameSinkData> frame_sink_data_; 79 std::unique_ptr<CompositorFrameSinkData> frame_sink_data_;
74 80
75 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); 81 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager);
76 }; 82 };
77 83
78 } // namespace ws 84 } // namespace ws
79 } // namespace ui 85 } // namespace ui
80 86
81 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ 87 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698