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

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

Issue 2445873003: Pass root ServerWindow id to FrameGenerator. (Closed)
Patch Set: Address nits. Created 4 years, 1 month 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/ws/display.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/surfaces/frame_sink_id.h" 13 #include "cc/surfaces/frame_sink_id.h"
14 #include "cc/surfaces/local_frame_id.h" 14 #include "cc/surfaces/local_frame_id.h"
15 #include "cc/surfaces/surface_sequence.h" 15 #include "cc/surfaces/surface_sequence.h"
16 #include "cc/surfaces/surface_sequence_generator.h" 16 #include "cc/surfaces/surface_sequence_generator.h"
17 #include "services/ui/ws/ids.h"
17 #include "services/ui/ws/server_window_observer.h" 18 #include "services/ui/ws/server_window_observer.h"
18 #include "ui/gfx/geometry/rect.h" 19 #include "ui/gfx/geometry/rect.h"
19 #include "ui/gfx/native_widget_types.h" 20 #include "ui/gfx/native_widget_types.h"
20 21
21 namespace cc { 22 namespace cc {
22 class CompositorFrame; 23 class CompositorFrame;
23 class CopyOutputRequest; 24 class CopyOutputRequest;
24 class RenderPass; 25 class RenderPass;
25 class SurfaceId; 26 class SurfaceId;
26 } 27 }
(...skipping 15 matching lines...) Expand all
42 43
43 class FrameGeneratorDelegate; 44 class FrameGeneratorDelegate;
44 class ServerWindow; 45 class ServerWindow;
45 class ServerWindowCompositorFrameSink; 46 class ServerWindowCompositorFrameSink;
46 47
47 // Responsible for redrawing the display in response to the redraw requests by 48 // Responsible for redrawing the display in response to the redraw requests by
48 // submitting CompositorFrames to the owned CompositorFrameSink. 49 // submitting CompositorFrames to the owned CompositorFrameSink.
49 class FrameGenerator : public ServerWindowObserver { 50 class FrameGenerator : public ServerWindowObserver {
50 public: 51 public:
51 FrameGenerator(FrameGeneratorDelegate* delegate, 52 FrameGenerator(FrameGeneratorDelegate* delegate,
53 ServerWindow* root_window,
52 scoped_refptr<DisplayCompositor> display_compositor); 54 scoped_refptr<DisplayCompositor> display_compositor);
53 ~FrameGenerator() override; 55 ~FrameGenerator() override;
54 56
55 void OnGpuChannelEstablished(scoped_refptr<gpu::GpuChannelHost> gpu_channel); 57 void OnGpuChannelEstablished(scoped_refptr<gpu::GpuChannelHost> gpu_channel);
56 58
57 // Schedules a redraw for the provided region. 59 // Schedules a redraw for the provided region.
58 void RequestRedraw(const gfx::Rect& redraw_region); 60 void RequestRedraw(const gfx::Rect& redraw_region);
59 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget); 61 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget);
60 62
61 bool is_frame_pending() { return frame_pending_; } 63 bool is_frame_pending() { return frame_pending_; }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 base::WeakPtrFactory<FrameGenerator> weak_factory_; 137 base::WeakPtrFactory<FrameGenerator> weak_factory_;
136 138
137 DISALLOW_COPY_AND_ASSIGN(FrameGenerator); 139 DISALLOW_COPY_AND_ASSIGN(FrameGenerator);
138 }; 140 };
139 141
140 } // namespace ws 142 } // namespace ws
141 143
142 } // namespace ui 144 } // namespace ui
143 145
144 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_ 146 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_
OLDNEW
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698