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

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

Issue 1382043003: content: Add CreateGpuMemoryBufferFromHandle to GpuMemoryBufferFactory interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iosurface fix Created 5 years, 2 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
« no previous file with comments | « no previous file | content/common/gpu/gpu_memory_buffer_factory_io_surface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 27 matching lines...) Expand all
38 // Creates a new GPU memory buffer instance. A valid handle is returned on 38 // Creates a new GPU memory buffer instance. A valid handle is returned on
39 // success. It can be called on any thread. 39 // success. It can be called on any thread.
40 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer( 40 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer(
41 gfx::GpuMemoryBufferId id, 41 gfx::GpuMemoryBufferId id,
42 const gfx::Size& size, 42 const gfx::Size& size,
43 gfx::BufferFormat format, 43 gfx::BufferFormat format,
44 gfx::BufferUsage usage, 44 gfx::BufferUsage usage,
45 int client_id, 45 int client_id,
46 gfx::PluginWindowHandle surface_handle) = 0; 46 gfx::PluginWindowHandle surface_handle) = 0;
47 47
48 // Creates a new GPU memory buffer instance from an existing handle. A valid
49 // handle is returned on success. It can be called on any thread.
50 virtual gfx::GpuMemoryBufferHandle CreateGpuMemoryBufferFromHandle(
51 const gfx::GpuMemoryBufferHandle& handle,
52 gfx::GpuMemoryBufferId id,
53 const gfx::Size& size,
54 gfx::BufferFormat format,
55 int client_id) = 0;
56
48 // Destroys GPU memory buffer identified by |id|. 57 // Destroys GPU memory buffer identified by |id|.
49 // It can be called on any thread. 58 // It can be called on any thread.
50 virtual void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 59 virtual void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
51 int client_id) = 0; 60 int client_id) = 0;
52 61
53 // Type-checking downcast routine. 62 // Type-checking downcast routine.
54 virtual gpu::ImageFactory* AsImageFactory() = 0; 63 virtual gpu::ImageFactory* AsImageFactory() = 0;
55 64
56 protected: 65 protected:
57 GpuMemoryBufferFactory() {} 66 GpuMemoryBufferFactory() {}
58 67
59 private: 68 private:
60 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory); 69 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferFactory);
61 }; 70 };
62 71
63 } // namespace content 72 } // namespace content
64 73
65 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_ 74 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | 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