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

Unified Diff: services/ui/surfaces/display_compositor.cc

Issue 2711913006: Move FrameSink hierarchy registration to DisplayCompositor interface (Closed)
Patch Set: Fix mojom Formatting Created 3 years, 10 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
« no previous file with comments | « services/ui/surfaces/display_compositor.h ('k') | services/ui/ws/server_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/surfaces/display_compositor.cc
diff --git a/services/ui/surfaces/display_compositor.cc b/services/ui/surfaces/display_compositor.cc
index fb14a1ee4389f6008f89401827d1d844a43ee904..6ddd4433008118ea9ef1128e251449643f8f5528 100644
--- a/services/ui/surfaces/display_compositor.cc
+++ b/services/ui/surfaces/display_compositor.cc
@@ -50,25 +50,6 @@ DisplayCompositor::~DisplayCompositor() {
manager_.RemoveObserver(this);
}
-void DisplayCompositor::OnClientConnectionLost(
- const cc::FrameSinkId& frame_sink_id,
- bool destroy_compositor_frame_sink) {
- DCHECK(thread_checker_.CalledOnValidThread());
- if (destroy_compositor_frame_sink)
- DestroyCompositorFrameSink(frame_sink_id);
- // TODO(fsamuel): Tell the display compositor host that the client connection
- // has been lost so that it can drop its private connection and allow a new
- // client instance to create a new CompositorFrameSink.
-}
-
-void DisplayCompositor::OnPrivateConnectionLost(
- const cc::FrameSinkId& frame_sink_id,
- bool destroy_compositor_frame_sink) {
- DCHECK(thread_checker_.CalledOnValidThread());
- if (destroy_compositor_frame_sink)
- DestroyCompositorFrameSink(frame_sink_id);
-}
-
void DisplayCompositor::CreateRootCompositorFrameSink(
const cc::FrameSinkId& frame_sink_id,
gpu::SurfaceHandle surface_handle,
@@ -108,6 +89,20 @@ void DisplayCompositor::CreateCompositorFrameSink(
std::move(private_request), std::move(client));
}
+void DisplayCompositor::RegisterFrameSinkHierarchy(
+ const cc::FrameSinkId& parent_frame_sink_id,
+ const cc::FrameSinkId& child_frame_sink_id) {
+ manager_.RegisterFrameSinkHierarchy(parent_frame_sink_id,
+ child_frame_sink_id);
+}
+
+void DisplayCompositor::UnregisterFrameSinkHierarchy(
+ const cc::FrameSinkId& parent_frame_sink_id,
+ const cc::FrameSinkId& child_frame_sink_id) {
+ manager_.UnregisterFrameSinkHierarchy(parent_frame_sink_id,
+ child_frame_sink_id);
+}
+
std::unique_ptr<cc::Display> DisplayCompositor::CreateDisplay(
const cc::FrameSinkId& frame_sink_id,
gpu::SurfaceHandle surface_handle,
@@ -170,4 +165,23 @@ void DisplayCompositor::OnSurfaceCreated(const cc::SurfaceInfo& surface_info) {
void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id,
bool* changed) {}
+void DisplayCompositor::OnClientConnectionLost(
+ const cc::FrameSinkId& frame_sink_id,
+ bool destroy_compositor_frame_sink) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ if (destroy_compositor_frame_sink)
+ DestroyCompositorFrameSink(frame_sink_id);
+ // TODO(fsamuel): Tell the display compositor host that the client connection
+ // has been lost so that it can drop its private connection and allow a new
+ // client instance to create a new CompositorFrameSink.
+}
+
+void DisplayCompositor::OnPrivateConnectionLost(
+ const cc::FrameSinkId& frame_sink_id,
+ bool destroy_compositor_frame_sink) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ if (destroy_compositor_frame_sink)
+ DestroyCompositorFrameSink(frame_sink_id);
+}
+
} // namespace ui
« no previous file with comments | « services/ui/surfaces/display_compositor.h ('k') | services/ui/ws/server_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698