| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ |
| 7 | 7 |
| 8 #include <IOSurface/IOSurfaceAPI.h> | 8 #include <IOSurface/IOSurfaceAPI.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_cftyperef.h" | 10 #include "base/mac/scoped_cftyperef.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 const gfx::Size& size, | 30 const gfx::Size& size, |
| 31 Format format, | 31 Format format, |
| 32 const DestructionCallback& callback); | 32 const DestructionCallback& callback); |
| 33 | 33 |
| 34 static bool IsFormatSupported(Format format); | 34 static bool IsFormatSupported(Format format); |
| 35 static bool IsUsageSupported(Usage usage); | 35 static bool IsUsageSupported(Usage usage); |
| 36 static bool IsConfigurationSupported(Format format, Usage usage); | 36 static bool IsConfigurationSupported(Format format, Usage usage); |
| 37 static uint32 PixelFormat(Format format); | 37 static uint32 PixelFormat(Format format); |
| 38 | 38 |
| 39 // Overridden from gfx::GpuMemoryBuffer: | 39 // Overridden from gfx::GpuMemoryBuffer: |
| 40 virtual void* Map() override; | 40 void* Map() override; |
| 41 virtual void Unmap() override; | 41 void Unmap() override; |
| 42 virtual uint32 GetStride() const override; | 42 uint32 GetStride() const override; |
| 43 virtual gfx::GpuMemoryBufferHandle GetHandle() const override; | 43 gfx::GpuMemoryBufferHandle GetHandle() const override; |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 GpuMemoryBufferImplIOSurface(const gfx::Size& size, | 46 GpuMemoryBufferImplIOSurface(const gfx::Size& size, |
| 47 Format format, | 47 Format format, |
| 48 const DestructionCallback& callback, | 48 const DestructionCallback& callback, |
| 49 IOSurfaceRef io_surface); | 49 IOSurfaceRef io_surface); |
| 50 virtual ~GpuMemoryBufferImplIOSurface(); | 50 ~GpuMemoryBufferImplIOSurface() override; |
| 51 | 51 |
| 52 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; | 52 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; |
| 53 | 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface); | 54 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface); |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace content | 57 } // namespace content |
| 58 | 58 |
| 59 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ | 59 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ |
| OLD | NEW |