OLD | NEW |
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_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ | 5 #ifndef GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ |
6 #define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ | 6 #define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, | 41 void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, |
42 int client_id) override; | 42 int client_id) override; |
43 ImageFactory* AsImageFactory() override; | 43 ImageFactory* AsImageFactory() override; |
44 | 44 |
45 // Overridden from ImageFactory: | 45 // Overridden from ImageFactory: |
46 scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( | 46 scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( |
47 const gfx::GpuMemoryBufferHandle& handle, | 47 const gfx::GpuMemoryBufferHandle& handle, |
48 const gfx::Size& size, | 48 const gfx::Size& size, |
49 gfx::BufferFormat format, | 49 gfx::BufferFormat format, |
50 unsigned internalformat, | 50 unsigned internalformat, |
51 int client_id) override; | 51 int client_id, |
| 52 SurfaceHandle surface_handle) override; |
52 | 53 |
53 private: | 54 private: |
54 typedef std::pair<int, int> SurfaceTextureMapKey; | 55 typedef std::pair<int, int> SurfaceTextureMapKey; |
55 typedef base::hash_map<SurfaceTextureMapKey, | 56 typedef base::hash_map<SurfaceTextureMapKey, |
56 scoped_refptr<gl::SurfaceTexture>> | 57 scoped_refptr<gl::SurfaceTexture>> |
57 SurfaceTextureMap; | 58 SurfaceTextureMap; |
58 SurfaceTextureMap surface_textures_; | 59 SurfaceTextureMap surface_textures_; |
59 base::Lock surface_textures_lock_; | 60 base::Lock surface_textures_lock_; |
60 }; | 61 }; |
61 | 62 |
62 } // namespace gpu | 63 } // namespace gpu |
63 | 64 |
64 #endif // GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ | 65 #endif // GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ |
OLD | NEW |