| 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 "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/threading/thread_checker.h" |
| 11 #include "content/common/gpu/gpu_memory_buffer_factory.h" | 11 #include "content/common/gpu/gpu_memory_buffer_factory.h" |
| 12 #include "gpu/command_buffer/service/image_factory.h" | 12 #include "gpu/command_buffer/service/image_factory.h" |
| 13 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
| 14 #include "ui/gfx/gpu_memory_buffer.h" | 14 #include "ui/gfx/gpu_memory_buffer.h" |
| 15 | 15 |
| 16 namespace gfx { | 16 namespace gfx { |
| 17 class GLImage; | 17 class GLImage; |
| 18 class SurfaceTexture; | 18 class SurfaceTexture; |
| 19 } | 19 } |
| 20 | 20 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 50 const gfx::Size& size, | 50 const gfx::Size& size, |
| 51 gfx::GpuMemoryBuffer::Format format, | 51 gfx::GpuMemoryBuffer::Format format, |
| 52 unsigned internalformat, | 52 unsigned internalformat, |
| 53 int client_id) override; | 53 int client_id) override; |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 typedef std::pair<int, int> SurfaceTextureMapKey; | 56 typedef std::pair<int, int> SurfaceTextureMapKey; |
| 57 typedef base::hash_map<SurfaceTextureMapKey, | 57 typedef base::hash_map<SurfaceTextureMapKey, |
| 58 scoped_refptr<gfx::SurfaceTexture>> SurfaceTextureMap; | 58 scoped_refptr<gfx::SurfaceTexture>> SurfaceTextureMap; |
| 59 SurfaceTextureMap surface_textures_; | 59 SurfaceTextureMap surface_textures_; |
| 60 base::Lock surface_textures_lock_; | 60 base::ThreadChecker thread_checker_; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace content | 63 } // namespace content |
| 64 | 64 |
| 65 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ | 65 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_ |
| OLD | NEW |