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

Side by Side Diff: ui/gl/gl_bindings_skia_in_process.cc

Issue 1260253003: gpu: Add calling convention for win32 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another merge Created 5 years, 4 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 | « third_party/mojo/src/mojo/public/platform/native/gles2_impl_thunks.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 5
6 #include "ui/gl/gl_bindings_skia_in_process.h" 6 #include "ui/gl/gl_bindings_skia_in_process.h"
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" 9 #include "third_party/skia/include/gpu/gl/GrGLInterface.h"
10 #include "ui/gl/gl_bindings.h" 10 #include "ui/gl/gl_bindings.h"
11 #include "ui/gl/gl_implementation.h" 11 #include "ui/gl/gl_implementation.h"
12 12
13 namespace { 13 namespace {
14 14
15 extern "C" { 15 extern "C" {
16 // The following stub functions are required because the glXXX routines exported 16 // The following stub functions are required because the glXXX routines exported
17 // via gl_bindings.h use call-type GL_BINDING_CALL, which on Windows is stdcall. 17 // via gl_bindings.h use call-type GL_BINDING_CALL, which on Windows is stdcall.
18 // Skia has been built such that its GrGLInterface GL pointers are __cdecl. 18 // Skia has been built such that its GrGLInterface GL pointers are __cdecl.
19 19
20 GLvoid StubGLActiveTexture(GLenum texture) { 20 GLvoid GR_GL_FUNCTION_TYPE StubGLActiveTexture(GLenum texture) {
21 glActiveTexture(texture); 21 glActiveTexture(texture);
22 } 22 }
23 23
24 GLvoid StubGLAttachShader(GLuint program, GLuint shader) { 24 GLvoid GR_GL_FUNCTION_TYPE StubGLAttachShader(GLuint program, GLuint shader) {
25 glAttachShader(program, shader); 25 glAttachShader(program, shader);
26 } 26 }
27 27
28 GLvoid StubGLBeginQuery(GLenum target, GLuint id) { 28 GLvoid GR_GL_FUNCTION_TYPE StubGLBeginQuery(GLenum target, GLuint id) {
29 glBeginQuery(target, id); 29 glBeginQuery(target, id);
30 } 30 }
31 31
32 GLvoid StubGLBindAttribLocation(GLuint program, GLuint index, 32 GLvoid GR_GL_FUNCTION_TYPE StubGLBindAttribLocation(GLuint program,
33 const char* name) { 33 GLuint index,
34 const char* name) {
34 glBindAttribLocation(program, index, name); 35 glBindAttribLocation(program, index, name);
35 } 36 }
36 37
37 GLvoid StubGLBindBuffer(GLenum target, GLuint buffer) { 38 GLvoid GR_GL_FUNCTION_TYPE StubGLBindBuffer(GLenum target, GLuint buffer) {
38 glBindBuffer(target, buffer); 39 glBindBuffer(target, buffer);
39 } 40 }
40 41
41 GLvoid StubGLBindFragDataLocation(GLuint program, GLuint colorNumber, 42 GLvoid GR_GL_FUNCTION_TYPE StubGLBindFragDataLocation(GLuint program,
42 const GLchar * name) { 43 GLuint colorNumber,
44 const GLchar* name) {
43 glBindFragDataLocation(program, colorNumber, name); 45 glBindFragDataLocation(program, colorNumber, name);
44 } 46 }
45 47
46 GLvoid StubGLBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, 48 GLvoid GR_GL_FUNCTION_TYPE
47 GLuint index, const GLchar * name) { 49 StubGLBindFragDataLocationIndexed(GLuint program,
50 GLuint colorNumber,
51 GLuint index,
52 const GLchar* name) {
48 glBindFragDataLocationIndexed(program, colorNumber, index, name); 53 glBindFragDataLocationIndexed(program, colorNumber, index, name);
49 } 54 }
50 55
51 GLvoid StubGLBindFramebuffer(GLenum target, GLuint framebuffer) { 56 GLvoid GR_GL_FUNCTION_TYPE StubGLBindFramebuffer(GLenum target,
57 GLuint framebuffer) {
52 glBindFramebufferEXT(target, framebuffer); 58 glBindFramebufferEXT(target, framebuffer);
53 } 59 }
54 60
55 GLvoid StubGLBindRenderbuffer(GLenum target, GLuint renderbuffer) { 61 GLvoid GR_GL_FUNCTION_TYPE StubGLBindRenderbuffer(GLenum target,
62 GLuint renderbuffer) {
56 glBindRenderbufferEXT(target, renderbuffer); 63 glBindRenderbufferEXT(target, renderbuffer);
57 } 64 }
58 65
59 GLvoid StubGLBindTexture(GLenum target, GLuint texture) { 66 GLvoid GR_GL_FUNCTION_TYPE StubGLBindTexture(GLenum target, GLuint texture) {
60 glBindTexture(target, texture); 67 glBindTexture(target, texture);
61 } 68 }
62 69
63 GLvoid StubGLBindVertexArray(GLuint array) { 70 GLvoid GR_GL_FUNCTION_TYPE StubGLBindVertexArray(GLuint array) {
64 glBindVertexArrayOES(array); 71 glBindVertexArrayOES(array);
65 } 72 }
66 73
67 GLvoid StubGLBlendBarrier() { 74 GLvoid GR_GL_FUNCTION_TYPE StubGLBlendBarrier() {
68 glBlendBarrierKHR(); 75 glBlendBarrierKHR();
69 } 76 }
70 77
71 GLvoid StubGLBlendColor(GLclampf red, GLclampf green, GLclampf blue, 78 GLvoid GR_GL_FUNCTION_TYPE StubGLBlendColor(GLclampf red,
72 GLclampf alpha) { 79 GLclampf green,
80 GLclampf blue,
81 GLclampf alpha) {
73 glBlendColor(red, green, blue, alpha); 82 glBlendColor(red, green, blue, alpha);
74 } 83 }
75 84
76 GLvoid StubGLBlendEquation(GLenum mode) { 85 GLvoid GR_GL_FUNCTION_TYPE StubGLBlendEquation(GLenum mode) {
77 glBlendEquation(mode); 86 glBlendEquation(mode);
78 } 87 }
79 88
80 GLvoid StubGLBlendFunc(GLenum sfactor, GLenum dfactor) { 89 GLvoid GR_GL_FUNCTION_TYPE StubGLBlendFunc(GLenum sfactor, GLenum dfactor) {
81 glBlendFunc(sfactor, dfactor); 90 glBlendFunc(sfactor, dfactor);
82 } 91 }
83 92
84 GLvoid StubGLBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, 93 GLvoid GR_GL_FUNCTION_TYPE StubGLBlitFramebuffer(GLint srcX0,
85 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, 94 GLint srcY0,
86 GLbitfield mask, GLenum filter) { 95 GLint srcX1,
96 GLint srcY1,
97 GLint dstX0,
98 GLint dstY0,
99 GLint dstX1,
100 GLint dstY1,
101 GLbitfield mask,
102 GLenum filter) {
87 glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, 103 glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1,
88 mask, filter); 104 mask, filter);
89 } 105 }
90 106
91 GLvoid StubGLBufferData(GLenum target, GLsizeiptr size, const void* data, 107 GLvoid GR_GL_FUNCTION_TYPE StubGLBufferData(GLenum target,
92 GLenum usage) { 108 GLsizeiptr size,
109 const void* data,
110 GLenum usage) {
93 glBufferData(target, size, data, usage); 111 glBufferData(target, size, data, usage);
94 } 112 }
95 113
96 GLvoid StubGLBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, 114 GLvoid GR_GL_FUNCTION_TYPE StubGLBufferSubData(GLenum target,
97 const void* data) { 115 GLintptr offset,
116 GLsizeiptr size,
117 const void* data) {
98 glBufferSubData(target, offset, size, data); 118 glBufferSubData(target, offset, size, data);
99 } 119 }
100 120
101 GLenum StubGLCheckFramebufferStatus(GLenum target) { 121 GLenum GR_GL_FUNCTION_TYPE StubGLCheckFramebufferStatus(GLenum target) {
102 return glCheckFramebufferStatusEXT(target); 122 return glCheckFramebufferStatusEXT(target);
103 } 123 }
104 124
105 GLvoid StubGLClear(GLbitfield mask) { 125 GLvoid GR_GL_FUNCTION_TYPE StubGLClear(GLbitfield mask) {
106 glClear(mask); 126 glClear(mask);
107 } 127 }
108 128
109 GLvoid StubGLClearColor(GLclampf red, GLclampf green, GLclampf blue, 129 GLvoid GR_GL_FUNCTION_TYPE StubGLClearColor(GLclampf red,
110 GLclampf alpha) { 130 GLclampf green,
131 GLclampf blue,
132 GLclampf alpha) {
111 glClearColor(red, green, blue, alpha); 133 glClearColor(red, green, blue, alpha);
112 } 134 }
113 135
114 GLvoid StubGLClearStencil(GLint s) { 136 GLvoid GR_GL_FUNCTION_TYPE StubGLClearStencil(GLint s) {
115 glClearStencil(s); 137 glClearStencil(s);
116 } 138 }
117 139
118 GLvoid StubGLColorMask(GLboolean red, GLboolean green, GLboolean blue, 140 GLvoid GR_GL_FUNCTION_TYPE StubGLColorMask(GLboolean red,
119 GLboolean alpha) { 141 GLboolean green,
142 GLboolean blue,
143 GLboolean alpha) {
120 glColorMask(red, green, blue, alpha); 144 glColorMask(red, green, blue, alpha);
121 } 145 }
122 146
123 GLvoid StubGLCompileShader(GLuint shader) { 147 GLvoid GR_GL_FUNCTION_TYPE StubGLCompileShader(GLuint shader) {
124 glCompileShader(shader); 148 glCompileShader(shader);
125 } 149 }
126 150
127 GLvoid StubGLCompressedTexImage2D(GLenum target, GLint level, 151 GLvoid GR_GL_FUNCTION_TYPE StubGLCompressedTexImage2D(GLenum target,
128 GLenum internalformat, GLsizei width, 152 GLint level,
129 GLsizei height, GLint border, 153 GLenum internalformat,
130 GLsizei imageSize, const void* data) { 154 GLsizei width,
155 GLsizei height,
156 GLint border,
157 GLsizei imageSize,
158 const void* data) {
131 glCompressedTexImage2D(target, level, internalformat, width, height, border, 159 glCompressedTexImage2D(target, level, internalformat, width, height, border,
132 imageSize, data); 160 imageSize, data);
133 } 161 }
134 162
135 GLvoid StubGLCopyTexSubImage2D(GLenum target, GLint level, 163 GLvoid GR_GL_FUNCTION_TYPE StubGLCopyTexSubImage2D(GLenum target,
136 GLint xoffset, GLint yoffset, 164 GLint level,
137 GLint x, GLint y, 165 GLint xoffset,
138 GLsizei width, GLsizei height) { 166 GLint yoffset,
167 GLint x,
168 GLint y,
169 GLsizei width,
170 GLsizei height) {
139 glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); 171 glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
140 } 172 }
141 173
142 GLuint StubGLCreateProgram(void) { 174 GLuint GR_GL_FUNCTION_TYPE StubGLCreateProgram(void) {
143 return glCreateProgram(); 175 return glCreateProgram();
144 } 176 }
145 177
146 GLuint StubGLCreateShader(GLenum type) { 178 GLuint GR_GL_FUNCTION_TYPE StubGLCreateShader(GLenum type) {
147 return glCreateShader(type); 179 return glCreateShader(type);
148 } 180 }
149 181
150 GLvoid StubGLCullFace(GLenum mode) { 182 GLvoid GR_GL_FUNCTION_TYPE StubGLCullFace(GLenum mode) {
151 glCullFace(mode); 183 glCullFace(mode);
152 } 184 }
153 185
154 GLvoid StubGLDeleteBuffers(GLsizei n, const GLuint* buffers) { 186 GLvoid GR_GL_FUNCTION_TYPE StubGLDeleteBuffers(GLsizei n,
187 const GLuint* buffers) {
155 glDeleteBuffersARB(n, buffers); 188 glDeleteBuffersARB(n, buffers);
156 } 189 }
157 190
158 GLvoid StubGLDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) { 191 GLvoid GR_GL_FUNCTION_TYPE
192 StubGLDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
159 glDeleteFramebuffersEXT(n, framebuffers); 193 glDeleteFramebuffersEXT(n, framebuffers);
160 } 194 }
161 195
162 GLvoid StubGLDeleteQueries(GLsizei n, const GLuint* ids) { 196 GLvoid GR_GL_FUNCTION_TYPE StubGLDeleteQueries(GLsizei n, const GLuint* ids) {
163 glDeleteQueries(n, ids); 197 glDeleteQueries(n, ids);
164 } 198 }
165 199
166 GLvoid StubGLDeleteProgram(GLuint program) { 200 GLvoid GR_GL_FUNCTION_TYPE StubGLDeleteProgram(GLuint program) {
167 glDeleteProgram(program); 201 glDeleteProgram(program);
168 } 202 }
169 203
170 GLvoid StubGLDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) { 204 GLvoid GR_GL_FUNCTION_TYPE
205 StubGLDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
171 glDeleteRenderbuffersEXT(n, renderbuffers); 206 glDeleteRenderbuffersEXT(n, renderbuffers);
172 } 207 }
173 208
174 GLvoid StubGLDeleteShader(GLuint shader) { 209 GLvoid GR_GL_FUNCTION_TYPE StubGLDeleteShader(GLuint shader) {
175 glDeleteShader(shader); 210 glDeleteShader(shader);
176 } 211 }
177 212
178 GLvoid StubGLDeleteTextures(GLsizei n, const GLuint* textures) { 213 GLvoid GR_GL_FUNCTION_TYPE StubGLDeleteTextures(GLsizei n,
214 const GLuint* textures) {
179 glDeleteTextures(n, textures); 215 glDeleteTextures(n, textures);
180 } 216 }
181 217
182 GLvoid StubGLDeleteVertexArrays(GLsizei n, const GLuint* arrays) { 218 GLvoid GR_GL_FUNCTION_TYPE StubGLDeleteVertexArrays(GLsizei n,
219 const GLuint* arrays) {
183 glDeleteVertexArraysOES(n, arrays); 220 glDeleteVertexArraysOES(n, arrays);
184 } 221 }
185 222
186 GLvoid StubGLDepthMask(GLboolean flag) { 223 GLvoid GR_GL_FUNCTION_TYPE StubGLDepthMask(GLboolean flag) {
187 glDepthMask(flag); 224 glDepthMask(flag);
188 } 225 }
189 226
190 GLvoid StubGLDisable(GLenum cap) { 227 GLvoid GR_GL_FUNCTION_TYPE StubGLDisable(GLenum cap) {
191 glDisable(cap); 228 glDisable(cap);
192 } 229 }
193 230
194 GLvoid StubGLDisableVertexAttribArray(GLuint index) { 231 GLvoid GR_GL_FUNCTION_TYPE StubGLDisableVertexAttribArray(GLuint index) {
195 glDisableVertexAttribArray(index); 232 glDisableVertexAttribArray(index);
196 } 233 }
197 234
198 GLvoid StubGLDiscardFramebuffer(GLenum target, GLsizei numAttachments, 235 GLvoid GR_GL_FUNCTION_TYPE StubGLDiscardFramebuffer(GLenum target,
199 const GLenum *attachments) { 236 GLsizei numAttachments,
237 const GLenum* attachments) {
200 glDiscardFramebufferEXT(target, numAttachments, attachments); 238 glDiscardFramebufferEXT(target, numAttachments, attachments);
201 } 239 }
202 240
203 GLvoid StubGLDrawArrays(GLenum mode, GLint first, GLsizei count) { 241 GLvoid GR_GL_FUNCTION_TYPE StubGLDrawArrays(GLenum mode,
242 GLint first,
243 GLsizei count) {
204 glDrawArrays(mode, first, count); 244 glDrawArrays(mode, first, count);
205 } 245 }
206 246
207 GLvoid StubGLDrawBuffer(GLenum mode) { 247 GLvoid GR_GL_FUNCTION_TYPE StubGLDrawBuffer(GLenum mode) {
208 glDrawBuffer(mode); 248 glDrawBuffer(mode);
209 } 249 }
210 250
211 GLvoid StubGLDrawBuffers(GLsizei n, const GLenum* bufs) { 251 GLvoid GR_GL_FUNCTION_TYPE StubGLDrawBuffers(GLsizei n, const GLenum* bufs) {
212 glDrawBuffersARB(n, bufs); 252 glDrawBuffersARB(n, bufs);
213 } 253 }
214 254
215 GLvoid StubGLDrawElements(GLenum mode, GLsizei count, GLenum type, 255 GLvoid GR_GL_FUNCTION_TYPE StubGLDrawElements(GLenum mode,
216 const void* indices) { 256 GLsizei count,
257 GLenum type,
258 const void* indices) {
217 glDrawElements(mode, count, type, indices); 259 glDrawElements(mode, count, type, indices);
218 } 260 }
219 261
220 GLvoid StubGLEnable(GLenum cap) { 262 GLvoid GR_GL_FUNCTION_TYPE StubGLEnable(GLenum cap) {
221 glEnable(cap); 263 glEnable(cap);
222 } 264 }
223 265
224 GLvoid StubGLEnableVertexAttribArray(GLuint index) { 266 GLvoid GR_GL_FUNCTION_TYPE StubGLEnableVertexAttribArray(GLuint index) {
225 glEnableVertexAttribArray(index); 267 glEnableVertexAttribArray(index);
226 } 268 }
227 269
228 GLvoid StubGLEndQuery(GLenum target) { 270 GLvoid GR_GL_FUNCTION_TYPE StubGLEndQuery(GLenum target) {
229 glEndQuery(target); 271 glEndQuery(target);
230 } 272 }
231 273
232 GLvoid StubGLFinish() { 274 GLvoid GR_GL_FUNCTION_TYPE StubGLFinish() {
233 glFinish(); 275 glFinish();
234 } 276 }
235 277
236 GLvoid StubGLFlush() { 278 GLvoid GR_GL_FUNCTION_TYPE StubGLFlush() {
237 glFlush(); 279 glFlush();
238 } 280 }
239 281
240 GLvoid StubGLFlushMappedBufferRange(GLenum target, GLintptr offset, 282 GLvoid GR_GL_FUNCTION_TYPE StubGLFlushMappedBufferRange(GLenum target,
241 GLsizeiptr length) { 283 GLintptr offset,
284 GLsizeiptr length) {
242 glFlushMappedBufferRange(target, offset, length); 285 glFlushMappedBufferRange(target, offset, length);
243 } 286 }
244 287
245 GLvoid StubGLFramebufferRenderbuffer(GLenum target, GLenum attachment, 288 GLvoid GR_GL_FUNCTION_TYPE
246 GLenum renderbuffertarget, 289 StubGLFramebufferRenderbuffer(GLenum target,
247 GLuint renderbuffer) { 290 GLenum attachment,
291 GLenum renderbuffertarget,
292 GLuint renderbuffer) {
248 glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, 293 glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget,
249 renderbuffer); 294 renderbuffer);
250 } 295 }
251 296
252 GLvoid StubGLFramebufferTexture2D(GLenum target, GLenum attachment, 297 GLvoid GR_GL_FUNCTION_TYPE StubGLFramebufferTexture2D(GLenum target,
253 GLenum textarget, GLuint texture, 298 GLenum attachment,
254 GLint level) { 299 GLenum textarget,
300 GLuint texture,
301 GLint level) {
255 glFramebufferTexture2DEXT(target, attachment, textarget, texture, level); 302 glFramebufferTexture2DEXT(target, attachment, textarget, texture, level);
256 } 303 }
257 304
258 GLvoid StubGLFramebufferTexture2DMultisample(GLenum target, GLenum attachment, 305 GLvoid GR_GL_FUNCTION_TYPE
259 GLenum textarget, GLuint texture, 306 StubGLFramebufferTexture2DMultisample(GLenum target,
260 GLint level, GLsizei samples) { 307 GLenum attachment,
308 GLenum textarget,
309 GLuint texture,
310 GLint level,
311 GLsizei samples) {
261 glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, 312 glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture,
262 level, samples); 313 level, samples);
263 } 314 }
264 315
265 GLvoid StubGLFrontFace(GLenum mode) { 316 GLvoid GR_GL_FUNCTION_TYPE StubGLFrontFace(GLenum mode) {
266 glFrontFace(mode); 317 glFrontFace(mode);
267 } 318 }
268 319
269 GLvoid StubGLGenBuffers(GLsizei n, GLuint* buffers) { 320 GLvoid GR_GL_FUNCTION_TYPE StubGLGenBuffers(GLsizei n, GLuint* buffers) {
270 glGenBuffersARB(n, buffers); 321 glGenBuffersARB(n, buffers);
271 } 322 }
272 323
273 GLvoid StubGLGenFramebuffers(GLsizei n, GLuint* framebuffers) { 324 GLvoid GR_GL_FUNCTION_TYPE StubGLGenFramebuffers(GLsizei n,
325 GLuint* framebuffers) {
274 glGenFramebuffersEXT(n, framebuffers); 326 glGenFramebuffersEXT(n, framebuffers);
275 } 327 }
276 328
277 GLvoid StubGLGenQueries(GLsizei n, GLuint* ids) { 329 GLvoid GR_GL_FUNCTION_TYPE StubGLGenQueries(GLsizei n, GLuint* ids) {
278 glGenQueries(n, ids); 330 glGenQueries(n, ids);
279 } 331 }
280 332
281 GLvoid StubGLGenRenderbuffers(GLsizei n, GLuint* renderbuffers) { 333 GLvoid GR_GL_FUNCTION_TYPE StubGLGenRenderbuffers(GLsizei n,
334 GLuint* renderbuffers) {
282 glGenRenderbuffersEXT(n, renderbuffers); 335 glGenRenderbuffersEXT(n, renderbuffers);
283 } 336 }
284 337
285 GLvoid StubGLGenTextures(GLsizei n, GLuint* textures) { 338 GLvoid GR_GL_FUNCTION_TYPE StubGLGenTextures(GLsizei n, GLuint* textures) {
286 glGenTextures(n, textures); 339 glGenTextures(n, textures);
287 } 340 }
288 341
289 GLvoid StubGLGenVertexArrays(GLsizei n, GLuint* arrays) { 342 GLvoid GR_GL_FUNCTION_TYPE StubGLGenVertexArrays(GLsizei n, GLuint* arrays) {
290 glGenVertexArraysOES(n, arrays); 343 glGenVertexArraysOES(n, arrays);
291 } 344 }
292 345
293 GLvoid StubGLGenerateMipmap(GLenum target){ 346 GLvoid GR_GL_FUNCTION_TYPE StubGLGenerateMipmap(GLenum target) {
294 glGenerateMipmapEXT(target); 347 glGenerateMipmapEXT(target);
295 } 348 }
296 349
297 GLvoid StubGLGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) { 350 GLvoid GR_GL_FUNCTION_TYPE StubGLGetBufferParameteriv(GLenum target,
351 GLenum pname,
352 GLint* params) {
298 glGetBufferParameteriv(target, pname, params); 353 glGetBufferParameteriv(target, pname, params);
299 } 354 }
300 355
301 GLvoid StubGLGetFramebufferAttachmentParameteriv(GLenum target, 356 GLvoid GR_GL_FUNCTION_TYPE
302 GLenum attachment, 357 StubGLGetFramebufferAttachmentParameteriv(GLenum target,
303 GLenum pname, GLint* params) { 358 GLenum attachment,
359 GLenum pname,
360 GLint* params) {
304 glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, params); 361 glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, params);
305 } 362 }
306 363
307 GLenum StubGLGetError() { 364 GLenum GR_GL_FUNCTION_TYPE StubGLGetError() {
308 return glGetError(); 365 return glGetError();
309 } 366 }
310 367
311 GLvoid StubGLGetIntegerv(GLenum pname, GLint* params) { 368 GLvoid GR_GL_FUNCTION_TYPE StubGLGetIntegerv(GLenum pname, GLint* params) {
312 glGetIntegerv(pname, params); 369 glGetIntegerv(pname, params);
313 } 370 }
314 371
315 GLvoid StubGLGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, 372 GLvoid GR_GL_FUNCTION_TYPE StubGLGetProgramInfoLog(GLuint program,
316 char* infolog) { 373 GLsizei bufsize,
374 GLsizei* length,
375 char* infolog) {
317 glGetProgramInfoLog(program, bufsize, length, infolog); 376 glGetProgramInfoLog(program, bufsize, length, infolog);
318 } 377 }
319 378
320 GLvoid StubGLGetProgramiv(GLuint program, GLenum pname, GLint* params) { 379 GLvoid GR_GL_FUNCTION_TYPE StubGLGetProgramiv(GLuint program,
380 GLenum pname,
381 GLint* params) {
321 glGetProgramiv(program, pname, params); 382 glGetProgramiv(program, pname, params);
322 } 383 }
323 384
324 GLvoid StubGLGetRenderbufferParameteriv(GLenum target, 385 GLvoid GR_GL_FUNCTION_TYPE StubGLGetRenderbufferParameteriv(GLenum target,
325 GLenum pname, GLint* params) { 386 GLenum pname,
387 GLint* params) {
326 glGetRenderbufferParameterivEXT(target, pname, params); 388 glGetRenderbufferParameterivEXT(target, pname, params);
327 } 389 }
328 390
329 GLvoid StubGLGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, 391 GLvoid GR_GL_FUNCTION_TYPE StubGLGetShaderInfoLog(GLuint shader,
330 char* infolog) { 392 GLsizei bufsize,
393 GLsizei* length,
394 char* infolog) {
331 glGetShaderInfoLog(shader, bufsize, length, infolog); 395 glGetShaderInfoLog(shader, bufsize, length, infolog);
332 } 396 }
333 397
334 GLvoid StubGLGetShaderiv(GLuint shader, GLenum pname, GLint* params) { 398 GLvoid GR_GL_FUNCTION_TYPE StubGLGetShaderiv(GLuint shader,
399 GLenum pname,
400 GLint* params) {
335 glGetShaderiv(shader, pname, params); 401 glGetShaderiv(shader, pname, params);
336 } 402 }
337 403
338 GLvoid StubGLGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, 404 GLvoid GR_GL_FUNCTION_TYPE StubGLGetShaderPrecisionFormat(GLenum shadertype,
339 GLint *range, GLint *precision) { 405 GLenum precisiontype,
406 GLint* range,
407 GLint* precision) {
340 glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); 408 glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
341 } 409 }
342 410
343 const GLubyte* StubGLGetString(GLenum name) { 411 const GLubyte* GR_GL_FUNCTION_TYPE StubGLGetString(GLenum name) {
344 return glGetString(name); 412 return glGetString(name);
345 } 413 }
346 414
347 const GLubyte* StubGLGetStringi(GLenum name, GLuint index) { 415 const GLubyte* GR_GL_FUNCTION_TYPE StubGLGetStringi(GLenum name, GLuint index) {
348 return glGetStringi(name, index); 416 return glGetStringi(name, index);
349 } 417 }
350 418
351 GLvoid StubGLGetQueryiv(GLenum target, GLenum pname, GLint* params) { 419 GLvoid GR_GL_FUNCTION_TYPE StubGLGetQueryiv(GLenum target,
420 GLenum pname,
421 GLint* params) {
352 glGetQueryiv(target, pname, params); 422 glGetQueryiv(target, pname, params);
353 } 423 }
354 424
355 GLvoid StubGLGetQueryObjecti64v(GLuint id, GLenum pname, GLint64* params) { 425 GLvoid GR_GL_FUNCTION_TYPE StubGLGetQueryObjecti64v(GLuint id,
426 GLenum pname,
427 GLint64* params) {
356 glGetQueryObjecti64v(id, pname, params); 428 glGetQueryObjecti64v(id, pname, params);
357 } 429 }
358 430
359 GLvoid StubGLGetQueryObjectiv(GLuint id, GLenum pname, GLint* params) { 431 GLvoid GR_GL_FUNCTION_TYPE StubGLGetQueryObjectiv(GLuint id,
432 GLenum pname,
433 GLint* params) {
360 glGetQueryObjectiv(id, pname, params); 434 glGetQueryObjectiv(id, pname, params);
361 } 435 }
362 436
363 GLvoid StubGLGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64* params) { 437 GLvoid GR_GL_FUNCTION_TYPE StubGLGetQueryObjectui64v(GLuint id,
438 GLenum pname,
439 GLuint64* params) {
364 glGetQueryObjectui64v(id, pname, params); 440 glGetQueryObjectui64v(id, pname, params);
365 } 441 }
366 442
367 GLvoid StubGLGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) { 443 GLvoid GR_GL_FUNCTION_TYPE StubGLGetQueryObjectuiv(GLuint id,
444 GLenum pname,
445 GLuint* params) {
368 glGetQueryObjectuiv(id, pname, params); 446 glGetQueryObjectuiv(id, pname, params);
369 } 447 }
370 448
371 GLvoid StubGLGetTexLevelParameteriv(GLenum target, GLint level, 449 GLvoid GR_GL_FUNCTION_TYPE StubGLGetTexLevelParameteriv(GLenum target,
372 GLenum pname, GLint* params) { 450 GLint level,
451 GLenum pname,
452 GLint* params) {
373 glGetTexLevelParameteriv(target, level, pname, params); 453 glGetTexLevelParameteriv(target, level, pname, params);
374 } 454 }
375 455
376 GLint StubGLGetUniformLocation(GLuint program, const char* name) { 456 GLint GR_GL_FUNCTION_TYPE StubGLGetUniformLocation(GLuint program,
457 const char* name) {
377 return glGetUniformLocation(program, name); 458 return glGetUniformLocation(program, name);
378 } 459 }
379 460
380 GLvoid StubGLInsertEventMarker(GLsizei length, const char* marker) { 461 GLvoid GR_GL_FUNCTION_TYPE StubGLInsertEventMarker(GLsizei length,
462 const char* marker) {
381 glInsertEventMarkerEXT(length, marker); 463 glInsertEventMarkerEXT(length, marker);
382 } 464 }
383 465
384 GLvoid StubGLInvalidateFramebuffer(GLenum target, GLsizei numAttachments, 466 GLvoid GR_GL_FUNCTION_TYPE
385 const GLenum* attachments) { 467 StubGLInvalidateFramebuffer(GLenum target,
468 GLsizei numAttachments,
469 const GLenum* attachments) {
386 glInvalidateFramebuffer(target, numAttachments, attachments); 470 glInvalidateFramebuffer(target, numAttachments, attachments);
387 } 471 }
388 472
389 GLvoid StubGLInvalidateSubFramebuffer(GLenum target, 473 GLvoid GR_GL_FUNCTION_TYPE
390 GLsizei numAttachments, 474 StubGLInvalidateSubFramebuffer(GLenum target,
391 const GLenum* attachments, 475 GLsizei numAttachments,
392 GLint x, GLint y, 476 const GLenum* attachments,
393 GLsizei width, GLsizei height) { 477 GLint x,
478 GLint y,
479 GLsizei width,
480 GLsizei height) {
394 glInvalidateSubFramebuffer(target, numAttachments, attachments, 481 glInvalidateSubFramebuffer(target, numAttachments, attachments,
395 x, y, width, height); 482 x, y, width, height);
396 } 483 }
397 484
398 GLvoid StubGLLineWidth(GLfloat width) { 485 GLvoid GR_GL_FUNCTION_TYPE StubGLLineWidth(GLfloat width) {
399 glLineWidth(width); 486 glLineWidth(width);
400 } 487 }
401 488
402 GLvoid StubGLLinkProgram(GLuint program) { 489 GLvoid GR_GL_FUNCTION_TYPE StubGLLinkProgram(GLuint program) {
403 glLinkProgram(program); 490 glLinkProgram(program);
404 } 491 }
405 492
406 void* StubGLMapBuffer(GLenum target, GLenum access) { 493 void* GR_GL_FUNCTION_TYPE StubGLMapBuffer(GLenum target, GLenum access) {
407 return glMapBuffer(target, access); 494 return glMapBuffer(target, access);
408 } 495 }
409 496
410 void* StubGLMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, 497 void* GR_GL_FUNCTION_TYPE StubGLMapBufferRange(GLenum target,
411 GLbitfield access) { 498 GLintptr offset,
499 GLsizeiptr length,
500 GLbitfield access) {
412 return glMapBufferRange(target, offset, length, access); 501 return glMapBufferRange(target, offset, length, access);
413 } 502 }
414 503
415 GLvoid StubGLPixelStorei(GLenum pname, GLint param) { 504 GLvoid GR_GL_FUNCTION_TYPE StubGLPixelStorei(GLenum pname, GLint param) {
416 glPixelStorei(pname, param); 505 glPixelStorei(pname, param);
417 } 506 }
418 507
419 GLvoid StubGLPopGroupMarker() { 508 GLvoid GR_GL_FUNCTION_TYPE StubGLPopGroupMarker() {
420 glPopGroupMarkerEXT(); 509 glPopGroupMarkerEXT();
421 } 510 }
422 511
423 GLvoid StubGLPushGroupMarker(GLsizei length, const char* marker) { 512 GLvoid GR_GL_FUNCTION_TYPE StubGLPushGroupMarker(GLsizei length,
513 const char* marker) {
424 glPushGroupMarkerEXT(length, marker); 514 glPushGroupMarkerEXT(length, marker);
425 } 515 }
426 516
427 GLvoid StubGLQueryCounter(GLuint id, GLenum target) { 517 GLvoid GR_GL_FUNCTION_TYPE StubGLQueryCounter(GLuint id, GLenum target) {
428 glQueryCounter(id, target); 518 glQueryCounter(id, target);
429 } 519 }
430 520
431 GLvoid StubGLReadBuffer(GLenum src) { 521 GLvoid GR_GL_FUNCTION_TYPE StubGLReadBuffer(GLenum src) {
432 glReadBuffer(src); 522 glReadBuffer(src);
433 } 523 }
434 524
435 GLvoid StubGLReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, 525 GLvoid GR_GL_FUNCTION_TYPE StubGLReadPixels(GLint x,
436 GLenum format, GLenum type, void* pixels) { 526 GLint y,
527 GLsizei width,
528 GLsizei height,
529 GLenum format,
530 GLenum type,
531 void* pixels) {
437 glReadPixels(x, y, width, height, format, type, pixels); 532 glReadPixels(x, y, width, height, format, type, pixels);
438 } 533 }
439 534
440 GLvoid StubGLRenderbufferStorage(GLenum target, GLenum internalformat, 535 GLvoid GR_GL_FUNCTION_TYPE StubGLRenderbufferStorage(GLenum target,
441 GLsizei width, GLsizei height) { 536 GLenum internalformat,
537 GLsizei width,
538 GLsizei height) {
442 glRenderbufferStorageEXT(target, internalformat, width, height); 539 glRenderbufferStorageEXT(target, internalformat, width, height);
443 } 540 }
444 541
445 GLvoid StubGLRenderbufferStorageMultisample(GLenum target, GLsizei samples, 542 GLvoid GR_GL_FUNCTION_TYPE
446 GLenum internalformat, 543 StubGLRenderbufferStorageMultisample(GLenum target,
447 GLsizei width, GLsizei height) { 544 GLsizei samples,
545 GLenum internalformat,
546 GLsizei width,
547 GLsizei height) {
448 glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, 548 glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width,
449 height); 549 height);
450 } 550 }
451 551
452 GLvoid StubGLScissor(GLint x, GLint y, GLsizei width, GLsizei height) { 552 GLvoid GR_GL_FUNCTION_TYPE StubGLScissor(GLint x,
553 GLint y,
554 GLsizei width,
555 GLsizei height) {
453 glScissor(x, y, width, height); 556 glScissor(x, y, width, height);
454 } 557 }
455 558
456 GLvoid StubGLShaderSource(GLuint shader, GLsizei count, const char* const* str, 559 GLvoid GR_GL_FUNCTION_TYPE StubGLShaderSource(GLuint shader,
457 const GLint* length) { 560 GLsizei count,
561 const char* const* str,
562 const GLint* length) {
458 glShaderSource(shader, count, str, length); 563 glShaderSource(shader, count, str, length);
459 } 564 }
460 565
461 GLvoid StubGLStencilFunc(GLenum func, GLint ref, GLuint mask) { 566 GLvoid GR_GL_FUNCTION_TYPE StubGLStencilFunc(GLenum func,
567 GLint ref,
568 GLuint mask) {
462 glStencilFunc(func, ref, mask); 569 glStencilFunc(func, ref, mask);
463 } 570 }
464 571
465 GLvoid StubGLStencilFuncSeparate(GLenum face, GLenum func, GLint ref, 572 GLvoid GR_GL_FUNCTION_TYPE StubGLStencilFuncSeparate(GLenum face,
466 GLuint mask) { 573 GLenum func,
574 GLint ref,
575 GLuint mask) {
467 glStencilFuncSeparate(face, func, ref, mask); 576 glStencilFuncSeparate(face, func, ref, mask);
468 } 577 }
469 578
470 GLvoid StubGLStencilMask(GLuint mask) { 579 GLvoid GR_GL_FUNCTION_TYPE StubGLStencilMask(GLuint mask) {
471 glStencilMask(mask); 580 glStencilMask(mask);
472 } 581 }
473 582
474 GLvoid StubGLStencilMaskSeparate(GLenum face, GLuint mask) { 583 GLvoid GR_GL_FUNCTION_TYPE StubGLStencilMaskSeparate(GLenum face, GLuint mask) {
475 glStencilMaskSeparate(face, mask); 584 glStencilMaskSeparate(face, mask);
476 } 585 }
477 586
478 GLvoid StubGLStencilOp(GLenum fail, GLenum zfail, GLenum zpass) { 587 GLvoid GR_GL_FUNCTION_TYPE StubGLStencilOp(GLenum fail,
588 GLenum zfail,
589 GLenum zpass) {
479 glStencilOp(fail, zfail, zpass); 590 glStencilOp(fail, zfail, zpass);
480 } 591 }
481 592
482 GLvoid StubGLStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, 593 GLvoid GR_GL_FUNCTION_TYPE StubGLStencilOpSeparate(GLenum face,
483 GLenum zpass) { 594 GLenum fail,
595 GLenum zfail,
596 GLenum zpass) {
484 glStencilOpSeparate(face, fail, zfail, zpass); 597 glStencilOpSeparate(face, fail, zfail, zpass);
485 } 598 }
486 599
487 GLvoid StubGLTexImage2D(GLenum target, GLint level, GLint internalformat, 600 GLvoid GR_GL_FUNCTION_TYPE StubGLTexImage2D(GLenum target,
488 GLsizei width, GLsizei height, GLint border, 601 GLint level,
489 GLenum format, GLenum type, const void* pixels) { 602 GLint internalformat,
603 GLsizei width,
604 GLsizei height,
605 GLint border,
606 GLenum format,
607 GLenum type,
608 const void* pixels) {
490 glTexImage2D(target, level, internalformat, width, height, border, format, 609 glTexImage2D(target, level, internalformat, width, height, border, format,
491 type, pixels); 610 type, pixels);
492 } 611 }
493 612
494 GLvoid StubGLTexParameteri(GLenum target, GLenum pname, GLint param) { 613 GLvoid GR_GL_FUNCTION_TYPE StubGLTexParameteri(GLenum target,
614 GLenum pname,
615 GLint param) {
495 glTexParameteri(target, pname, param); 616 glTexParameteri(target, pname, param);
496 } 617 }
497 618
498 GLvoid StubGLTexParameteriv(GLenum target, GLenum pname, const GLint* params) { 619 GLvoid GR_GL_FUNCTION_TYPE StubGLTexParameteriv(GLenum target,
620 GLenum pname,
621 const GLint* params) {
499 glTexParameteriv(target, pname, params); 622 glTexParameteriv(target, pname, params);
500 } 623 }
501 624
502 GLvoid StubGLTexStorage2D(GLenum target, GLsizei levels, GLenum internalFormat, 625 GLvoid GR_GL_FUNCTION_TYPE StubGLTexStorage2D(GLenum target,
503 GLsizei width, GLsizei height) { 626 GLsizei levels,
627 GLenum internalFormat,
628 GLsizei width,
629 GLsizei height) {
504 glTexStorage2DEXT(target, levels, internalFormat, width, height); 630 glTexStorage2DEXT(target, levels, internalFormat, width, height);
505 } 631 }
506 632
507 GLvoid StubGLTexSubImage2D(GLenum target, GLint level, GLint xoffset, 633 GLvoid GR_GL_FUNCTION_TYPE StubGLTexSubImage2D(GLenum target,
508 GLint yoffset, GLsizei width, GLsizei height, 634 GLint level,
509 GLenum format, GLenum type, const void* pixels) { 635 GLint xoffset,
636 GLint yoffset,
637 GLsizei width,
638 GLsizei height,
639 GLenum format,
640 GLenum type,
641 const void* pixels) {
510 glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, 642 glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type,
511 pixels); 643 pixels);
512 } 644 }
513 645
514 GLvoid StubGLUniform1f(GLint location, GLfloat v) { 646 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform1f(GLint location, GLfloat v) {
515 glUniform1f(location, v); 647 glUniform1f(location, v);
516 } 648 }
517 649
518 GLvoid StubGLUniform1i(GLint location, GLint v) { 650 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform1i(GLint location, GLint v) {
519 glUniform1i(location, v); 651 glUniform1i(location, v);
520 } 652 }
521 653
522 GLvoid StubGLUniform1fv(GLint location, GLsizei count, const GLfloat* v) { 654 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform1fv(GLint location,
655 GLsizei count,
656 const GLfloat* v) {
523 glUniform1fv(location, count, v); 657 glUniform1fv(location, count, v);
524 } 658 }
525 659
526 GLvoid StubGLUniform1iv(GLint location, GLsizei count, const GLint* v) { 660 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform1iv(GLint location,
661 GLsizei count,
662 const GLint* v) {
527 glUniform1iv(location, count, v); 663 glUniform1iv(location, count, v);
528 } 664 }
529 665
530 GLvoid StubGLUniform2f(GLint location, GLfloat v0, GLfloat v1) { 666 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform2f(GLint location,
667 GLfloat v0,
668 GLfloat v1) {
531 glUniform2f(location, v0, v1); 669 glUniform2f(location, v0, v1);
532 } 670 }
533 671
534 GLvoid StubGLUniform2i(GLint location, GLint v0, GLint v1) { 672 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform2i(GLint location, GLint v0, GLint v1) {
535 glUniform2i(location, v0, v1); 673 glUniform2i(location, v0, v1);
536 } 674 }
537 675
538 GLvoid StubGLUniform2fv(GLint location, GLsizei count, const GLfloat* v) { 676 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform2fv(GLint location,
677 GLsizei count,
678 const GLfloat* v) {
539 glUniform2fv(location, count, v); 679 glUniform2fv(location, count, v);
540 } 680 }
541 681
542 GLvoid StubGLUniform2iv(GLint location, GLsizei count, const GLint* v) { 682 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform2iv(GLint location,
683 GLsizei count,
684 const GLint* v) {
543 glUniform2iv(location, count, v); 685 glUniform2iv(location, count, v);
544 } 686 }
545 687
546 GLvoid StubGLUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { 688 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform3f(GLint location,
689 GLfloat v0,
690 GLfloat v1,
691 GLfloat v2) {
547 glUniform3f(location, v0, v1, v2); 692 glUniform3f(location, v0, v1, v2);
548 } 693 }
549 694
550 GLvoid StubGLUniform3i(GLint location, GLint v0, GLint v1, GLint v2) { 695 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform3i(GLint location,
696 GLint v0,
697 GLint v1,
698 GLint v2) {
551 glUniform3i(location, v0, v1, v2); 699 glUniform3i(location, v0, v1, v2);
552 } 700 }
553 701
554 GLvoid StubGLUniform3fv(GLint location, GLsizei count, const GLfloat* v) { 702 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform3fv(GLint location,
703 GLsizei count,
704 const GLfloat* v) {
555 glUniform3fv(location, count, v); 705 glUniform3fv(location, count, v);
556 } 706 }
557 707
558 GLvoid StubGLUniform3iv(GLint location, GLsizei count, const GLint* v) { 708 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform3iv(GLint location,
709 GLsizei count,
710 const GLint* v) {
559 glUniform3iv(location, count, v); 711 glUniform3iv(location, count, v);
560 } 712 }
561 713
562 GLvoid StubGLUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, 714 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform4f(GLint location,
563 GLfloat v3) { 715 GLfloat v0,
716 GLfloat v1,
717 GLfloat v2,
718 GLfloat v3) {
564 glUniform4f(location, v0, v1, v2, v3); 719 glUniform4f(location, v0, v1, v2, v3);
565 } 720 }
566 721
567 GLvoid StubGLUniform4i(GLint location, GLint v0, GLint v1, GLint v2, 722 GLvoid GR_GL_FUNCTION_TYPE
568 GLint v3) { 723 StubGLUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) {
569 glUniform4i(location, v0, v1, v2, v3); 724 glUniform4i(location, v0, v1, v2, v3);
570 } 725 }
571 726
572 GLvoid StubGLUniform4fv(GLint location, GLsizei count, const GLfloat* v) { 727 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform4fv(GLint location,
728 GLsizei count,
729 const GLfloat* v) {
573 glUniform4fv(location, count, v); 730 glUniform4fv(location, count, v);
574 } 731 }
575 732
576 GLvoid StubGLUniform4iv(GLint location, GLsizei count, const GLint* v) { 733 GLvoid GR_GL_FUNCTION_TYPE StubGLUniform4iv(GLint location,
734 GLsizei count,
735 const GLint* v) {
577 glUniform4iv(location, count, v); 736 glUniform4iv(location, count, v);
578 } 737 }
579 738
580 GLvoid StubGLUniformMatrix2fv(GLint location, GLsizei count, 739 GLvoid GR_GL_FUNCTION_TYPE StubGLUniformMatrix2fv(GLint location,
581 GLboolean transpose, const GLfloat* value) { 740 GLsizei count,
741 GLboolean transpose,
742 const GLfloat* value) {
582 glUniformMatrix2fv(location, count, transpose, value); 743 glUniformMatrix2fv(location, count, transpose, value);
583 } 744 }
584 745
585 GLvoid StubGLUniformMatrix3fv(GLint location, GLsizei count, 746 GLvoid GR_GL_FUNCTION_TYPE StubGLUniformMatrix3fv(GLint location,
586 GLboolean transpose, const GLfloat* value) { 747 GLsizei count,
748 GLboolean transpose,
749 const GLfloat* value) {
587 glUniformMatrix3fv(location, count, transpose, value); 750 glUniformMatrix3fv(location, count, transpose, value);
588 } 751 }
589 752
590 GLvoid StubGLUniformMatrix4fv(GLint location, GLsizei count, 753 GLvoid GR_GL_FUNCTION_TYPE StubGLUniformMatrix4fv(GLint location,
591 GLboolean transpose, const GLfloat* value) { 754 GLsizei count,
755 GLboolean transpose,
756 const GLfloat* value) {
592 glUniformMatrix4fv(location, count, transpose, value); 757 glUniformMatrix4fv(location, count, transpose, value);
593 } 758 }
594 759
595 GLboolean StubGLUnmapBuffer(GLenum target) { 760 GLboolean GR_GL_FUNCTION_TYPE StubGLUnmapBuffer(GLenum target) {
596 return glUnmapBuffer(target); 761 return glUnmapBuffer(target);
597 } 762 }
598 763
599 GLvoid StubGLUseProgram(GLuint program) { 764 GLvoid GR_GL_FUNCTION_TYPE StubGLUseProgram(GLuint program) {
600 glUseProgram(program); 765 glUseProgram(program);
601 } 766 }
602 767
603 GLvoid StubGLVertexAttrib1f(GLuint indx, const GLfloat value) { 768 GLvoid GR_GL_FUNCTION_TYPE StubGLVertexAttrib1f(GLuint indx,
769 const GLfloat value) {
604 glVertexAttrib1f(indx, value); 770 glVertexAttrib1f(indx, value);
605 } 771 }
606 772
607 GLvoid StubGLVertexAttrib2fv(GLuint indx, const GLfloat* values) { 773 GLvoid GR_GL_FUNCTION_TYPE StubGLVertexAttrib2fv(GLuint indx,
774 const GLfloat* values) {
608 glVertexAttrib2fv(indx, values); 775 glVertexAttrib2fv(indx, values);
609 } 776 }
610 777
611 GLvoid StubGLVertexAttrib3fv(GLuint indx, const GLfloat* values) { 778 GLvoid GR_GL_FUNCTION_TYPE StubGLVertexAttrib3fv(GLuint indx,
779 const GLfloat* values) {
612 glVertexAttrib3fv(indx, values); 780 glVertexAttrib3fv(indx, values);
613 } 781 }
614 782
615 GLvoid StubGLVertexAttrib4fv(GLuint indx, const GLfloat* values) { 783 GLvoid GR_GL_FUNCTION_TYPE StubGLVertexAttrib4fv(GLuint indx,
784 const GLfloat* values) {
616 glVertexAttrib4fv(indx, values); 785 glVertexAttrib4fv(indx, values);
617 } 786 }
618 787
619 GLvoid StubGLVertexAttribPointer(GLuint indx, GLint size, GLenum type, 788 GLvoid GR_GL_FUNCTION_TYPE StubGLVertexAttribPointer(GLuint indx,
620 GLboolean normalized, GLsizei stride, 789 GLint size,
621 const void* ptr) { 790 GLenum type,
791 GLboolean normalized,
792 GLsizei stride,
793 const void* ptr) {
622 glVertexAttribPointer(indx, size, type, normalized, stride, ptr); 794 glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
623 } 795 }
624 796
625 GLvoid StubGLViewport(GLint x, GLint y, GLsizei width, GLsizei height) { 797 GLvoid GR_GL_FUNCTION_TYPE StubGLViewport(GLint x,
798 GLint y,
799 GLsizei width,
800 GLsizei height) {
626 glViewport(x, y, width, height); 801 glViewport(x, y, width, height);
627 } 802 }
628 803
629 GLint StubGLGetProgramResourceLocation(GLuint program, 804 GLint GR_GL_FUNCTION_TYPE
630 GLenum programInterface, 805 StubGLGetProgramResourceLocation(GLuint program,
631 const char* name) { 806 GLenum programInterface,
807 const char* name) {
632 return glGetProgramResourceLocation(program, programInterface, name); 808 return glGetProgramResourceLocation(program, programInterface, name);
633 } 809 }
634 810
635 } // extern "C" 811 } // extern "C"
636 } // namespace 812 } // namespace
637 813
638 namespace gfx { 814 namespace gfx {
639 815
640 GrGLInterface* CreateInProcessSkiaGLBinding() { 816 GrGLInterface* CreateInProcessSkiaGLBinding() {
641 GrGLStandard standard; 817 GrGLStandard standard;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 functions->fMapBuffer = StubGLMapBuffer; 986 functions->fMapBuffer = StubGLMapBuffer;
811 functions->fUnmapBuffer = StubGLUnmapBuffer; 987 functions->fUnmapBuffer = StubGLUnmapBuffer;
812 functions->fBindFragDataLocationIndexed = 988 functions->fBindFragDataLocationIndexed =
813 StubGLBindFragDataLocationIndexed; 989 StubGLBindFragDataLocationIndexed;
814 functions->fGetProgramResourceLocation = StubGLGetProgramResourceLocation; 990 functions->fGetProgramResourceLocation = StubGLGetProgramResourceLocation;
815 991
816 return interface; 992 return interface;
817 } 993 }
818 994
819 } // namespace gfx 995 } // namespace gfx
OLDNEW
« no previous file with comments | « third_party/mojo/src/mojo/public/platform/native/gles2_impl_thunks.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698