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

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

Issue 2451863003: mus: Fix a teardown crash. (Closed)
Patch Set: . 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 | « no previous file | 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/ids.h"
18 #include "services/ui/ws/server_window_observer.h" 18 #include "services/ui/ws/server_window_tracker.h"
19 #include "ui/gfx/geometry/rect.h" 19 #include "ui/gfx/geometry/rect.h"
20 #include "ui/gfx/native_widget_types.h" 20 #include "ui/gfx/native_widget_types.h"
21 21
22 namespace cc { 22 namespace cc {
23 class CompositorFrame; 23 class CompositorFrame;
24 class CopyOutputRequest; 24 class CopyOutputRequest;
25 class RenderPass; 25 class RenderPass;
26 class SurfaceId; 26 class SurfaceId;
27 } 27 }
28 28
(...skipping 11 matching lines...) Expand all
40 namespace test { 40 namespace test {
41 class FrameGeneratorTest; 41 class FrameGeneratorTest;
42 } 42 }
43 43
44 class FrameGeneratorDelegate; 44 class FrameGeneratorDelegate;
45 class ServerWindow; 45 class ServerWindow;
46 class ServerWindowCompositorFrameSink; 46 class ServerWindowCompositorFrameSink;
47 47
48 // 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
49 // submitting CompositorFrames to the owned CompositorFrameSink. 49 // submitting CompositorFrames to the owned CompositorFrameSink.
50 class FrameGenerator : public ServerWindowObserver { 50 class FrameGenerator : public ServerWindowTracker {
51 public: 51 public:
52 FrameGenerator(FrameGeneratorDelegate* delegate, 52 FrameGenerator(FrameGeneratorDelegate* delegate,
53 ServerWindow* root_window, 53 ServerWindow* root_window,
54 scoped_refptr<DisplayCompositor> display_compositor); 54 scoped_refptr<DisplayCompositor> display_compositor);
55 ~FrameGenerator() override; 55 ~FrameGenerator() override;
56 56
57 void OnGpuChannelEstablished(scoped_refptr<gpu::GpuChannelHost> gpu_channel); 57 void OnGpuChannelEstablished(scoped_refptr<gpu::GpuChannelHost> gpu_channel);
58 58
59 // Schedules a redraw for the provided region. 59 // Schedules a redraw for the provided region.
60 void RequestRedraw(const gfx::Rect& redraw_region); 60 void RequestRedraw(const gfx::Rect& redraw_region);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 base::WeakPtrFactory<FrameGenerator> weak_factory_; 137 base::WeakPtrFactory<FrameGenerator> weak_factory_;
138 138
139 DISALLOW_COPY_AND_ASSIGN(FrameGenerator); 139 DISALLOW_COPY_AND_ASSIGN(FrameGenerator);
140 }; 140 };
141 141
142 } // namespace ws 142 } // namespace ws
143 143
144 } // namespace ui 144 } // namespace ui
145 145
146 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_ 146 #endif // SERVICES_UI_WS_FRAME_GENERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698