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

Side by Side Diff: content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h

Issue 654223006: Cleanup GpuMemoryBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style nits Created 6 years, 1 month 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 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 13 matching lines...) Expand all
24 Format format, 24 Format format,
25 int child_client_id, 25 int child_client_id,
26 const AllocationCallback& callback); 26 const AllocationCallback& callback);
27 27
28 static scoped_ptr<GpuMemoryBufferImpl> CreateFromHandle( 28 static scoped_ptr<GpuMemoryBufferImpl> CreateFromHandle(
29 const gfx::GpuMemoryBufferHandle& handle, 29 const gfx::GpuMemoryBufferHandle& handle,
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 void DeletedByChildProcess(const gfx::GpuMemoryBufferId& id,
35 uint32_t sync_point);
36
34 static bool IsFormatSupported(Format format); 37 static bool IsFormatSupported(Format format);
35 static bool IsUsageSupported(Usage usage); 38 static bool IsUsageSupported(Usage usage);
36 static bool IsConfigurationSupported(Format format, Usage usage); 39 static bool IsConfigurationSupported(Format format, Usage usage);
37 static uint32 PixelFormat(Format format); 40 static uint32 PixelFormat(Format format);
38 41
39 // Overridden from gfx::GpuMemoryBuffer: 42 // Overridden from gfx::GpuMemoryBuffer:
40 void* Map() override; 43 void* Map() override;
41 void Unmap() override; 44 void Unmap() override;
42 uint32 GetStride() const override; 45 uint32 GetStride() const override;
43 gfx::GpuMemoryBufferHandle GetHandle() const override; 46 gfx::GpuMemoryBufferHandle GetHandle() const override;
44 47
45 private: 48 private:
46 GpuMemoryBufferImplIOSurface(const gfx::Size& size, 49 GpuMemoryBufferImplIOSurface(const gfx::Size& size,
47 Format format, 50 Format format,
48 const DestructionCallback& callback, 51 const DestructionCallback& callback,
49 IOSurfaceRef io_surface); 52 IOSurfaceRef io_surface);
50 ~GpuMemoryBufferImplIOSurface() override; 53 ~GpuMemoryBufferImplIOSurface() override;
51 54
52 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_; 55 base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
53 56
54 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface); 57 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplIOSurface);
55 }; 58 };
56 59
57 } // namespace content 60 } // namespace content
58 61
59 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_ 62 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_MEMORY_BUFFER_IMPL_IO_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698