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

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

Issue 2268173002: Add StreamTexture resgistration for the Browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_IPC_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_ 5 #ifndef GPU_IPC_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_
6 #define GPU_IPC_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_ 6 #define GPU_IPC_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_
7 7
8 #include "gpu/gpu_export.h" 8 #include "gpu/gpu_export.h"
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 10
11 namespace gl { 11 namespace gl {
12 class SurfaceTexture; 12 class SurfaceTexture;
13 class ScopedJavaSurface;
13 } 14 }
14 15
15 namespace gpu { 16 namespace gpu {
16 17
17 class GPU_EXPORT SurfaceTextureManager { 18 class GPU_EXPORT SurfaceTextureManager {
18 public: 19 public:
19 static SurfaceTextureManager* GetInstance(); 20 static SurfaceTextureManager* GetInstance();
20 static void SetInstance(SurfaceTextureManager* instance); 21 static void SetInstance(SurfaceTextureManager* instance);
21 22
22 // Register a surface texture for use in another process. 23 // Register a surface texture for use in another process.
23 virtual void RegisterSurfaceTexture(int surface_texture_id, 24 virtual void RegisterSurfaceTexture(int surface_texture_id,
24 int client_id, 25 int client_id,
25 gl::SurfaceTexture* surface_texture) = 0; 26 gl::SurfaceTexture* surface_texture) = 0;
26 27
27 // Unregister a surface texture previously registered for use in another 28 // Unregister a surface texture previously registered for use in another
28 // process. 29 // process.
29 virtual void UnregisterSurfaceTexture(int surface_texture_id, 30 virtual void UnregisterSurfaceTexture(int surface_texture_id,
30 int client_id) = 0; 31 int client_id) = 0;
31 32
32 // Acquire native widget for a registered surface texture. 33 // Acquire native widget for a registered surface texture.
33 virtual gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture( 34 virtual gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture(
34 int surface_texture_id) = 0; 35 int surface_texture_id) = 0;
35 36
37 // Register a surface texture for use in the browser process.
38 virtual void RegisterBrowserSurfaceTexture(
39 int surface_texture_id,
40 gl::SurfaceTexture* surface_texture) = 0;
41
42 // Unregister a surface texture previously registererd for use in the browser
43 // process.
44 virtual void UnregisterBrowserSurfaceTexture(int surface_texture_id) = 0;
45
46 // Acquires surface previously registered for use in the browser process.
47 virtual gl::ScopedJavaSurface GetBrowserSurfaceTexture(
48 int surface_texture_id) = 0;
49
36 protected: 50 protected:
37 virtual ~SurfaceTextureManager() {} 51 virtual ~SurfaceTextureManager() {}
38 }; 52 };
39 53
40 } // namespace gpu 54 } // namespace gpu
41 55
42 #endif // GPU_IPC_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_ 56 #endif // GPU_IPC_COMMON_ANDROID_SURFACE_TEXTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/ipc/client/android/in_process_surface_texture_manager.cc ('k') | gpu/ipc/common/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698