| 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 CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ | 6 #define CONTENT_COMMON_GPU_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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 namespace content { | 27 namespace content { |
| 28 | 28 |
| 29 class CONTENT_EXPORT GpuMemoryBufferFactorySurfaceTexture | 29 class CONTENT_EXPORT GpuMemoryBufferFactorySurfaceTexture |
| 30 : public GpuMemoryBufferFactory, | 30 : public GpuMemoryBufferFactory, |
| 31 public gpu::ImageFactory { | 31 public gpu::ImageFactory { |
| 32 public: | 32 public: |
| 33 GpuMemoryBufferFactorySurfaceTexture(); | 33 GpuMemoryBufferFactorySurfaceTexture(); |
| 34 ~GpuMemoryBufferFactorySurfaceTexture() override; | 34 ~GpuMemoryBufferFactorySurfaceTexture() override; |
| 35 | 35 |
| 36 static bool IsGpuMemoryBufferConfigurationSupported(gfx::BufferFormat format, | |
| 37 gfx::BufferUsage usage); | |
| 38 | |
| 39 // Overridden from GpuMemoryBufferFactory: | 36 // Overridden from GpuMemoryBufferFactory: |
| 40 gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer( | 37 gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer( |
| 41 gfx::GpuMemoryBufferId id, | 38 gfx::GpuMemoryBufferId id, |
| 42 const gfx::Size& size, | 39 const gfx::Size& size, |
| 43 gfx::BufferFormat format, | 40 gfx::BufferFormat format, |
| 44 gfx::BufferUsage usage, | 41 gfx::BufferUsage usage, |
| 45 int client_id, | 42 int client_id, |
| 46 gpu::SurfaceHandle surface_handle) override; | 43 gpu::SurfaceHandle surface_handle) override; |
| 47 gfx::GpuMemoryBufferHandle CreateGpuMemoryBufferFromHandle( | 44 gfx::GpuMemoryBufferHandle CreateGpuMemoryBufferFromHandle( |
| 48 const gfx::GpuMemoryBufferHandle& handle, | 45 const gfx::GpuMemoryBufferHandle& handle, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 66 typedef std::pair<int, int> SurfaceTextureMapKey; | 63 typedef std::pair<int, int> SurfaceTextureMapKey; |
| 67 typedef base::hash_map<SurfaceTextureMapKey, | 64 typedef base::hash_map<SurfaceTextureMapKey, |
| 68 scoped_refptr<gfx::SurfaceTexture>> SurfaceTextureMap; | 65 scoped_refptr<gfx::SurfaceTexture>> SurfaceTextureMap; |
| 69 SurfaceTextureMap surface_textures_; | 66 SurfaceTextureMap surface_textures_; |
| 70 base::Lock surface_textures_lock_; | 67 base::Lock surface_textures_lock_; |
| 71 }; | 68 }; |
| 72 | 69 |
| 73 } // namespace content | 70 } // namespace content |
| 74 | 71 |
| 75 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ | 72 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ |
| OLD | NEW |