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

Side by Side Diff: content/common/gpu/gpu_memory_buffer_factory_io_surface.h

Issue 1831513003: Pull gpu service/client shared memory buffer code to GpuMemoryBufferSupport (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed ifdef mixup Created 4 years, 9 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 CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include <IOSurface/IOSurface.h> 10 #include <IOSurface/IOSurface.h>
(...skipping 16 matching lines...) Expand all
27 27
28 namespace content { 28 namespace content {
29 29
30 class CONTENT_EXPORT GpuMemoryBufferFactoryIOSurface 30 class CONTENT_EXPORT GpuMemoryBufferFactoryIOSurface
31 : public GpuMemoryBufferFactory, 31 : public GpuMemoryBufferFactory,
32 public gpu::ImageFactory { 32 public gpu::ImageFactory {
33 public: 33 public:
34 GpuMemoryBufferFactoryIOSurface(); 34 GpuMemoryBufferFactoryIOSurface();
35 ~GpuMemoryBufferFactoryIOSurface() override; 35 ~GpuMemoryBufferFactoryIOSurface() override;
36 36
37 static bool IsGpuMemoryBufferConfigurationSupported(gfx::BufferFormat format,
38 gfx::BufferUsage usage);
39
40 // Overridden from GpuMemoryBufferFactory: 37 // Overridden from GpuMemoryBufferFactory:
41 gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer( 38 gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer(
42 gfx::GpuMemoryBufferId id, 39 gfx::GpuMemoryBufferId id,
43 const gfx::Size& size, 40 const gfx::Size& size,
44 gfx::BufferFormat format, 41 gfx::BufferFormat format,
45 gfx::BufferUsage usage, 42 gfx::BufferUsage usage,
46 int client_id, 43 int client_id,
47 gpu::SurfaceHandle surface_handle) override; 44 gpu::SurfaceHandle surface_handle) override;
48 gfx::GpuMemoryBufferHandle CreateGpuMemoryBufferFromHandle( 45 gfx::GpuMemoryBufferHandle CreateGpuMemoryBufferFromHandle(
49 const gfx::GpuMemoryBufferHandle& handle, 46 const gfx::GpuMemoryBufferHandle& handle,
(...skipping 21 matching lines...) Expand all
71 // used with any GPU process by passing a mach_port to CreateImageCHROMIUM. 68 // used with any GPU process by passing a mach_port to CreateImageCHROMIUM.
72 IOSurfaceMap io_surfaces_; 69 IOSurfaceMap io_surfaces_;
73 base::Lock io_surfaces_lock_; 70 base::Lock io_surfaces_lock_;
74 71
75 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactoryIOSurface); 72 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactoryIOSurface);
76 }; 73 };
77 74
78 } // namespace content 75 } // namespace content
79 76
80 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_ 77 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698