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

Side by Side Diff: gpu/command_buffer/client/gpu_memory_buffer_manager.h

Issue 1975023002: Add GpuMemoryBuffer CreateFromClientId interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just the interface Created 4 years, 7 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 | « content/child/child_gpu_memory_buffer_manager.cc ('k') | no next file » | 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 GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "gpu/gpu_export.h" 10 #include "gpu/gpu_export.h"
(...skipping 15 matching lines...) Expand all
26 gfx::BufferFormat format, 26 gfx::BufferFormat format,
27 gfx::BufferUsage usage, 27 gfx::BufferUsage usage,
28 gpu::SurfaceHandle surface_handle) = 0; 28 gpu::SurfaceHandle surface_handle) = 0;
29 29
30 // Creates a GpuMemoryBuffer from existing handle. 30 // Creates a GpuMemoryBuffer from existing handle.
31 virtual std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( 31 virtual std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle(
32 const gfx::GpuMemoryBufferHandle& handle, 32 const gfx::GpuMemoryBufferHandle& handle,
33 const gfx::Size& size, 33 const gfx::Size& size,
34 gfx::BufferFormat format) = 0; 34 gfx::BufferFormat format) = 0;
35 35
36 // Creates a new GpuMemoryBuffer instance of a client's buffer.
37 virtual std::unique_ptr<gfx::GpuMemoryBuffer>
38 CreateGpuMemoryBufferFromClientId(
39 int client_id,
40 const gfx::GpuMemoryBufferId& gpu_memory_buffer_id) = 0;
41
36 // Returns a GpuMemoryBuffer instance given a ClientBuffer. Returns NULL on 42 // Returns a GpuMemoryBuffer instance given a ClientBuffer. Returns NULL on
37 // failure. 43 // failure.
38 virtual gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer( 44 virtual gfx::GpuMemoryBuffer* GpuMemoryBufferFromClientBuffer(
39 ClientBuffer buffer) = 0; 45 ClientBuffer buffer) = 0;
40 46
41 // Associates destruction sync point with |buffer|. 47 // Associates destruction sync point with |buffer|.
42 virtual void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, 48 virtual void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer,
43 const gpu::SyncToken& sync_token) = 0; 49 const gpu::SyncToken& sync_token) = 0;
44 50
45 protected: 51 protected:
46 virtual ~GpuMemoryBufferManager(); 52 virtual ~GpuMemoryBufferManager();
47 }; 53 };
48 54
49 } // namespace gpu 55 } // namespace gpu
50 56
51 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_ 57 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_MEMORY_BUFFER_MANAGER_H_
OLDNEW
« no previous file with comments | « content/child/child_gpu_memory_buffer_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698