| OLD | NEW |
| 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 CONTENT_BROWSER_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_ | 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_ |
| 7 | 7 |
| 8 #include "gpu/ipc/common/android/surface_texture_manager.h" | 8 #include "gpu/ipc/common/android/surface_texture_manager.h" |
| 9 | 9 |
| 10 #include <memory> |
| 11 |
| 10 #include "base/containers/scoped_ptr_hash_map.h" | 12 #include "base/containers/scoped_ptr_hash_map.h" |
| 11 #include "base/macros.h" | 13 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
| 14 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
| 15 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 16 #include "gpu/ipc/common/android/surface_texture_peer.h" | 17 #include "gpu/ipc/common/android/surface_texture_peer.h" |
| 17 #include "ui/gl/android/scoped_java_surface.h" | 18 #include "ui/gl/android/scoped_java_surface.h" |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 | 21 |
| 21 class CONTENT_EXPORT InProcessSurfaceTextureManager | 22 class CONTENT_EXPORT InProcessSurfaceTextureManager |
| 22 : public gpu::SurfaceTextureManager, | 23 : public gpu::SurfaceTextureManager, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 39 int render_frame_id, | 40 int render_frame_id, |
| 40 int player_id) override; | 41 int player_id) override; |
| 41 | 42 |
| 42 private: | 43 private: |
| 43 friend struct base::DefaultSingletonTraits<InProcessSurfaceTextureManager>; | 44 friend struct base::DefaultSingletonTraits<InProcessSurfaceTextureManager>; |
| 44 | 45 |
| 45 InProcessSurfaceTextureManager(); | 46 InProcessSurfaceTextureManager(); |
| 46 ~InProcessSurfaceTextureManager() override; | 47 ~InProcessSurfaceTextureManager() override; |
| 47 | 48 |
| 48 using SurfaceTextureMap = | 49 using SurfaceTextureMap = |
| 49 base::ScopedPtrHashMap<int, scoped_ptr<gfx::ScopedJavaSurface>>; | 50 base::ScopedPtrHashMap<int, std::unique_ptr<gfx::ScopedJavaSurface>>; |
| 50 SurfaceTextureMap surface_textures_; | 51 SurfaceTextureMap surface_textures_; |
| 51 base::Lock lock_; | 52 base::Lock lock_; |
| 52 | 53 |
| 53 DISALLOW_COPY_AND_ASSIGN(InProcessSurfaceTextureManager); | 54 DISALLOW_COPY_AND_ASSIGN(InProcessSurfaceTextureManager); |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 } // namespace content | 57 } // namespace content |
| 57 | 58 |
| 58 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_ | 59 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_ |
| OLD | NEW |