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

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

Issue 1835173003: gpu: Remove GPU service side GMB creation from handle. Base URL: https://chromium.googlesource.com/chromium/src.git@ozone-gmb-gpu-process-refactor
Patch Set: 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_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 20 matching lines...) Expand all
31 // Creates a new GPU memory buffer instance. A valid handle is returned on 31 // Creates a new GPU memory buffer instance. A valid handle is returned on
32 // success. It can be called on any thread. 32 // success. It can be called on any thread.
33 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer( 33 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer(
34 gfx::GpuMemoryBufferId id, 34 gfx::GpuMemoryBufferId id,
35 const gfx::Size& size, 35 const gfx::Size& size,
36 gfx::BufferFormat format, 36 gfx::BufferFormat format,
37 gfx::BufferUsage usage, 37 gfx::BufferUsage usage,
38 int client_id, 38 int client_id,
39 gpu::SurfaceHandle surface_handle) = 0; 39 gpu::SurfaceHandle surface_handle) = 0;
40 40
41 // Creates a new GPU memory buffer instance from an existing handle. A valid
42 // handle is returned on success. It can be called on any thread.
43 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBufferFromHandle(
44 const gfx::GpuMemoryBufferHandle& handle,
45 gfx::GpuMemoryBufferId id,
46 const gfx::Size& size,
47 gfx::BufferFormat format,
48 int client_id) = 0;
49
50 // Destroys GPU memory buffer identified by |id|. 41 // Destroys GPU memory buffer identified by |id|.
51 // It can be called on any thread. 42 // It can be called on any thread.
52 virtual void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 43 virtual void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
53 int client_id) = 0; 44 int client_id) = 0;
54 45
55 // Type-checking downcast routine. 46 // Type-checking downcast routine.
56 virtual gpu::ImageFactory* AsImageFactory() = 0; 47 virtual gpu::ImageFactory* AsImageFactory() = 0;
57 48
58 protected: 49 protected:
59 GpuMemoryBufferFactory() {} 50 GpuMemoryBufferFactory() {}
60 51
61 private: 52 private:
62 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory); 53 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory);
63 }; 54 };
64 55
65 } // namespace content 56 } // namespace content
66 57
67 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ 58 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/common/gpu/gpu_memory_buffer_factory_io_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698