| 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 21 matching lines...) Expand all Loading... |
| 32 const gfx::Size& size, | 32 const gfx::Size& size, |
| 33 Format format, | 33 Format format, |
| 34 const DestructionCallback& callback); | 34 const DestructionCallback& callback); |
| 35 | 35 |
| 36 static void DeletedByChildProcess(gfx::GpuMemoryBufferId id, | 36 static void DeletedByChildProcess(gfx::GpuMemoryBufferId id, |
| 37 int child_client_id, | 37 int child_client_id, |
| 38 uint32_t sync_point); | 38 uint32_t sync_point); |
| 39 | 39 |
| 40 static bool IsFormatSupported(Format format); | 40 static bool IsFormatSupported(Format format); |
| 41 static bool IsUsageSupported(Usage usage); | 41 static bool IsUsageSupported(Usage usage); |
| 42 static bool IsConfigurationSupported(Format format, Usage usage); | |
| 43 static uint32 PixelFormat(Format format); | |
| 44 | 42 |
| 45 // Overridden from gfx::GpuMemoryBuffer: | 43 // Overridden from gfx::GpuMemoryBuffer: |
| 46 void* Map() override; | 44 void* Map() override; |
| 47 void Unmap() override; | 45 void Unmap() override; |
| 48 uint32 GetStride() const override; | 46 uint32 GetStride() const override; |
| 49 gfx::GpuMemoryBufferHandle GetHandle() const override; | 47 gfx::GpuMemoryBufferHandle GetHandle() const override; |
| 50 | 48 |
| 51 private: | 49 private: |
| 52 GpuMemoryBufferImplIOSurface(gfx::GpuMemoryBufferId id, | 50 GpuMemoryBufferImplIOSurface(gfx::GpuMemoryBufferId id, |
| 53 const gfx::Size& size, | 51 const gfx::Size& size, |
| 54 Format format, | 52 Format format, |
| 55 const DestructionCallback& callback, | 53 const DestructionCallback& callback, |
| 56 IOSurfaceRef io_surface); | 54 IOSurfaceRef io_surface); |
| 57 ~GpuMemoryBufferImplIOSurface() override; | 55 ~GpuMemoryBufferImplIOSurface() override; |
| 58 | 56 |
| 59 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; | 57 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; |
| 60 | 58 |
| 61 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface); | 59 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface); |
| 62 }; | 60 }; |
| 63 | 61 |
| 64 } // namespace content | 62 } // namespace content |
| 65 | 63 |
| 66 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ | 64 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ |
| OLD | NEW |