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

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

Issue 2610723002: Unify SurfaceInfo (Closed)
Patch Set: Cleanup offscreen canvas Created 3 years, 11 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 <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 11 matching lines...) Expand all
22 class ServerWindowCompositorFrameSink; 22 class ServerWindowCompositorFrameSink;
23 class ServerWindowCompositorFrameSinkManagerTestApi; 23 class ServerWindowCompositorFrameSinkManagerTestApi;
24 24
25 struct CompositorFrameSinkData { 25 struct CompositorFrameSinkData {
26 CompositorFrameSinkData(); 26 CompositorFrameSinkData();
27 CompositorFrameSinkData(CompositorFrameSinkData&& other); 27 CompositorFrameSinkData(CompositorFrameSinkData&& other);
28 ~CompositorFrameSinkData(); 28 ~CompositorFrameSinkData();
29 29
30 CompositorFrameSinkData& operator=(CompositorFrameSinkData&& other); 30 CompositorFrameSinkData& operator=(CompositorFrameSinkData&& other);
31 31
32 cc::SurfaceId latest_submitted_surface_id; 32 cc::SurfaceInfo latest_submitted_surface_info;
33 gfx::Size latest_submitted_frame_size;
34 cc::mojom::MojoCompositorFrameSinkPrivatePtr compositor_frame_sink; 33 cc::mojom::MojoCompositorFrameSinkPrivatePtr compositor_frame_sink;
35 cc::mojom::MojoCompositorFrameSinkPrivateRequest 34 cc::mojom::MojoCompositorFrameSinkPrivateRequest
36 pending_compositor_frame_sink_request; 35 pending_compositor_frame_sink_request;
37 cc::FrameSinkId frame_sink_id; 36 cc::FrameSinkId frame_sink_id;
38 }; 37 };
39 38
40 // ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a 39 // ServerWindowCompositorFrameSinkManager tracks the surfaces associated with a
41 // ServerWindow. 40 // ServerWindow.
42 // 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
43 // manager. 42 // manager.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 const cc::FrameSinkId& frame_sink_id); 75 const cc::FrameSinkId& frame_sink_id);
77 76
78 ServerWindow* window() { return window_; } 77 ServerWindow* window() { return window_; }
79 78
80 bool HasCompositorFrameSinkOfType(mojom::CompositorFrameSinkType type) const; 79 bool HasCompositorFrameSinkOfType(mojom::CompositorFrameSinkType type) const;
81 bool HasAnyCompositorFrameSink() const; 80 bool HasAnyCompositorFrameSink() const;
82 81
83 gfx::Size GetLatestFrameSize(mojom::CompositorFrameSinkType type) const; 82 gfx::Size GetLatestFrameSize(mojom::CompositorFrameSinkType type) const;
84 cc::SurfaceId GetLatestSurfaceId(mojom::CompositorFrameSinkType type) const; 83 cc::SurfaceId GetLatestSurfaceId(mojom::CompositorFrameSinkType type) const;
85 void SetLatestSurfaceInfo(mojom::CompositorFrameSinkType type, 84 void SetLatestSurfaceInfo(mojom::CompositorFrameSinkType type,
86 const cc::SurfaceId& surface_id, 85 const cc::SurfaceInfo& surface_info);
87 const gfx::Size& frame_size);
88 86
89 void OnRootChanged(ServerWindow* old_root, ServerWindow* new_root); 87 void OnRootChanged(ServerWindow* old_root, ServerWindow* new_root);
90 88
91 private: 89 private:
92 friend class ServerWindowCompositorFrameSinkManagerTestApi; 90 friend class ServerWindowCompositorFrameSinkManagerTestApi;
93 friend class ServerWindowCompositorFrameSink; 91 friend class ServerWindowCompositorFrameSink;
94 92
95 // 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
96 // 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.
97 bool IsCompositorFrameSinkReadyAndNonEmpty( 95 bool IsCompositorFrameSinkReadyAndNonEmpty(
(...skipping 20 matching lines...) Expand all
118 // the underlay is not necessarily as big as the window. 116 // the underlay is not necessarily as big as the window.
119 bool waiting_for_initial_frames_; 117 bool waiting_for_initial_frames_;
120 118
121 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager); 119 DISALLOW_COPY_AND_ASSIGN(ServerWindowCompositorFrameSinkManager);
122 }; 120 };
123 121
124 } // namespace ws 122 } // namespace ws
125 } // namespace ui 123 } // namespace ui
126 124
127 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_ 125 #endif // SERVICES_UI_WS_SERVER_WINDOW_COMPOSITOR_FRAME_SINK_MANAGER_H_
OLDNEW
« no previous file with comments | « services/ui/ws/frame_generator_unittest.cc ('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