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

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

Issue 2285593002: Add ScopedSurfaceRequestManager (Closed)
Patch Set: Addressing comments Created 4 years, 4 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: 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..dd68e2dee88a23a00cf9466c8bc9b8a666c473d9
--- /dev/null
+++ b/gpu/ipc/common/android/scoped_surface_request_conduit.h
@@ -0,0 +1,37 @@
+// 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 <stdint.h>
+
+#include "gpu/gpu_export.h"
+
+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(
+ uint64_t request_token,
+ gl::SurfaceTexture* surface_texture) = 0;
+
+ protected:
+ virtual ~ScopedSurfaceRequestConduit() {}
+};
+
+} // namespace gpu
+
+#endif // GPU_IPC_COMMON_ANDROID_SCOPED_SURFACE_REQUEST_CONDUIT_H_

Powered by Google App Engine
This is Rietveld 408576698