Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(430)

Side by Side Diff: gpu/ipc/client/gpu_memory_buffer_impl_io_surface.h

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 5 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
7 7
8 #include <IOSurface/IOSurface.h> 8 #include <IOSurface/IOSurface.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
11 11
12 #include <memory>
13
12 #include "base/mac/scoped_cftyperef.h" 14 #include "base/mac/scoped_cftyperef.h"
13 #include "base/macros.h" 15 #include "base/macros.h"
14 #include "gpu/gpu_export.h" 16 #include "gpu/gpu_export.h"
15 #include "gpu/ipc/client/gpu_memory_buffer_impl.h" 17 #include "gpu/ipc/client/gpu_memory_buffer_impl.h"
16 18
17 namespace gpu { 19 namespace gpu {
18 20
19 // Implementation of GPU memory buffer based on IO surfaces. 21 // Implementation of GPU memory buffer based on IO surfaces.
20 class GPU_EXPORT GpuMemoryBufferImplIOSurface : public GpuMemoryBufferImpl { 22 class GPU_EXPORT GpuMemoryBufferImplIOSurface : public GpuMemoryBufferImpl {
21 public: 23 public:
22 ~GpuMemoryBufferImplIOSurface() override; 24 ~GpuMemoryBufferImplIOSurface() override;
23 25
24 static scoped_ptr<GpuMemoryBufferImplIOSurface> CreateFromHandle( 26 static std::unique_ptr<GpuMemoryBufferImplIOSurface> CreateFromHandle(
25 const gfx::GpuMemoryBufferHandle& handle, 27 const gfx::GpuMemoryBufferHandle& handle,
26 const gfx::Size& size, 28 const gfx::Size& size,
27 gfx::BufferFormat format, 29 gfx::BufferFormat format,
28 gfx::BufferUsage usage, 30 gfx::BufferUsage usage,
29 const DestructionCallback& callback); 31 const DestructionCallback& callback);
30 32
31 static bool IsConfigurationSupported(gfx::BufferFormat format, 33 static bool IsConfigurationSupported(gfx::BufferFormat format,
32 gfx::BufferUsage usage); 34 gfx::BufferUsage usage);
33 35
34 static base::Closure AllocateForTesting(const gfx::Size& size, 36 static base::Closure AllocateForTesting(const gfx::Size& size,
(...skipping 19 matching lines...) Expand all
54 56
55 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; 57 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
56 uint32_t lock_flags_; 58 uint32_t lock_flags_;
57 59
58 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface); 60 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface);
59 }; 61 };
60 62
61 } // namespace gpu 63 } // namespace gpu
62 64
63 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 65 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
OLDNEW
« no previous file with comments | « gpu/ipc/client/gpu_memory_buffer_impl.cc ('k') | gpu/ipc/client/gpu_memory_buffer_impl_io_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698