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

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

Issue 2897673002: Return resources immediately after a Surface is destroyed (Closed)
Patch Set: Check aggregator_ 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // is owned by the GpuCompositorFrameSink in the map. When the sink is 75 // is owned by the GpuCompositorFrameSink in the map. When the sink is
76 // removed from the map, |frame_sink_id| would also be destroyed if it were a 76 // removed from the map, |frame_sink_id| would also be destroyed if it were a
77 // reference. But the map can continue to iterate and try to use it. Passing 77 // reference. But the map can continue to iterate and try to use it. Passing
78 // by value avoids this. 78 // by value avoids this.
79 void DestroyCompositorFrameSink(cc::FrameSinkId frame_sink_id); 79 void DestroyCompositorFrameSink(cc::FrameSinkId frame_sink_id);
80 80
81 // cc::SurfaceObserver implementation. 81 // cc::SurfaceObserver implementation.
82 void OnSurfaceCreated(const cc::SurfaceInfo& surface_info) override; 82 void OnSurfaceCreated(const cc::SurfaceInfo& surface_info) override;
83 void OnSurfaceDamaged(const cc::SurfaceId& surface_id, 83 void OnSurfaceDamaged(const cc::SurfaceId& surface_id,
84 bool* changed) override; 84 bool* changed) override;
85 void OnSurfaceDiscarded(const cc::SurfaceId& surface_id) override;
85 86
86 // GpuCompositorFrameSinkDelegate implementation. 87 // GpuCompositorFrameSinkDelegate implementation.
87 void OnClientConnectionLost(const cc::FrameSinkId& frame_sink_id, 88 void OnClientConnectionLost(const cc::FrameSinkId& frame_sink_id,
88 bool destroy_compositor_frame_sink) override; 89 bool destroy_compositor_frame_sink) override;
89 void OnPrivateConnectionLost(const cc::FrameSinkId& frame_sink_id, 90 void OnPrivateConnectionLost(const cc::FrameSinkId& frame_sink_id,
90 bool destroy_compositor_frame_sink) override; 91 bool destroy_compositor_frame_sink) override;
91 92
92 // SurfaceManager should be the first object constructed and the last object 93 // 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 94 // 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. 95 // access to a valid pointer for the entirety of their lifetimes.
(...skipping 11 matching lines...) Expand all
106 107
107 cc::mojom::FrameSinkManagerClientPtr client_; 108 cc::mojom::FrameSinkManagerClientPtr client_;
108 mojo::Binding<cc::mojom::FrameSinkManager> binding_; 109 mojo::Binding<cc::mojom::FrameSinkManager> binding_;
109 110
110 DISALLOW_COPY_AND_ASSIGN(MojoFrameSinkManager); 111 DISALLOW_COPY_AND_ASSIGN(MojoFrameSinkManager);
111 }; 112 };
112 113
113 } // namespace viz 114 } // namespace viz
114 115
115 #endif // COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ 116 #endif // COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface_synchronization_unittest.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