| 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_IO_SURFACE_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ | 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ |
| 7 | 7 |
| 8 #include <IOSurface/IOSurfaceAPI.h> | 8 #include <IOSurface/IOSurfaceAPI.h> |
| 9 | 9 |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| 11 #include "base/mac/scoped_cftyperef.h" | 11 #include "base/mac/scoped_cftyperef.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
| 14 #include "base/threading/thread_checker.h" |
| 14 #include "content/common/gpu/gpu_memory_buffer_factory.h" | 15 #include "content/common/gpu/gpu_memory_buffer_factory.h" |
| 15 #include "gpu/command_buffer/service/image_factory.h" | 16 #include "gpu/command_buffer/service/image_factory.h" |
| 16 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
| 17 #include "ui/gfx/gpu_memory_buffer.h" | 18 #include "ui/gfx/gpu_memory_buffer.h" |
| 18 | 19 |
| 19 namespace gfx { | 20 namespace gfx { |
| 20 class GLImage; | 21 class GLImage; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace content { | 24 namespace content { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 53 gfx::GpuMemoryBuffer::Format format, | 54 gfx::GpuMemoryBuffer::Format format, |
| 54 unsigned internalformat, | 55 unsigned internalformat, |
| 55 int client_id) override; | 56 int client_id) override; |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 typedef std::pair<int, int> IOSurfaceMapKey; | 59 typedef std::pair<int, int> IOSurfaceMapKey; |
| 59 typedef base::hash_map<IOSurfaceMapKey, base::ScopedCFTypeRef<IOSurfaceRef>> | 60 typedef base::hash_map<IOSurfaceMapKey, base::ScopedCFTypeRef<IOSurfaceRef>> |
| 60 IOSurfaceMap; | 61 IOSurfaceMap; |
| 61 IOSurfaceMap io_surfaces_; | 62 IOSurfaceMap io_surfaces_; |
| 62 base::Lock io_surfaces_lock_; | 63 base::Lock io_surfaces_lock_; |
| 64 base::ThreadChecker thread_checker_; |
| 63 | 65 |
| 64 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactoryIOSurface); | 66 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactoryIOSurface); |
| 65 }; | 67 }; |
| 66 | 68 |
| 67 } // namespace content | 69 } // namespace content |
| 68 | 70 |
| 69 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ | 71 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ |
| OLD | NEW |