OLD | NEW |
| (Empty) |
1 // Copyright 2014 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_SURFACE_TEXTURE_MANAGER_H_ | |
6 #define GPU_IPC_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_ | |
7 | |
8 #include "gpu/gpu_export.h" | |
9 #include "ui/gfx/native_widget_types.h" | |
10 | |
11 namespace gl { | |
12 class SurfaceTexture; | |
13 } | |
14 | |
15 namespace gpu { | |
16 | |
17 class GPU_EXPORT SurfaceTextureManager { | |
18 public: | |
19 static SurfaceTextureManager* GetInstance(); | |
20 static void SetInstance(SurfaceTextureManager* instance); | |
21 | |
22 // Register a surface texture for use in another process. | |
23 virtual void RegisterSurfaceTexture(int surface_texture_id, | |
24 int client_id, | |
25 gl::SurfaceTexture* surface_texture) = 0; | |
26 | |
27 // Unregister a surface texture previously registered for use in another | |
28 // process. | |
29 virtual void UnregisterSurfaceTexture(int surface_texture_id, | |
30 int client_id) = 0; | |
31 | |
32 // Acquire native widget for a registered surface texture. | |
33 virtual gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture( | |
34 int surface_texture_id) = 0; | |
35 | |
36 protected: | |
37 virtual ~SurfaceTextureManager() {} | |
38 }; | |
39 | |
40 } // namespace gpu | |
41 | |
42 #endif // GPU_IPC_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_ | |
OLD | NEW |