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

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

Issue 2854163003: [cc] Plumb BeginFrameAcks through SurfaceManager to DisplayScheduler. (Closed)
Patch Set: fix clang compile error 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
« no previous file with comments | « cc/test/fake_surface_observer.cc ('k') | components/viz/frame_sinks/mojo_frame_sink_manager.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 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // It is necessary to pass |frame_sink_id| by value because the id 74 // It is necessary to pass |frame_sink_id| by value because the id
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 const cc::BeginFrameAck& ack,
84 bool* changed) override; 85 bool* changed) override;
85 void OnSurfaceDiscarded(const cc::SurfaceId& surface_id) override; 86 void OnSurfaceDiscarded(const cc::SurfaceId& surface_id) override;
87 void OnSurfaceDestroyed(const cc::SurfaceId& surface_id) override;
88 void OnSurfaceDamageExpected(const cc::SurfaceId& surface_id,
89 const cc::BeginFrameArgs& args) override;
86 90
87 // GpuCompositorFrameSinkDelegate implementation. 91 // GpuCompositorFrameSinkDelegate implementation.
88 void OnClientConnectionLost(const cc::FrameSinkId& frame_sink_id, 92 void OnClientConnectionLost(const cc::FrameSinkId& frame_sink_id,
89 bool destroy_compositor_frame_sink) override; 93 bool destroy_compositor_frame_sink) override;
90 void OnPrivateConnectionLost(const cc::FrameSinkId& frame_sink_id, 94 void OnPrivateConnectionLost(const cc::FrameSinkId& frame_sink_id,
91 bool destroy_compositor_frame_sink) override; 95 bool destroy_compositor_frame_sink) override;
92 96
93 // SurfaceManager should be the first object constructed and the last object 97 // SurfaceManager should be the first object constructed and the last object
94 // destroyed in order to ensure that all other objects that depend on it have 98 // destroyed in order to ensure that all other objects that depend on it have
95 // access to a valid pointer for the entirety of their lifetimes. 99 // access to a valid pointer for the entirety of their lifetimes.
(...skipping 13 matching lines...) Expand all
109 113
110 cc::mojom::FrameSinkManagerClientPtr client_; 114 cc::mojom::FrameSinkManagerClientPtr client_;
111 mojo::Binding<cc::mojom::FrameSinkManager> binding_; 115 mojo::Binding<cc::mojom::FrameSinkManager> binding_;
112 116
113 DISALLOW_COPY_AND_ASSIGN(MojoFrameSinkManager); 117 DISALLOW_COPY_AND_ASSIGN(MojoFrameSinkManager);
114 }; 118 };
115 119
116 } // namespace viz 120 } // namespace viz
117 121
118 #endif // COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_ 122 #endif // COMPONENTS_VIZ_FRAME_SINKS_MOJO_FRAME_SINK_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/test/fake_surface_observer.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