summaryrefslogtreecommitdiff
path: root/chromium/components/viz/frame_sinks/gpu_compositor_frame_sink_delegate.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/viz/frame_sinks/gpu_compositor_frame_sink_delegate.h')
-rw-r--r--chromium/components/viz/frame_sinks/gpu_compositor_frame_sink_delegate.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/chromium/components/viz/frame_sinks/gpu_compositor_frame_sink_delegate.h b/chromium/components/viz/frame_sinks/gpu_compositor_frame_sink_delegate.h
new file mode 100644
index 00000000000..d9d45ae2a6b
--- /dev/null
+++ b/chromium/components/viz/frame_sinks/gpu_compositor_frame_sink_delegate.h
@@ -0,0 +1,30 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_VIZ_FRAME_SINKS_GPU_COMPOSITOR_FRAME_SINK_DELEGATE_H_
+#define COMPONENTS_VIZ_FRAME_SINKS_GPU_COMPOSITOR_FRAME_SINK_DELEGATE_H_
+
+namespace cc {
+class FrameSinkId;
+}
+
+namespace viz {
+
+class GpuCompositorFrameSinkDelegate {
+ public:
+ // We must avoid destroying a GpuCompositorFrameSink until both the display
+ // compositor host and the client drop their connection to avoid getting into
+ // a state where surfaces references are inconsistent.
+ virtual void OnClientConnectionLost(const cc::FrameSinkId& frame_sink_id,
+ bool destroy_compositor_frame_sink) = 0;
+ virtual void OnPrivateConnectionLost(const cc::FrameSinkId& frame_sink_id,
+ bool destroy_compositor_frame_sink) = 0;
+
+ protected:
+ virtual ~GpuCompositorFrameSinkDelegate() {}
+};
+
+} // namespace viz
+
+#endif // COMPONENTS_VIZ_FRAME_SINKS_GPU_COMPOSITOR_FRAME_SINK_DELEGATE_H_