OLD | NEW |
(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 "gpu/gpu_export.h" |
| 9 |
| 10 namespace base { |
| 11 class UnguessableToken; |
| 12 } |
| 13 |
| 14 namespace gl { |
| 15 class SurfaceTexture; |
| 16 } |
| 17 |
| 18 namespace gpu { |
| 19 |
| 20 // Allows the forwarding of SurfaceTextures from the GPU or the browser process |
| 21 // to fulfill requests registered by the ScopedSurfaceRequestManager. |
| 22 class GPU_EXPORT ScopedSurfaceRequestConduit { |
| 23 public: |
| 24 static ScopedSurfaceRequestConduit* GetInstance(); |
| 25 static void SetInstance(ScopedSurfaceRequestConduit* instance); |
| 26 |
| 27 // Sends the surface texture to the ScopedSurfaceRequestManager in the browser |
| 28 // process, to fulfill the request registered under the |request_token| key. |
| 29 virtual void ForwardSurfaceTextureForSurfaceRequest( |
| 30 const base::UnguessableToken& request_token, |
| 31 const gl::SurfaceTexture* surface_texture) = 0; |
| 32 |
| 33 protected: |
| 34 virtual ~ScopedSurfaceRequestConduit() {} |
| 35 }; |
| 36 |
| 37 } // namespace gpu |
| 38 |
| 39 #endif // GPU_IPC_COMMON_ANDROID_SCOPED_SURFACE_REQUEST_CONDUIT_H_ |
OLD | NEW |