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

Side by Side Diff: gpu/ipc/client/android/in_process_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, 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_ 5 #ifndef GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_
6 #define GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_ 6 #define GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
(...skipping 10 matching lines...) Expand all
21 public: 21 public:
22 static GPU_EXPORT InProcessSurfaceTextureManager* GetInstance(); 22 static GPU_EXPORT InProcessSurfaceTextureManager* GetInstance();
23 23
24 // Overridden from SurfaceTextureManager: 24 // Overridden from SurfaceTextureManager:
25 void RegisterSurfaceTexture(int surface_texture_id, 25 void RegisterSurfaceTexture(int surface_texture_id,
26 int client_id, 26 int client_id,
27 gl::SurfaceTexture* surface_texture) override; 27 gl::SurfaceTexture* surface_texture) override;
28 void UnregisterSurfaceTexture(int surface_texture_id, int client_id) override; 28 void UnregisterSurfaceTexture(int surface_texture_id, int client_id) override;
29 gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture( 29 gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture(
30 int surface_texture_id) override; 30 int surface_texture_id) override;
31 void RegisterBrowserSurfaceTexture(
32 int surface_texture_id,
33 gl::SurfaceTexture* surface_texture) override;
34 void UnregisterBrowserSurfaceTexture(int surface_texture_id) override;
35 gl::ScopedJavaSurface GetBrowserSurfaceTexture(
36 int surface_texture_id) override;
31 37
32 private: 38 private:
33 friend struct base::DefaultSingletonTraits<InProcessSurfaceTextureManager>; 39 friend struct base::DefaultSingletonTraits<InProcessSurfaceTextureManager>;
34 40
35 InProcessSurfaceTextureManager(); 41 InProcessSurfaceTextureManager();
36 ~InProcessSurfaceTextureManager() override; 42 ~InProcessSurfaceTextureManager() override;
37 43
38 using SurfaceTextureMap = 44 using SurfaceTextureMap =
39 base::ScopedPtrHashMap<int, std::unique_ptr<gl::ScopedJavaSurface>>; 45 base::ScopedPtrHashMap<int, std::unique_ptr<gl::ScopedJavaSurface>>;
40 SurfaceTextureMap surface_textures_; 46 SurfaceTextureMap surface_textures_;
47
48 // TODO(tguilbert): Use the same unorderer map if possible.
49 std::unordered_map<int, gl::ScopedJavaSurface> browser_surface_textures_;
41 base::Lock lock_; 50 base::Lock lock_;
42 51
43 DISALLOW_COPY_AND_ASSIGN(InProcessSurfaceTextureManager); 52 DISALLOW_COPY_AND_ASSIGN(InProcessSurfaceTextureManager);
44 }; 53 };
45 54
46 } // namespace gpu 55 } // namespace gpu
47 56
48 #endif // GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_ 57 #endif // GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/android/stream_texture_factory.cc ('k') | gpu/ipc/client/android/in_process_surface_texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698