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

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

Powered by Google App Engine
This is Rietveld 408576698