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

Unified Diff: services/ui/ws/server_window_surface.h

Issue 2400723003: Mus+Ash: Use standard cc mechanism for surface lifetime. (Closed)
Patch Set: Only add window observer if we're adding the dependency for the first time Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: services/ui/ws/server_window_surface.h
diff --git a/services/ui/ws/server_window_surface.h b/services/ui/ws/server_window_surface.h
index a4514dd4a6e5930d83345fe218c88d65a9b6f95e..2f09b62823edb79512e182630d3ee1eed84ecf15 100644
--- a/services/ui/ws/server_window_surface.h
+++ b/services/ui/ws/server_window_surface.h
@@ -50,15 +50,16 @@ class ServerWindowSurface : public mojom::Surface,
cc::CompositorFrame frame,
const SubmitCompositorFrameCallback& callback) override;
+ const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; }
rjkroege 2016/10/07 19:34:50 would be awesome to remind people what a FrameSink
Fady Samuel 2016/10/07 20:31:33 Done.
const cc::LocalFrameId& local_frame_id() const { return local_frame_id_; }
+ bool has_frame() const { return !local_frame_id_.is_null(); }
+
cc::SurfaceId GetSurfaceId() const;
- // Destroys old surfaces that have been outdated by a new surface.
- void DestroySurfacesScheduledForDestruction();
+ ServerWindow* window();
rjkroege 2016/10/07 19:34:50 if I remember correctly, we need windows that don'
Fady Samuel 2016/10/07 20:31:33 A surface has a window but a window may not have a
rjkroege 2016/10/07 20:48:13 was an off-topic comment. sorry
Fady Samuel 2016/10/07 21:04:33 Acknowledged.
private:
- ServerWindow* window();
// SurfaceFactoryClient implementation.
void ReturnResources(const cc::ReturnedResourceArray& resources) override;
@@ -77,9 +78,6 @@ class ServerWindowSurface : public mojom::Surface,
mojom::SurfaceClientPtr client_;
mojo::Binding<Surface> binding_;
- // Set of surface ids that need to be destroyed.
- std::set<cc::LocalFrameId> surfaces_scheduled_for_destruction_;
-
bool may_contain_video_ = false;
DISALLOW_COPY_AND_ASSIGN(ServerWindowSurface);

Powered by Google App Engine
This is Rietveld 408576698