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

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

Issue 2527443002: Display Compositor: Allocate LocalFrameId in client. (Closed)
Patch Set: Rebased + Restored BUILD files 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
« no previous file with comments | « services/ui/surfaces/gpu_compositor_frame_sink.cc ('k') | services/ui/ws/frame_generator.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_FRAME_GENERATOR_H_ 5 #ifndef SERVICES_UI_WS_FRAME_GENERATOR_H_
6 #define SERVICES_UI_WS_FRAME_GENERATOR_H_ 6 #define SERVICES_UI_WS_FRAME_GENERATOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
13 #include "cc/ipc/display_compositor.mojom.h" 13 #include "cc/ipc/display_compositor.mojom.h"
14 #include "cc/surfaces/frame_sink_id.h" 14 #include "cc/surfaces/frame_sink_id.h"
15 #include "cc/surfaces/surface_id.h" 15 #include "cc/surfaces/surface_id.h"
16 #include "cc/surfaces/surface_id_allocator.h"
16 #include "services/ui/public/interfaces/window_tree_constants.mojom.h" 17 #include "services/ui/public/interfaces/window_tree_constants.mojom.h"
17 #include "services/ui/ws/ids.h" 18 #include "services/ui/ws/ids.h"
18 #include "services/ui/ws/server_window_delegate.h" 19 #include "services/ui/ws/server_window_delegate.h"
19 #include "services/ui/ws/server_window_tracker.h" 20 #include "services/ui/ws/server_window_tracker.h"
20 #include "ui/gfx/geometry/rect.h" 21 #include "ui/gfx/geometry/rect.h"
21 #include "ui/gfx/native_widget_types.h" 22 #include "ui/gfx/native_widget_types.h"
22 23
23 namespace cc { 24 namespace cc {
24 class CompositorFrame; 25 class CompositorFrame;
25 class RenderPass; 26 class RenderPass;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void RemoveAllSurfaceReferences(); 114 void RemoveAllSurfaceReferences();
114 115
115 cc::mojom::DisplayCompositor* GetDisplayCompositor(); 116 cc::mojom::DisplayCompositor* GetDisplayCompositor();
116 117
117 // ServerWindowObserver implementation. 118 // ServerWindowObserver implementation.
118 void OnWindowDestroying(ServerWindow* window) override; 119 void OnWindowDestroying(ServerWindow* window) override;
119 120
120 FrameGeneratorDelegate* delegate_; 121 FrameGeneratorDelegate* delegate_;
121 ServerWindow* const root_window_; 122 ServerWindow* const root_window_;
122 123
124 gfx::Size last_submitted_frame_size_;
125 cc::LocalFrameId local_frame_id_;
126 cc::SurfaceIdAllocator id_allocator_;
123 cc::mojom::MojoCompositorFrameSinkPtr compositor_frame_sink_; 127 cc::mojom::MojoCompositorFrameSinkPtr compositor_frame_sink_;
124 128
125 // Represents the top level root surface id that should reference the display 129 // Represents the top level root surface id that should reference the display
126 // root surface. We don't know the actual value, because it's generated in 130 // root surface. We don't know the actual value, because it's generated in
127 // another process, this is used internally as a placeholder. 131 // another process, this is used internally as a placeholder.
128 const cc::SurfaceId top_level_root_surface_id_; 132 const cc::SurfaceId top_level_root_surface_id_;
129 133
130 struct SurfaceReference { 134 struct SurfaceReference {
131 cc::SurfaceId parent_id; 135 cc::SurfaceId parent_id;
132 cc::SurfaceId child_id; 136 cc::SurfaceId child_id;
(...skipping 19 matching lines...) Expand all
152 base::WeakPtrFactory<FrameGenerator> weak_factory_; 156 base::WeakPtrFactory<FrameGenerator> weak_factory_;
153 157
154 DISALLOW_COPY_AND_ASSIGN(FrameGenerator); 158 DISALLOW_COPY_AND_ASSIGN(FrameGenerator);
155 }; 159 };
156 160
157 } // namespace ws 161 } // namespace ws
158 162
159 } // namespace ui 163 } // namespace ui
160 164
161 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_ 165 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_
OLDNEW
« no previous file with comments | « services/ui/surfaces/gpu_compositor_frame_sink.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698