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

Side by Side Diff: gpu/ipc/client/gpu_memory_buffer_impl_surface_texture.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 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 GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ 5 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_
6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ 6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_
7 7
8 #include <android/native_window.h> 8 #include <android/native_window.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
11 #include <memory>
12
11 #include "base/macros.h" 13 #include "base/macros.h"
12 #include "gpu/gpu_export.h" 14 #include "gpu/gpu_export.h"
13 #include "gpu/ipc/client/gpu_memory_buffer_impl.h" 15 #include "gpu/ipc/client/gpu_memory_buffer_impl.h"
14 16
15 namespace gpu { 17 namespace gpu {
16 18
17 // Implementation of GPU memory buffer based on SurfaceTextures. 19 // Implementation of GPU memory buffer based on SurfaceTextures.
18 class GPU_EXPORT GpuMemoryBufferImplSurfaceTexture 20 class GPU_EXPORT GpuMemoryBufferImplSurfaceTexture
19 : public GpuMemoryBufferImpl { 21 : public GpuMemoryBufferImpl {
20 public: 22 public:
21 ~GpuMemoryBufferImplSurfaceTexture() override; 23 ~GpuMemoryBufferImplSurfaceTexture() override;
22 24
23 static scoped_ptr<GpuMemoryBufferImplSurfaceTexture> CreateFromHandle( 25 static std::unique_ptr<GpuMemoryBufferImplSurfaceTexture> CreateFromHandle(
24 const gfx::GpuMemoryBufferHandle& handle, 26 const gfx::GpuMemoryBufferHandle& handle,
25 const gfx::Size& size, 27 const gfx::Size& size,
26 gfx::BufferFormat format, 28 gfx::BufferFormat format,
27 gfx::BufferUsage usage, 29 gfx::BufferUsage usage,
28 const DestructionCallback& callback); 30 const DestructionCallback& callback);
29 31
30 static bool IsConfigurationSupported(gfx::BufferFormat format, 32 static bool IsConfigurationSupported(gfx::BufferFormat format,
31 gfx::BufferUsage usage); 33 gfx::BufferUsage usage);
32 34
33 static base::Closure AllocateForTesting(const gfx::Size& size, 35 static base::Closure AllocateForTesting(const gfx::Size& size,
(...skipping 17 matching lines...) Expand all
51 53
52 ANativeWindow* native_window_; 54 ANativeWindow* native_window_;
53 ANativeWindow_Buffer buffer_; 55 ANativeWindow_Buffer buffer_;
54 56
55 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSurfaceTexture); 57 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplSurfaceTexture);
56 }; 58 };
57 59
58 } // namespace gpu 60 } // namespace gpu
59 61
60 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_ 62 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_SURFACE_TEXTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698