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

Side by Side Diff: gpu/ipc/common/android/scoped_surface_request_conduit.h

Issue 2285593002: Add ScopedSurfaceRequestManager (Closed)
Patch Set: Simplified manager interface. Renamed to Conduit. 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GPU_IPC_COMMON_ANDROID_SCOPED_SURFACE_REQUEST_CONDUIT_H_
6 #define GPU_IPC_COMMON_ANDROID_SCOPED_SURFACE_REQUEST_CONDUIT_H_
7
8 #include <stdint.h>
9
10 #include "base/callback_forward.h"
watk 2016/08/29 19:42:26 Delete
tguilbert 2016/08/30 22:53:09 Done.
11 #include "gpu/gpu_export.h"
12
13 namespace gl {
14 class SurfaceTexture;
15 class ScopedJavaSurface;
watk 2016/08/29 19:42:27 Delete
tguilbert 2016/08/30 22:53:09 Done.
16 }
17
18 namespace gpu {
19
20 // Defines an interface that allows the registration of gl::ScopedJavaSurface
watk 2016/08/29 19:42:26 Out of date. nit: you can drop the "Defines an int
tguilbert 2016/08/30 22:53:09 Done.
21 // requests in the browser process, and the forwarding of SurfaceTextures from
22 // the GPU or the browser process to fulfill those requests at a later time.
23 class GPU_EXPORT ScopedSurfaceRequestConduit {
24 public:
25 static ScopedSurfaceRequestConduit* GetInstance();
26 static void SetInstance(ScopedSurfaceRequestConduit* instance);
27
28 // Gets and unregisters the callback under |request_id|, and runs the callback
29 // with a gl:ScopedJavaSurface built from |surface_texture|.
30 // If |request_id| does not map to a request, nothing happens.
31 // N.B: Can be called from the GPU or the browser process.
32 virtual void FulfillScopedSurfaceRequest(
33 uint64_t request_id,
34 gl::SurfaceTexture* surface_texture) = 0;
35
36 protected:
37 virtual ~ScopedSurfaceRequestConduit() {}
38 };
39
40 } // namespace gpu
41
42 #endif // GPU_IPC_COMMON_ANDROID_SCOPED_SURFACE_REQUEST_CONDUIT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698