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

Unified Diff: gpu/ipc/common/android/scoped_surface_request_conduit.h

Issue 2285593002: Add ScopedSurfaceRequestManager (Closed)
Patch Set: Added RunUntilIdle() to 2 UTs Created 4 years, 3 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 | « gpu/ipc/common/BUILD.gn ('k') | gpu/ipc/common/android/scoped_surface_request_conduit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/common/android/scoped_surface_request_conduit.h
diff --git a/gpu/ipc/common/android/scoped_surface_request_conduit.h b/gpu/ipc/common/android/scoped_surface_request_conduit.h
new file mode 100644
index 0000000000000000000000000000000000000000..d5b33933742689e013e3e058950e92c77e82241a
--- /dev/null
+++ b/gpu/ipc/common/android/scoped_surface_request_conduit.h
@@ -0,0 +1,39 @@
+// Copyright 2016 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 GPU_IPC_COMMON_ANDROID_SCOPED_SURFACE_REQUEST_CONDUIT_H_
+#define GPU_IPC_COMMON_ANDROID_SCOPED_SURFACE_REQUEST_CONDUIT_H_
+
+#include "gpu/gpu_export.h"
+
+namespace base {
+class UnguessableToken;
+}
+
+namespace gl {
+class SurfaceTexture;
+}
+
+namespace gpu {
+
+// Allows the forwarding of SurfaceTextures from the GPU or the browser process
+// to fulfill requests registered by the ScopedSurfaceRequestManager.
+class GPU_EXPORT ScopedSurfaceRequestConduit {
+ public:
+ static ScopedSurfaceRequestConduit* GetInstance();
+ static void SetInstance(ScopedSurfaceRequestConduit* instance);
+
+ // Sends the surface texture to the ScopedSurfaceRequestManager in the browser
+ // process, to fulfill the request registered under the |request_token| key.
+ virtual void ForwardSurfaceTextureForSurfaceRequest(
+ const base::UnguessableToken& request_token,
+ const gl::SurfaceTexture* surface_texture) = 0;
+
+ protected:
+ virtual ~ScopedSurfaceRequestConduit() {}
+};
+
+} // namespace gpu
+
+#endif // GPU_IPC_COMMON_ANDROID_SCOPED_SURFACE_REQUEST_CONDUIT_H_
« no previous file with comments | « gpu/ipc/common/BUILD.gn ('k') | gpu/ipc/common/android/scoped_surface_request_conduit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698