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

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

Issue 2580703005: Fixes bug in ServerWindowCompositorFrameSinkManager (Closed)
Patch Set: merge 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
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 <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 15 matching lines...) Expand all
26 CompositorFrameSinkData(CompositorFrameSinkData&& other); 26 CompositorFrameSinkData(CompositorFrameSinkData&& other);
27 ~CompositorFrameSinkData(); 27 ~CompositorFrameSinkData();
28 28
29 CompositorFrameSinkData& operator=(CompositorFrameSinkData&& other); 29 CompositorFrameSinkData& operator=(CompositorFrameSinkData&& other);
30 30
31 cc::SurfaceId latest_submitted_surface_id; 31 cc::SurfaceId latest_submitted_surface_id;
32 gfx::Size latest_submitted_frame_size; 32 gfx::Size latest_submitted_frame_size;
33 cc::mojom::MojoCompositorFrameSinkPrivatePtr compositor_frame_sink; 33 cc::mojom::MojoCompositorFrameSinkPrivatePtr compositor_frame_sink;
34 cc::mojom::MojoCompositorFrameSinkPrivateRequest 34 cc::mojom::MojoCompositorFrameSinkPrivateRequest
35 pending_compositor_frame_sink_request; 35 pending_compositor_frame_sink_request;
36 cc::FrameSinkId frame_sink_id;
36 }; 37 };
37 38
38 // ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a 39 // ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a
39 // ServerWindow. 40 // ServerWindow.
40 // TODO(fsamuel): Delete this once window decorations are managed in the window 41 // TODO(fsamuel): Delete this once window decorations are managed in the window
41 // manager. 42 // manager.
42 class ServerWindowCompositorFrameSinkManager { 43 class ServerWindowCompositorFrameSinkManager {
43 public: 44 public:
44 explicit ServerWindowCompositorFrameSinkManager(ServerWindow* window); 45 explicit ServerWindowCompositorFrameSinkManager(ServerWindow* window);
45 ~ServerWindowCompositorFrameSinkManager(); 46 ~ServerWindowCompositorFrameSinkManager();
(...skipping 30 matching lines...) Expand all
76 77
77 bool HasCompositorFrameSinkOfType(mojom::CompositorFrameSinkType type) const; 78 bool HasCompositorFrameSinkOfType(mojom::CompositorFrameSinkType type) const;
78 bool HasAnyCompositorFrameSink() const; 79 bool HasAnyCompositorFrameSink() const;
79 80
80 gfx::Size GetLatestFrameSize(mojom::CompositorFrameSinkType type) const; 81 gfx::Size GetLatestFrameSize(mojom::CompositorFrameSinkType type) const;
81 cc::SurfaceId GetLatestSurfaceId(mojom::CompositorFrameSinkType type) const; 82 cc::SurfaceId GetLatestSurfaceId(mojom::CompositorFrameSinkType type) const;
82 void SetLatestSurfaceInfo(mojom::CompositorFrameSinkType type, 83 void SetLatestSurfaceInfo(mojom::CompositorFrameSinkType type,
83 const cc::SurfaceId& surface_id, 84 const cc::SurfaceId& surface_id,
84 const gfx::Size& frame_size); 85 const gfx::Size& frame_size);
85 86
87 void OnRootChanged(ServerWindow* old_root, ServerWindow* new_root);
88
86 private: 89 private:
87 friend class ServerWindowCompositorFrameSinkManagerTestApi; 90 friend class ServerWindowCompositorFrameSinkManagerTestApi;
88 friend class ServerWindowCompositorFrameSink; 91 friend class ServerWindowCompositorFrameSink;
89 92
90 // Returns true if a CompositorFrameSink of |type| has been set and has 93 // Returns true if a CompositorFrameSink of |type| has been set and has
91 // received a frame that is greater than the size of the window. 94 // received a frame that is greater than the size of the window.
92 bool IsCompositorFrameSinkReadyAndNonEmpty( 95 bool IsCompositorFrameSinkReadyAndNonEmpty(
93 mojom::CompositorFrameSinkType type) const; 96 mojom::CompositorFrameSinkType type) const;
94 97
95 void CreateCompositorFrameSinkInternal( 98 void CreateCompositorFrameSinkInternal(
(...skipping 16 matching lines...) Expand all
112 // the underlay is not necessarily as big as the window. 115 // the underlay is not necessarily as big as the window.
113 bool waiting_for_initial_frames_; 116 bool waiting_for_initial_frames_;
114 117
115 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); 118 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager);
116 }; 119 };
117 120
118 } // namespace ws 121 } // namespace ws
119 } // namespace ui 122 } // namespace ui
120 123
121 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ 124 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698