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

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

Issue 1974163003: Expose GpuMemoryBufferId through glGetImageivCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 6 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 GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // Destroy an image. The ID must be positive. 52 // Destroy an image. The ID must be positive.
53 virtual void DestroyImage(int32_t id) = 0; 53 virtual void DestroyImage(int32_t id) = 0;
54 54
55 // Create a gpu memory buffer backed image with the given dimensions and 55 // Create a gpu memory buffer backed image with the given dimensions and
56 // format for |usage|. Returns its ID or -1 on error. 56 // format for |usage|. Returns its ID or -1 on error.
57 virtual int32_t CreateGpuMemoryBufferImage(size_t width, 57 virtual int32_t CreateGpuMemoryBufferImage(size_t width,
58 size_t height, 58 size_t height,
59 unsigned internalformat, 59 unsigned internalformat,
60 unsigned usage) = 0; 60 unsigned usage) = 0;
61 61
62 // Returns the id of the GpuMemoryBuffer associated with the given image. If
63 // the image doesn't exist, or isn't associated with a GpuMemoryBuffer,
64 // returns -1.
65 virtual int32_t GetImageGpuMemoryBufferId(unsigned image_id) = 0;
66
62 // Runs |callback| when a query created via glCreateQueryEXT() has cleared 67 // Runs |callback| when a query created via glCreateQueryEXT() has cleared
63 // passed the glEndQueryEXT() point. 68 // passed the glEndQueryEXT() point.
64 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0; 69 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0;
65 70
66 // Sets a lock this will be held on every callback from the GPU 71 // Sets a lock this will be held on every callback from the GPU
67 // implementation. This lock must be set and must be held on every call into 72 // implementation. This lock must be set and must be held on every call into
68 // the GPU implementation if it is to be used from multiple threads. This 73 // the GPU implementation if it is to be used from multiple threads. This
69 // may not be supported with all implementations. 74 // may not be supported with all implementations.
70 virtual void SetLock(base::Lock*) = 0; 75 virtual void SetLock(base::Lock*) = 0;
71 76
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // be enqueued first so does not need to be flushed. 113 // be enqueued first so does not need to be flushed.
109 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; 114 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0;
110 115
111 private: 116 private:
112 DISALLOW_COPY_AND_ASSIGN(GpuControl); 117 DISALLOW_COPY_AND_ASSIGN(GpuControl);
113 }; 118 };
114 119
115 } // namespace gpu 120 } // namespace gpu
116 121
117 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ 122 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h ('k') | gpu/command_buffer/cmd_buffer_functions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698