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

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

Issue 2042553002: Mac CoreAnimation compositor in the browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lock_directly
Patch Set: Created 4 years, 6 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> 12 #include <memory>
13 13
14 #include "base/mac/scoped_cftyperef.h" 14 #include "base/mac/scoped_cftyperef.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "gpu/gpu_export.h" 16 #include "gpu/gpu_export.h"
17 #include "gpu/ipc/client/gpu_memory_buffer_impl.h" 17 #include "gpu/ipc/client/gpu_memory_buffer_impl.h"
18 18
19 namespace gpu { 19 namespace gpu {
20 20
21 // Implementation of GPU memory buffer based on IO surfaces. 21 // Implementation of GPU memory buffer based on IO surfaces.
22 class GPU_EXPORT GpuMemoryBufferImplIOSurface : public GpuMemoryBufferImpl { 22 class GPU_EXPORT GpuMemoryBufferImplIOSurface : public GpuMemoryBufferImpl {
23 public: 23 public:
24 ~GpuMemoryBufferImplIOSurface() override; 24 ~GpuMemoryBufferImplIOSurface() override;
25 25
26 void* GetIOSurface() override;
27
26 static std::unique_ptr<GpuMemoryBufferImplIOSurface> CreateFromHandle( 28 static std::unique_ptr<GpuMemoryBufferImplIOSurface> CreateFromHandle(
27 const gfx::GpuMemoryBufferHandle& handle, 29 const gfx::GpuMemoryBufferHandle& handle,
28 const gfx::Size& size, 30 const gfx::Size& size,
29 gfx::BufferFormat format, 31 gfx::BufferFormat format,
30 gfx::BufferUsage usage, 32 gfx::BufferUsage usage,
31 const DestructionCallback& callback); 33 const DestructionCallback& callback);
32 34
33 static bool IsConfigurationSupported(gfx::BufferFormat format, 35 static bool IsConfigurationSupported(gfx::BufferFormat format,
34 gfx::BufferUsage usage); 36 gfx::BufferUsage usage);
35 37
(...skipping 20 matching lines...) Expand all
56 58
57 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; 59 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
58 uint32_t lock_flags_; 60 uint32_t lock_flags_;
59 61
60 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface); 62 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface);
61 }; 63 };
62 64
63 } // namespace gpu 65 } // namespace gpu
64 66
65 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 67 #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