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

Side by Side Diff: components/viz/frame_sinks/mojo_frame_sink_manager.h

Issue 2908473002: Revert of cc::SurfaceDependencyTracker should not crash when a Display goes away (Closed)
Patch Set: Created 3 years, 7 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 COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ 5 #ifndef COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_
6 #define COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ 6 #define COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void OnClientConnectionLost(const cc::FrameSinkId& frame_sink_id, 87 void OnClientConnectionLost(const cc::FrameSinkId& frame_sink_id,
88 bool destroy_compositor_frame_sink) override; 88 bool destroy_compositor_frame_sink) override;
89 void OnPrivateConnectionLost(const cc::FrameSinkId& frame_sink_id, 89 void OnPrivateConnectionLost(const cc::FrameSinkId& frame_sink_id,
90 bool destroy_compositor_frame_sink) override; 90 bool destroy_compositor_frame_sink) override;
91 91
92 // SurfaceManager should be the first object constructed and the last object 92 // SurfaceManager should be the first object constructed and the last object
93 // destroyed in order to ensure that all other objects that depend on it have 93 // destroyed in order to ensure that all other objects that depend on it have
94 // access to a valid pointer for the entirety of their lifetimes. 94 // access to a valid pointer for the entirety of their lifetimes.
95 cc::SurfaceManager manager_; 95 cc::SurfaceManager manager_;
96 96
97 std::unique_ptr<cc::SurfaceDependencyTracker> dependency_tracker_;
98
99 // Provides a cc::Display for CreateRootCompositorFrameSink(). 97 // Provides a cc::Display for CreateRootCompositorFrameSink().
100 DisplayProvider* const display_provider_; 98 DisplayProvider* const display_provider_;
101 99
102 std::unordered_map<cc::FrameSinkId, 100 std::unordered_map<cc::FrameSinkId,
103 std::unique_ptr<cc::mojom::MojoCompositorFrameSink>, 101 std::unique_ptr<cc::mojom::MojoCompositorFrameSink>,
104 cc::FrameSinkIdHash> 102 cc::FrameSinkIdHash>
105 compositor_frame_sinks_; 103 compositor_frame_sinks_;
106 104
107 base::ThreadChecker thread_checker_; 105 base::ThreadChecker thread_checker_;
108 106
109 cc::mojom::FrameSinkManagerClientPtr client_; 107 cc::mojom::FrameSinkManagerClientPtr client_;
110 mojo::Binding<cc::mojom::FrameSinkManager> binding_; 108 mojo::Binding<cc::mojom::FrameSinkManager> binding_;
111 109
112 DISALLOW_COPY_AND_ASSIGN(MojoFrameSinkManager); 110 DISALLOW_COPY_AND_ASSIGN(MojoFrameSinkManager);
113 }; 111 };
114 112
115 } // namespace viz 113 } // namespace viz
116 114
117 #endif // COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ 115 #endif // COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/test/begin_frame_source_test.cc ('k') | components/viz/frame_sinks/mojo_frame_sink_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698