- add sources.
[platform/framework/web/crosswalk.git] / src / gpu / command_buffer / client / gles2_cmd_helper_autogen.h
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
3 // found in the LICENSE file.
4
5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // DO NOT EDIT!
8
9 #ifndef GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_
10 #define GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_
11
12   void ActiveTexture(GLenum texture) {
13     gles2::cmds::ActiveTexture* c = GetCmdSpace<gles2::cmds::ActiveTexture>();
14     if (c) {
15       c->Init(texture);
16     }
17   }
18
19   void AttachShader(GLuint program, GLuint shader) {
20     gles2::cmds::AttachShader* c = GetCmdSpace<gles2::cmds::AttachShader>();
21     if (c) {
22       c->Init(program, shader);
23     }
24   }
25
26   void BindAttribLocation(
27       GLuint program, GLuint index, uint32 name_shm_id, uint32 name_shm_offset,
28       uint32 data_size) {
29     gles2::cmds::BindAttribLocation* c =
30         GetCmdSpace<gles2::cmds::BindAttribLocation>();
31     if (c) {
32       c->Init(program, index, name_shm_id, name_shm_offset, data_size);
33     }
34   }
35
36   void BindAttribLocationBucket(
37       GLuint program, GLuint index, uint32 name_bucket_id) {
38     gles2::cmds::BindAttribLocationBucket* c =
39         GetCmdSpace<gles2::cmds::BindAttribLocationBucket>();
40     if (c) {
41       c->Init(program, index, name_bucket_id);
42     }
43   }
44
45   void BindBuffer(GLenum target, GLuint buffer) {
46     gles2::cmds::BindBuffer* c = GetCmdSpace<gles2::cmds::BindBuffer>();
47     if (c) {
48       c->Init(target, buffer);
49     }
50   }
51
52   void BindFramebuffer(GLenum target, GLuint framebuffer) {
53     gles2::cmds::BindFramebuffer* c =
54         GetCmdSpace<gles2::cmds::BindFramebuffer>();
55     if (c) {
56       c->Init(target, framebuffer);
57     }
58   }
59
60   void BindRenderbuffer(GLenum target, GLuint renderbuffer) {
61     gles2::cmds::BindRenderbuffer* c =
62         GetCmdSpace<gles2::cmds::BindRenderbuffer>();
63     if (c) {
64       c->Init(target, renderbuffer);
65     }
66   }
67
68   void BindTexture(GLenum target, GLuint texture) {
69     gles2::cmds::BindTexture* c = GetCmdSpace<gles2::cmds::BindTexture>();
70     if (c) {
71       c->Init(target, texture);
72     }
73   }
74
75   void BlendColor(
76       GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
77     gles2::cmds::BlendColor* c = GetCmdSpace<gles2::cmds::BlendColor>();
78     if (c) {
79       c->Init(red, green, blue, alpha);
80     }
81   }
82
83   void BlendEquation(GLenum mode) {
84     gles2::cmds::BlendEquation* c = GetCmdSpace<gles2::cmds::BlendEquation>();
85     if (c) {
86       c->Init(mode);
87     }
88   }
89
90   void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {
91     gles2::cmds::BlendEquationSeparate* c =
92         GetCmdSpace<gles2::cmds::BlendEquationSeparate>();
93     if (c) {
94       c->Init(modeRGB, modeAlpha);
95     }
96   }
97
98   void BlendFunc(GLenum sfactor, GLenum dfactor) {
99     gles2::cmds::BlendFunc* c = GetCmdSpace<gles2::cmds::BlendFunc>();
100     if (c) {
101       c->Init(sfactor, dfactor);
102     }
103   }
104
105   void BlendFuncSeparate(
106       GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
107     gles2::cmds::BlendFuncSeparate* c =
108         GetCmdSpace<gles2::cmds::BlendFuncSeparate>();
109     if (c) {
110       c->Init(srcRGB, dstRGB, srcAlpha, dstAlpha);
111     }
112   }
113
114   void BufferData(
115       GLenum target, GLsizeiptr size, uint32 data_shm_id,
116       uint32 data_shm_offset, GLenum usage) {
117     gles2::cmds::BufferData* c = GetCmdSpace<gles2::cmds::BufferData>();
118     if (c) {
119       c->Init(target, size, data_shm_id, data_shm_offset, usage);
120     }
121   }
122
123   void BufferSubData(
124       GLenum target, GLintptr offset, GLsizeiptr size, uint32 data_shm_id,
125       uint32 data_shm_offset) {
126     gles2::cmds::BufferSubData* c = GetCmdSpace<gles2::cmds::BufferSubData>();
127     if (c) {
128       c->Init(target, offset, size, data_shm_id, data_shm_offset);
129     }
130   }
131
132   void CheckFramebufferStatus(
133       GLenum target, uint32 result_shm_id, uint32 result_shm_offset) {
134     gles2::cmds::CheckFramebufferStatus* c =
135         GetCmdSpace<gles2::cmds::CheckFramebufferStatus>();
136     if (c) {
137       c->Init(target, result_shm_id, result_shm_offset);
138     }
139   }
140
141   void Clear(GLbitfield mask) {
142     gles2::cmds::Clear* c = GetCmdSpace<gles2::cmds::Clear>();
143     if (c) {
144       c->Init(mask);
145     }
146   }
147
148   void ClearColor(
149       GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
150     gles2::cmds::ClearColor* c = GetCmdSpace<gles2::cmds::ClearColor>();
151     if (c) {
152       c->Init(red, green, blue, alpha);
153     }
154   }
155
156   void ClearDepthf(GLclampf depth) {
157     gles2::cmds::ClearDepthf* c = GetCmdSpace<gles2::cmds::ClearDepthf>();
158     if (c) {
159       c->Init(depth);
160     }
161   }
162
163   void ClearStencil(GLint s) {
164     gles2::cmds::ClearStencil* c = GetCmdSpace<gles2::cmds::ClearStencil>();
165     if (c) {
166       c->Init(s);
167     }
168   }
169
170   void ColorMask(
171       GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {
172     gles2::cmds::ColorMask* c = GetCmdSpace<gles2::cmds::ColorMask>();
173     if (c) {
174       c->Init(red, green, blue, alpha);
175     }
176   }
177
178   void CompileShader(GLuint shader) {
179     gles2::cmds::CompileShader* c = GetCmdSpace<gles2::cmds::CompileShader>();
180     if (c) {
181       c->Init(shader);
182     }
183   }
184
185   void CompressedTexImage2D(
186       GLenum target, GLint level, GLenum internalformat, GLsizei width,
187       GLsizei height, GLint border, GLsizei imageSize, uint32 data_shm_id,
188       uint32 data_shm_offset) {
189     gles2::cmds::CompressedTexImage2D* c =
190         GetCmdSpace<gles2::cmds::CompressedTexImage2D>();
191     if (c) {
192       c->Init(
193           target, level, internalformat, width, height, border, imageSize,
194           data_shm_id, data_shm_offset);
195     }
196   }
197
198   void CompressedTexImage2DBucket(
199       GLenum target, GLint level, GLenum internalformat, GLsizei width,
200       GLsizei height, GLint border, GLuint bucket_id) {
201     gles2::cmds::CompressedTexImage2DBucket* c =
202         GetCmdSpace<gles2::cmds::CompressedTexImage2DBucket>();
203     if (c) {
204       c->Init(target, level, internalformat, width, height, border, bucket_id);
205     }
206   }
207
208   void CompressedTexSubImage2D(
209       GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
210       GLsizei height, GLenum format, GLsizei imageSize, uint32 data_shm_id,
211       uint32 data_shm_offset) {
212     gles2::cmds::CompressedTexSubImage2D* c =
213         GetCmdSpace<gles2::cmds::CompressedTexSubImage2D>();
214     if (c) {
215       c->Init(
216           target, level, xoffset, yoffset, width, height, format, imageSize,
217           data_shm_id, data_shm_offset);
218     }
219   }
220
221   void CompressedTexSubImage2DBucket(
222       GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
223       GLsizei height, GLenum format, GLuint bucket_id) {
224     gles2::cmds::CompressedTexSubImage2DBucket* c =
225         GetCmdSpace<gles2::cmds::CompressedTexSubImage2DBucket>();
226     if (c) {
227       c->Init(
228           target, level, xoffset, yoffset, width, height, format, bucket_id);
229     }
230   }
231
232   void CopyTexImage2D(
233       GLenum target, GLint level, GLenum internalformat, GLint x, GLint y,
234       GLsizei width, GLsizei height, GLint border) {
235     gles2::cmds::CopyTexImage2D* c =
236         GetCmdSpace<gles2::cmds::CopyTexImage2D>();
237     if (c) {
238       c->Init(target, level, internalformat, x, y, width, height, border);
239     }
240   }
241
242   void CopyTexSubImage2D(
243       GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x,
244       GLint y, GLsizei width, GLsizei height) {
245     gles2::cmds::CopyTexSubImage2D* c =
246         GetCmdSpace<gles2::cmds::CopyTexSubImage2D>();
247     if (c) {
248       c->Init(target, level, xoffset, yoffset, x, y, width, height);
249     }
250   }
251
252   void CreateProgram(uint32 client_id) {
253     gles2::cmds::CreateProgram* c = GetCmdSpace<gles2::cmds::CreateProgram>();
254     if (c) {
255       c->Init(client_id);
256     }
257   }
258
259   void CreateShader(GLenum type, uint32 client_id) {
260     gles2::cmds::CreateShader* c = GetCmdSpace<gles2::cmds::CreateShader>();
261     if (c) {
262       c->Init(type, client_id);
263     }
264   }
265
266   void CullFace(GLenum mode) {
267     gles2::cmds::CullFace* c = GetCmdSpace<gles2::cmds::CullFace>();
268     if (c) {
269       c->Init(mode);
270     }
271   }
272
273   void DeleteBuffers(
274       GLsizei n, uint32 buffers_shm_id, uint32 buffers_shm_offset) {
275     gles2::cmds::DeleteBuffers* c = GetCmdSpace<gles2::cmds::DeleteBuffers>();
276     if (c) {
277       c->Init(n, buffers_shm_id, buffers_shm_offset);
278     }
279   }
280
281   void DeleteBuffersImmediate(GLsizei n, const GLuint* buffers) {
282     const uint32 size = gles2::cmds::DeleteBuffersImmediate::ComputeSize(n);
283     gles2::cmds::DeleteBuffersImmediate* c =
284         GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteBuffersImmediate>(
285             size);
286     if (c) {
287       c->Init(n, buffers);
288     }
289   }
290
291   void DeleteFramebuffers(
292       GLsizei n, uint32 framebuffers_shm_id, uint32 framebuffers_shm_offset) {
293     gles2::cmds::DeleteFramebuffers* c =
294         GetCmdSpace<gles2::cmds::DeleteFramebuffers>();
295     if (c) {
296       c->Init(n, framebuffers_shm_id, framebuffers_shm_offset);
297     }
298   }
299
300   void DeleteFramebuffersImmediate(GLsizei n, const GLuint* framebuffers) {
301     const uint32 size =
302         gles2::cmds::DeleteFramebuffersImmediate::ComputeSize(n);
303     gles2::cmds::DeleteFramebuffersImmediate* c =
304         GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteFramebuffersImmediate>(
305             size);
306     if (c) {
307       c->Init(n, framebuffers);
308     }
309   }
310
311   void DeleteProgram(GLuint program) {
312     gles2::cmds::DeleteProgram* c = GetCmdSpace<gles2::cmds::DeleteProgram>();
313     if (c) {
314       c->Init(program);
315     }
316   }
317
318   void DeleteRenderbuffers(
319       GLsizei n, uint32 renderbuffers_shm_id,
320       uint32 renderbuffers_shm_offset) {
321     gles2::cmds::DeleteRenderbuffers* c =
322         GetCmdSpace<gles2::cmds::DeleteRenderbuffers>();
323     if (c) {
324       c->Init(n, renderbuffers_shm_id, renderbuffers_shm_offset);
325     }
326   }
327
328   void DeleteRenderbuffersImmediate(GLsizei n, const GLuint* renderbuffers) {
329     const uint32 size =
330         gles2::cmds::DeleteRenderbuffersImmediate::ComputeSize(n);
331     gles2::cmds::DeleteRenderbuffersImmediate* c =
332         GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteRenderbuffersImmediate>(size);  // NOLINT
333     if (c) {
334       c->Init(n, renderbuffers);
335     }
336   }
337
338   void DeleteShader(GLuint shader) {
339     gles2::cmds::DeleteShader* c = GetCmdSpace<gles2::cmds::DeleteShader>();
340     if (c) {
341       c->Init(shader);
342     }
343   }
344
345   void DeleteTextures(
346       GLsizei n, uint32 textures_shm_id, uint32 textures_shm_offset) {
347     gles2::cmds::DeleteTextures* c =
348         GetCmdSpace<gles2::cmds::DeleteTextures>();
349     if (c) {
350       c->Init(n, textures_shm_id, textures_shm_offset);
351     }
352   }
353
354   void DeleteTexturesImmediate(GLsizei n, const GLuint* textures) {
355     const uint32 size = gles2::cmds::DeleteTexturesImmediate::ComputeSize(n);
356     gles2::cmds::DeleteTexturesImmediate* c =
357         GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteTexturesImmediate>(
358             size);
359     if (c) {
360       c->Init(n, textures);
361     }
362   }
363
364   void DepthFunc(GLenum func) {
365     gles2::cmds::DepthFunc* c = GetCmdSpace<gles2::cmds::DepthFunc>();
366     if (c) {
367       c->Init(func);
368     }
369   }
370
371   void DepthMask(GLboolean flag) {
372     gles2::cmds::DepthMask* c = GetCmdSpace<gles2::cmds::DepthMask>();
373     if (c) {
374       c->Init(flag);
375     }
376   }
377
378   void DepthRangef(GLclampf zNear, GLclampf zFar) {
379     gles2::cmds::DepthRangef* c = GetCmdSpace<gles2::cmds::DepthRangef>();
380     if (c) {
381       c->Init(zNear, zFar);
382     }
383   }
384
385   void DetachShader(GLuint program, GLuint shader) {
386     gles2::cmds::DetachShader* c = GetCmdSpace<gles2::cmds::DetachShader>();
387     if (c) {
388       c->Init(program, shader);
389     }
390   }
391
392   void Disable(GLenum cap) {
393     gles2::cmds::Disable* c = GetCmdSpace<gles2::cmds::Disable>();
394     if (c) {
395       c->Init(cap);
396     }
397   }
398
399   void DisableVertexAttribArray(GLuint index) {
400     gles2::cmds::DisableVertexAttribArray* c =
401         GetCmdSpace<gles2::cmds::DisableVertexAttribArray>();
402     if (c) {
403       c->Init(index);
404     }
405   }
406
407   void DrawArrays(GLenum mode, GLint first, GLsizei count) {
408     gles2::cmds::DrawArrays* c = GetCmdSpace<gles2::cmds::DrawArrays>();
409     if (c) {
410       c->Init(mode, first, count);
411     }
412   }
413
414   void DrawElements(
415       GLenum mode, GLsizei count, GLenum type, GLuint index_offset) {
416     gles2::cmds::DrawElements* c = GetCmdSpace<gles2::cmds::DrawElements>();
417     if (c) {
418       c->Init(mode, count, type, index_offset);
419     }
420   }
421
422   void Enable(GLenum cap) {
423     gles2::cmds::Enable* c = GetCmdSpace<gles2::cmds::Enable>();
424     if (c) {
425       c->Init(cap);
426     }
427   }
428
429   void EnableVertexAttribArray(GLuint index) {
430     gles2::cmds::EnableVertexAttribArray* c =
431         GetCmdSpace<gles2::cmds::EnableVertexAttribArray>();
432     if (c) {
433       c->Init(index);
434     }
435   }
436
437   void Finish() {
438     gles2::cmds::Finish* c = GetCmdSpace<gles2::cmds::Finish>();
439     if (c) {
440       c->Init();
441     }
442   }
443
444   void Flush() {
445     gles2::cmds::Flush* c = GetCmdSpace<gles2::cmds::Flush>();
446     if (c) {
447       c->Init();
448     }
449   }
450
451   void FramebufferRenderbuffer(
452       GLenum target, GLenum attachment, GLenum renderbuffertarget,
453       GLuint renderbuffer) {
454     gles2::cmds::FramebufferRenderbuffer* c =
455         GetCmdSpace<gles2::cmds::FramebufferRenderbuffer>();
456     if (c) {
457       c->Init(target, attachment, renderbuffertarget, renderbuffer);
458     }
459   }
460
461   void FramebufferTexture2D(
462       GLenum target, GLenum attachment, GLenum textarget, GLuint texture,
463       GLint level) {
464     gles2::cmds::FramebufferTexture2D* c =
465         GetCmdSpace<gles2::cmds::FramebufferTexture2D>();
466     if (c) {
467       c->Init(target, attachment, textarget, texture, level);
468     }
469   }
470
471   void FrontFace(GLenum mode) {
472     gles2::cmds::FrontFace* c = GetCmdSpace<gles2::cmds::FrontFace>();
473     if (c) {
474       c->Init(mode);
475     }
476   }
477
478   void GenBuffers(
479       GLsizei n, uint32 buffers_shm_id, uint32 buffers_shm_offset) {
480     gles2::cmds::GenBuffers* c = GetCmdSpace<gles2::cmds::GenBuffers>();
481     if (c) {
482       c->Init(n, buffers_shm_id, buffers_shm_offset);
483     }
484   }
485
486   void GenBuffersImmediate(GLsizei n, GLuint* buffers) {
487     const uint32 size = gles2::cmds::GenBuffersImmediate::ComputeSize(n);
488     gles2::cmds::GenBuffersImmediate* c =
489         GetImmediateCmdSpaceTotalSize<gles2::cmds::GenBuffersImmediate>(size);
490     if (c) {
491       c->Init(n, buffers);
492     }
493   }
494
495   void GenerateMipmap(GLenum target) {
496     gles2::cmds::GenerateMipmap* c =
497         GetCmdSpace<gles2::cmds::GenerateMipmap>();
498     if (c) {
499       c->Init(target);
500     }
501   }
502
503   void GenFramebuffers(
504       GLsizei n, uint32 framebuffers_shm_id, uint32 framebuffers_shm_offset) {
505     gles2::cmds::GenFramebuffers* c =
506         GetCmdSpace<gles2::cmds::GenFramebuffers>();
507     if (c) {
508       c->Init(n, framebuffers_shm_id, framebuffers_shm_offset);
509     }
510   }
511
512   void GenFramebuffersImmediate(GLsizei n, GLuint* framebuffers) {
513     const uint32 size = gles2::cmds::GenFramebuffersImmediate::ComputeSize(n);
514     gles2::cmds::GenFramebuffersImmediate* c =
515         GetImmediateCmdSpaceTotalSize<gles2::cmds::GenFramebuffersImmediate>(
516             size);
517     if (c) {
518       c->Init(n, framebuffers);
519     }
520   }
521
522   void GenRenderbuffers(
523       GLsizei n, uint32 renderbuffers_shm_id,
524       uint32 renderbuffers_shm_offset) {
525     gles2::cmds::GenRenderbuffers* c =
526         GetCmdSpace<gles2::cmds::GenRenderbuffers>();
527     if (c) {
528       c->Init(n, renderbuffers_shm_id, renderbuffers_shm_offset);
529     }
530   }
531
532   void GenRenderbuffersImmediate(GLsizei n, GLuint* renderbuffers) {
533     const uint32 size = gles2::cmds::GenRenderbuffersImmediate::ComputeSize(n);
534     gles2::cmds::GenRenderbuffersImmediate* c =
535         GetImmediateCmdSpaceTotalSize<gles2::cmds::GenRenderbuffersImmediate>(
536             size);
537     if (c) {
538       c->Init(n, renderbuffers);
539     }
540   }
541
542   void GenTextures(
543       GLsizei n, uint32 textures_shm_id, uint32 textures_shm_offset) {
544     gles2::cmds::GenTextures* c = GetCmdSpace<gles2::cmds::GenTextures>();
545     if (c) {
546       c->Init(n, textures_shm_id, textures_shm_offset);
547     }
548   }
549
550   void GenTexturesImmediate(GLsizei n, GLuint* textures) {
551     const uint32 size = gles2::cmds::GenTexturesImmediate::ComputeSize(n);
552     gles2::cmds::GenTexturesImmediate* c =
553         GetImmediateCmdSpaceTotalSize<gles2::cmds::GenTexturesImmediate>(size);
554     if (c) {
555       c->Init(n, textures);
556     }
557   }
558
559   void GetActiveAttrib(
560       GLuint program, GLuint index, uint32 name_bucket_id, uint32 result_shm_id,
561       uint32 result_shm_offset) {
562     gles2::cmds::GetActiveAttrib* c =
563         GetCmdSpace<gles2::cmds::GetActiveAttrib>();
564     if (c) {
565       c->Init(
566           program, index, name_bucket_id, result_shm_id, result_shm_offset);
567     }
568   }
569
570   void GetActiveUniform(
571       GLuint program, GLuint index, uint32 name_bucket_id, uint32 result_shm_id,
572       uint32 result_shm_offset) {
573     gles2::cmds::GetActiveUniform* c =
574         GetCmdSpace<gles2::cmds::GetActiveUniform>();
575     if (c) {
576       c->Init(
577           program, index, name_bucket_id, result_shm_id, result_shm_offset);
578     }
579   }
580
581   void GetAttachedShaders(
582       GLuint program, uint32 result_shm_id, uint32 result_shm_offset,
583       uint32 result_size) {
584     gles2::cmds::GetAttachedShaders* c =
585         GetCmdSpace<gles2::cmds::GetAttachedShaders>();
586     if (c) {
587       c->Init(program, result_shm_id, result_shm_offset, result_size);
588     }
589   }
590
591   void GetBooleanv(
592       GLenum pname, uint32 params_shm_id, uint32 params_shm_offset) {
593     gles2::cmds::GetBooleanv* c = GetCmdSpace<gles2::cmds::GetBooleanv>();
594     if (c) {
595       c->Init(pname, params_shm_id, params_shm_offset);
596     }
597   }
598
599   void GetBufferParameteriv(
600       GLenum target, GLenum pname, uint32 params_shm_id,
601       uint32 params_shm_offset) {
602     gles2::cmds::GetBufferParameteriv* c =
603         GetCmdSpace<gles2::cmds::GetBufferParameteriv>();
604     if (c) {
605       c->Init(target, pname, params_shm_id, params_shm_offset);
606     }
607   }
608
609   void GetError(uint32 result_shm_id, uint32 result_shm_offset) {
610     gles2::cmds::GetError* c = GetCmdSpace<gles2::cmds::GetError>();
611     if (c) {
612       c->Init(result_shm_id, result_shm_offset);
613     }
614   }
615
616   void GetFloatv(
617       GLenum pname, uint32 params_shm_id, uint32 params_shm_offset) {
618     gles2::cmds::GetFloatv* c = GetCmdSpace<gles2::cmds::GetFloatv>();
619     if (c) {
620       c->Init(pname, params_shm_id, params_shm_offset);
621     }
622   }
623
624   void GetFramebufferAttachmentParameteriv(
625       GLenum target, GLenum attachment, GLenum pname, uint32 params_shm_id,
626       uint32 params_shm_offset) {
627     gles2::cmds::GetFramebufferAttachmentParameteriv* c =
628         GetCmdSpace<gles2::cmds::GetFramebufferAttachmentParameteriv>();
629     if (c) {
630       c->Init(target, attachment, pname, params_shm_id, params_shm_offset);
631     }
632   }
633
634   void GetIntegerv(
635       GLenum pname, uint32 params_shm_id, uint32 params_shm_offset) {
636     gles2::cmds::GetIntegerv* c = GetCmdSpace<gles2::cmds::GetIntegerv>();
637     if (c) {
638       c->Init(pname, params_shm_id, params_shm_offset);
639     }
640   }
641
642   void GetProgramiv(
643       GLuint program, GLenum pname, uint32 params_shm_id,
644       uint32 params_shm_offset) {
645     gles2::cmds::GetProgramiv* c = GetCmdSpace<gles2::cmds::GetProgramiv>();
646     if (c) {
647       c->Init(program, pname, params_shm_id, params_shm_offset);
648     }
649   }
650
651   void GetProgramInfoLog(GLuint program, uint32 bucket_id) {
652     gles2::cmds::GetProgramInfoLog* c =
653         GetCmdSpace<gles2::cmds::GetProgramInfoLog>();
654     if (c) {
655       c->Init(program, bucket_id);
656     }
657   }
658
659   void GetRenderbufferParameteriv(
660       GLenum target, GLenum pname, uint32 params_shm_id,
661       uint32 params_shm_offset) {
662     gles2::cmds::GetRenderbufferParameteriv* c =
663         GetCmdSpace<gles2::cmds::GetRenderbufferParameteriv>();
664     if (c) {
665       c->Init(target, pname, params_shm_id, params_shm_offset);
666     }
667   }
668
669   void GetShaderiv(
670       GLuint shader, GLenum pname, uint32 params_shm_id,
671       uint32 params_shm_offset) {
672     gles2::cmds::GetShaderiv* c = GetCmdSpace<gles2::cmds::GetShaderiv>();
673     if (c) {
674       c->Init(shader, pname, params_shm_id, params_shm_offset);
675     }
676   }
677
678   void GetShaderInfoLog(GLuint shader, uint32 bucket_id) {
679     gles2::cmds::GetShaderInfoLog* c =
680         GetCmdSpace<gles2::cmds::GetShaderInfoLog>();
681     if (c) {
682       c->Init(shader, bucket_id);
683     }
684   }
685
686   void GetShaderPrecisionFormat(
687       GLenum shadertype, GLenum precisiontype, uint32 result_shm_id,
688       uint32 result_shm_offset) {
689     gles2::cmds::GetShaderPrecisionFormat* c =
690         GetCmdSpace<gles2::cmds::GetShaderPrecisionFormat>();
691     if (c) {
692       c->Init(shadertype, precisiontype, result_shm_id, result_shm_offset);
693     }
694   }
695
696   void GetShaderSource(GLuint shader, uint32 bucket_id) {
697     gles2::cmds::GetShaderSource* c =
698         GetCmdSpace<gles2::cmds::GetShaderSource>();
699     if (c) {
700       c->Init(shader, bucket_id);
701     }
702   }
703
704   void GetString(GLenum name, uint32 bucket_id) {
705     gles2::cmds::GetString* c = GetCmdSpace<gles2::cmds::GetString>();
706     if (c) {
707       c->Init(name, bucket_id);
708     }
709   }
710
711   void GetTexParameterfv(
712       GLenum target, GLenum pname, uint32 params_shm_id,
713       uint32 params_shm_offset) {
714     gles2::cmds::GetTexParameterfv* c =
715         GetCmdSpace<gles2::cmds::GetTexParameterfv>();
716     if (c) {
717       c->Init(target, pname, params_shm_id, params_shm_offset);
718     }
719   }
720
721   void GetTexParameteriv(
722       GLenum target, GLenum pname, uint32 params_shm_id,
723       uint32 params_shm_offset) {
724     gles2::cmds::GetTexParameteriv* c =
725         GetCmdSpace<gles2::cmds::GetTexParameteriv>();
726     if (c) {
727       c->Init(target, pname, params_shm_id, params_shm_offset);
728     }
729   }
730
731   void GetUniformfv(
732       GLuint program, GLint location, uint32 params_shm_id,
733       uint32 params_shm_offset) {
734     gles2::cmds::GetUniformfv* c = GetCmdSpace<gles2::cmds::GetUniformfv>();
735     if (c) {
736       c->Init(program, location, params_shm_id, params_shm_offset);
737     }
738   }
739
740   void GetUniformiv(
741       GLuint program, GLint location, uint32 params_shm_id,
742       uint32 params_shm_offset) {
743     gles2::cmds::GetUniformiv* c = GetCmdSpace<gles2::cmds::GetUniformiv>();
744     if (c) {
745       c->Init(program, location, params_shm_id, params_shm_offset);
746     }
747   }
748
749   void GetVertexAttribfv(
750       GLuint index, GLenum pname, uint32 params_shm_id,
751       uint32 params_shm_offset) {
752     gles2::cmds::GetVertexAttribfv* c =
753         GetCmdSpace<gles2::cmds::GetVertexAttribfv>();
754     if (c) {
755       c->Init(index, pname, params_shm_id, params_shm_offset);
756     }
757   }
758
759   void GetVertexAttribiv(
760       GLuint index, GLenum pname, uint32 params_shm_id,
761       uint32 params_shm_offset) {
762     gles2::cmds::GetVertexAttribiv* c =
763         GetCmdSpace<gles2::cmds::GetVertexAttribiv>();
764     if (c) {
765       c->Init(index, pname, params_shm_id, params_shm_offset);
766     }
767   }
768
769   void GetVertexAttribPointerv(
770       GLuint index, GLenum pname, uint32 pointer_shm_id,
771       uint32 pointer_shm_offset) {
772     gles2::cmds::GetVertexAttribPointerv* c =
773         GetCmdSpace<gles2::cmds::GetVertexAttribPointerv>();
774     if (c) {
775       c->Init(index, pname, pointer_shm_id, pointer_shm_offset);
776     }
777   }
778
779   void Hint(GLenum target, GLenum mode) {
780     gles2::cmds::Hint* c = GetCmdSpace<gles2::cmds::Hint>();
781     if (c) {
782       c->Init(target, mode);
783     }
784   }
785
786   void IsBuffer(
787       GLuint buffer, uint32 result_shm_id, uint32 result_shm_offset) {
788     gles2::cmds::IsBuffer* c = GetCmdSpace<gles2::cmds::IsBuffer>();
789     if (c) {
790       c->Init(buffer, result_shm_id, result_shm_offset);
791     }
792   }
793
794   void IsEnabled(GLenum cap, uint32 result_shm_id, uint32 result_shm_offset) {
795     gles2::cmds::IsEnabled* c = GetCmdSpace<gles2::cmds::IsEnabled>();
796     if (c) {
797       c->Init(cap, result_shm_id, result_shm_offset);
798     }
799   }
800
801   void IsFramebuffer(
802       GLuint framebuffer, uint32 result_shm_id, uint32 result_shm_offset) {
803     gles2::cmds::IsFramebuffer* c = GetCmdSpace<gles2::cmds::IsFramebuffer>();
804     if (c) {
805       c->Init(framebuffer, result_shm_id, result_shm_offset);
806     }
807   }
808
809   void IsProgram(
810       GLuint program, uint32 result_shm_id, uint32 result_shm_offset) {
811     gles2::cmds::IsProgram* c = GetCmdSpace<gles2::cmds::IsProgram>();
812     if (c) {
813       c->Init(program, result_shm_id, result_shm_offset);
814     }
815   }
816
817   void IsRenderbuffer(
818       GLuint renderbuffer, uint32 result_shm_id, uint32 result_shm_offset) {
819     gles2::cmds::IsRenderbuffer* c =
820         GetCmdSpace<gles2::cmds::IsRenderbuffer>();
821     if (c) {
822       c->Init(renderbuffer, result_shm_id, result_shm_offset);
823     }
824   }
825
826   void IsShader(
827       GLuint shader, uint32 result_shm_id, uint32 result_shm_offset) {
828     gles2::cmds::IsShader* c = GetCmdSpace<gles2::cmds::IsShader>();
829     if (c) {
830       c->Init(shader, result_shm_id, result_shm_offset);
831     }
832   }
833
834   void IsTexture(
835       GLuint texture, uint32 result_shm_id, uint32 result_shm_offset) {
836     gles2::cmds::IsTexture* c = GetCmdSpace<gles2::cmds::IsTexture>();
837     if (c) {
838       c->Init(texture, result_shm_id, result_shm_offset);
839     }
840   }
841
842   void LineWidth(GLfloat width) {
843     gles2::cmds::LineWidth* c = GetCmdSpace<gles2::cmds::LineWidth>();
844     if (c) {
845       c->Init(width);
846     }
847   }
848
849   void LinkProgram(GLuint program) {
850     gles2::cmds::LinkProgram* c = GetCmdSpace<gles2::cmds::LinkProgram>();
851     if (c) {
852       c->Init(program);
853     }
854   }
855
856   void PixelStorei(GLenum pname, GLint param) {
857     gles2::cmds::PixelStorei* c = GetCmdSpace<gles2::cmds::PixelStorei>();
858     if (c) {
859       c->Init(pname, param);
860     }
861   }
862
863   void PolygonOffset(GLfloat factor, GLfloat units) {
864     gles2::cmds::PolygonOffset* c = GetCmdSpace<gles2::cmds::PolygonOffset>();
865     if (c) {
866       c->Init(factor, units);
867     }
868   }
869
870   void ReadPixels(
871       GLint x, GLint y, GLsizei width, GLsizei height, GLenum format,
872       GLenum type, uint32 pixels_shm_id, uint32 pixels_shm_offset,
873       uint32 result_shm_id, uint32 result_shm_offset, GLboolean async) {
874     gles2::cmds::ReadPixels* c = GetCmdSpace<gles2::cmds::ReadPixels>();
875     if (c) {
876       c->Init(
877           x, y, width, height, format, type, pixels_shm_id, pixels_shm_offset,
878           result_shm_id, result_shm_offset, async);
879     }
880   }
881
882   void ReleaseShaderCompiler() {
883     gles2::cmds::ReleaseShaderCompiler* c =
884         GetCmdSpace<gles2::cmds::ReleaseShaderCompiler>();
885     if (c) {
886       c->Init();
887     }
888   }
889
890   void RenderbufferStorage(
891       GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
892     gles2::cmds::RenderbufferStorage* c =
893         GetCmdSpace<gles2::cmds::RenderbufferStorage>();
894     if (c) {
895       c->Init(target, internalformat, width, height);
896     }
897   }
898
899   void SampleCoverage(GLclampf value, GLboolean invert) {
900     gles2::cmds::SampleCoverage* c =
901         GetCmdSpace<gles2::cmds::SampleCoverage>();
902     if (c) {
903       c->Init(value, invert);
904     }
905   }
906
907   void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) {
908     gles2::cmds::Scissor* c = GetCmdSpace<gles2::cmds::Scissor>();
909     if (c) {
910       c->Init(x, y, width, height);
911     }
912   }
913
914   void ShaderBinary(
915       GLsizei n, uint32 shaders_shm_id, uint32 shaders_shm_offset,
916       GLenum binaryformat, uint32 binary_shm_id, uint32 binary_shm_offset,
917       GLsizei length) {
918     gles2::cmds::ShaderBinary* c = GetCmdSpace<gles2::cmds::ShaderBinary>();
919     if (c) {
920       c->Init(
921           n, shaders_shm_id, shaders_shm_offset, binaryformat, binary_shm_id,
922           binary_shm_offset, length);
923     }
924   }
925
926   void ShaderSource(
927       GLuint shader, uint32 data_shm_id, uint32 data_shm_offset,
928       uint32 data_size) {
929     gles2::cmds::ShaderSource* c = GetCmdSpace<gles2::cmds::ShaderSource>();
930     if (c) {
931       c->Init(shader, data_shm_id, data_shm_offset, data_size);
932     }
933   }
934
935   void ShaderSourceBucket(GLuint shader, uint32 data_bucket_id) {
936     gles2::cmds::ShaderSourceBucket* c =
937         GetCmdSpace<gles2::cmds::ShaderSourceBucket>();
938     if (c) {
939       c->Init(shader, data_bucket_id);
940     }
941   }
942
943   void StencilFunc(GLenum func, GLint ref, GLuint mask) {
944     gles2::cmds::StencilFunc* c = GetCmdSpace<gles2::cmds::StencilFunc>();
945     if (c) {
946       c->Init(func, ref, mask);
947     }
948   }
949
950   void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) {
951     gles2::cmds::StencilFuncSeparate* c =
952         GetCmdSpace<gles2::cmds::StencilFuncSeparate>();
953     if (c) {
954       c->Init(face, func, ref, mask);
955     }
956   }
957
958   void StencilMask(GLuint mask) {
959     gles2::cmds::StencilMask* c = GetCmdSpace<gles2::cmds::StencilMask>();
960     if (c) {
961       c->Init(mask);
962     }
963   }
964
965   void StencilMaskSeparate(GLenum face, GLuint mask) {
966     gles2::cmds::StencilMaskSeparate* c =
967         GetCmdSpace<gles2::cmds::StencilMaskSeparate>();
968     if (c) {
969       c->Init(face, mask);
970     }
971   }
972
973   void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
974     gles2::cmds::StencilOp* c = GetCmdSpace<gles2::cmds::StencilOp>();
975     if (c) {
976       c->Init(fail, zfail, zpass);
977     }
978   }
979
980   void StencilOpSeparate(
981       GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
982     gles2::cmds::StencilOpSeparate* c =
983         GetCmdSpace<gles2::cmds::StencilOpSeparate>();
984     if (c) {
985       c->Init(face, fail, zfail, zpass);
986     }
987   }
988
989   void TexImage2D(
990       GLenum target, GLint level, GLint internalformat, GLsizei width,
991       GLsizei height, GLint border, GLenum format, GLenum type,
992       uint32 pixels_shm_id, uint32 pixels_shm_offset) {
993     gles2::cmds::TexImage2D* c = GetCmdSpace<gles2::cmds::TexImage2D>();
994     if (c) {
995       c->Init(
996           target, level, internalformat, width, height, border, format, type,
997           pixels_shm_id, pixels_shm_offset);
998     }
999   }
1000
1001   void TexParameterf(GLenum target, GLenum pname, GLfloat param) {
1002     gles2::cmds::TexParameterf* c = GetCmdSpace<gles2::cmds::TexParameterf>();
1003     if (c) {
1004       c->Init(target, pname, param);
1005     }
1006   }
1007
1008   void TexParameterfv(
1009       GLenum target, GLenum pname, uint32 params_shm_id,
1010       uint32 params_shm_offset) {
1011     gles2::cmds::TexParameterfv* c =
1012         GetCmdSpace<gles2::cmds::TexParameterfv>();
1013     if (c) {
1014       c->Init(target, pname, params_shm_id, params_shm_offset);
1015     }
1016   }
1017
1018   void TexParameterfvImmediate(
1019       GLenum target, GLenum pname, const GLfloat* params) {
1020     const uint32 size = gles2::cmds::TexParameterfvImmediate::ComputeSize();
1021     gles2::cmds::TexParameterfvImmediate* c =
1022         GetImmediateCmdSpaceTotalSize<gles2::cmds::TexParameterfvImmediate>(
1023             size);
1024     if (c) {
1025       c->Init(target, pname, params);
1026     }
1027   }
1028
1029   void TexParameteri(GLenum target, GLenum pname, GLint param) {
1030     gles2::cmds::TexParameteri* c = GetCmdSpace<gles2::cmds::TexParameteri>();
1031     if (c) {
1032       c->Init(target, pname, param);
1033     }
1034   }
1035
1036   void TexParameteriv(
1037       GLenum target, GLenum pname, uint32 params_shm_id,
1038       uint32 params_shm_offset) {
1039     gles2::cmds::TexParameteriv* c =
1040         GetCmdSpace<gles2::cmds::TexParameteriv>();
1041     if (c) {
1042       c->Init(target, pname, params_shm_id, params_shm_offset);
1043     }
1044   }
1045
1046   void TexParameterivImmediate(
1047       GLenum target, GLenum pname, const GLint* params) {
1048     const uint32 size = gles2::cmds::TexParameterivImmediate::ComputeSize();
1049     gles2::cmds::TexParameterivImmediate* c =
1050         GetImmediateCmdSpaceTotalSize<gles2::cmds::TexParameterivImmediate>(
1051             size);
1052     if (c) {
1053       c->Init(target, pname, params);
1054     }
1055   }
1056
1057   void TexSubImage2D(
1058       GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
1059       GLsizei height, GLenum format, GLenum type, uint32 pixels_shm_id,
1060       uint32 pixels_shm_offset, GLboolean internal) {
1061     gles2::cmds::TexSubImage2D* c = GetCmdSpace<gles2::cmds::TexSubImage2D>();
1062     if (c) {
1063       c->Init(
1064           target, level, xoffset, yoffset, width, height, format, type,
1065           pixels_shm_id, pixels_shm_offset, internal);
1066     }
1067   }
1068
1069   void Uniform1f(GLint location, GLfloat x) {
1070     gles2::cmds::Uniform1f* c = GetCmdSpace<gles2::cmds::Uniform1f>();
1071     if (c) {
1072       c->Init(location, x);
1073     }
1074   }
1075
1076   void Uniform1fv(
1077       GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) {
1078     gles2::cmds::Uniform1fv* c = GetCmdSpace<gles2::cmds::Uniform1fv>();
1079     if (c) {
1080       c->Init(location, count, v_shm_id, v_shm_offset);
1081     }
1082   }
1083
1084   void Uniform1fvImmediate(GLint location, GLsizei count, const GLfloat* v) {
1085     const uint32 size = gles2::cmds::Uniform1fvImmediate::ComputeSize(count);
1086     gles2::cmds::Uniform1fvImmediate* c =
1087         GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform1fvImmediate>(size);
1088     if (c) {
1089       c->Init(location, count, v);
1090     }
1091   }
1092
1093   void Uniform1i(GLint location, GLint x) {
1094     gles2::cmds::Uniform1i* c = GetCmdSpace<gles2::cmds::Uniform1i>();
1095     if (c) {
1096       c->Init(location, x);
1097     }
1098   }
1099
1100   void Uniform1iv(
1101       GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) {
1102     gles2::cmds::Uniform1iv* c = GetCmdSpace<gles2::cmds::Uniform1iv>();
1103     if (c) {
1104       c->Init(location, count, v_shm_id, v_shm_offset);
1105     }
1106   }
1107
1108   void Uniform1ivImmediate(GLint location, GLsizei count, const GLint* v) {
1109     const uint32 size = gles2::cmds::Uniform1ivImmediate::ComputeSize(count);
1110     gles2::cmds::Uniform1ivImmediate* c =
1111         GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform1ivImmediate>(size);
1112     if (c) {
1113       c->Init(location, count, v);
1114     }
1115   }
1116
1117   void Uniform2f(GLint location, GLfloat x, GLfloat y) {
1118     gles2::cmds::Uniform2f* c = GetCmdSpace<gles2::cmds::Uniform2f>();
1119     if (c) {
1120       c->Init(location, x, y);
1121     }
1122   }
1123
1124   void Uniform2fv(
1125       GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) {
1126     gles2::cmds::Uniform2fv* c = GetCmdSpace<gles2::cmds::Uniform2fv>();
1127     if (c) {
1128       c->Init(location, count, v_shm_id, v_shm_offset);
1129     }
1130   }
1131
1132   void Uniform2fvImmediate(GLint location, GLsizei count, const GLfloat* v) {
1133     const uint32 size = gles2::cmds::Uniform2fvImmediate::ComputeSize(count);
1134     gles2::cmds::Uniform2fvImmediate* c =
1135         GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform2fvImmediate>(size);
1136     if (c) {
1137       c->Init(location, count, v);
1138     }
1139   }
1140
1141   void Uniform2i(GLint location, GLint x, GLint y) {
1142     gles2::cmds::Uniform2i* c = GetCmdSpace<gles2::cmds::Uniform2i>();
1143     if (c) {
1144       c->Init(location, x, y);
1145     }
1146   }
1147
1148   void Uniform2iv(
1149       GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) {
1150     gles2::cmds::Uniform2iv* c = GetCmdSpace<gles2::cmds::Uniform2iv>();
1151     if (c) {
1152       c->Init(location, count, v_shm_id, v_shm_offset);
1153     }
1154   }
1155
1156   void Uniform2ivImmediate(GLint location, GLsizei count, const GLint* v) {
1157     const uint32 size = gles2::cmds::Uniform2ivImmediate::ComputeSize(count);
1158     gles2::cmds::Uniform2ivImmediate* c =
1159         GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform2ivImmediate>(size);
1160     if (c) {
1161       c->Init(location, count, v);
1162     }
1163   }
1164
1165   void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) {
1166     gles2::cmds::Uniform3f* c = GetCmdSpace<gles2::cmds::Uniform3f>();
1167     if (c) {
1168       c->Init(location, x, y, z);
1169     }
1170   }
1171
1172   void Uniform3fv(
1173       GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) {
1174     gles2::cmds::Uniform3fv* c = GetCmdSpace<gles2::cmds::Uniform3fv>();
1175     if (c) {
1176       c->Init(location, count, v_shm_id, v_shm_offset);
1177     }
1178   }
1179
1180   void Uniform3fvImmediate(GLint location, GLsizei count, const GLfloat* v) {
1181     const uint32 size = gles2::cmds::Uniform3fvImmediate::ComputeSize(count);
1182     gles2::cmds::Uniform3fvImmediate* c =
1183         GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform3fvImmediate>(size);
1184     if (c) {
1185       c->Init(location, count, v);
1186     }
1187   }
1188
1189   void Uniform3i(GLint location, GLint x, GLint y, GLint z) {
1190     gles2::cmds::Uniform3i* c = GetCmdSpace<gles2::cmds::Uniform3i>();
1191     if (c) {
1192       c->Init(location, x, y, z);
1193     }
1194   }
1195
1196   void Uniform3iv(
1197       GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) {
1198     gles2::cmds::Uniform3iv* c = GetCmdSpace<gles2::cmds::Uniform3iv>();
1199     if (c) {
1200       c->Init(location, count, v_shm_id, v_shm_offset);
1201     }
1202   }
1203
1204   void Uniform3ivImmediate(GLint location, GLsizei count, const GLint* v) {
1205     const uint32 size = gles2::cmds::Uniform3ivImmediate::ComputeSize(count);
1206     gles2::cmds::Uniform3ivImmediate* c =
1207         GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform3ivImmediate>(size);
1208     if (c) {
1209       c->Init(location, count, v);
1210     }
1211   }
1212
1213   void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
1214     gles2::cmds::Uniform4f* c = GetCmdSpace<gles2::cmds::Uniform4f>();
1215     if (c) {
1216       c->Init(location, x, y, z, w);
1217     }
1218   }
1219
1220   void Uniform4fv(
1221       GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) {
1222     gles2::cmds::Uniform4fv* c = GetCmdSpace<gles2::cmds::Uniform4fv>();
1223     if (c) {
1224       c->Init(location, count, v_shm_id, v_shm_offset);
1225     }
1226   }
1227
1228   void Uniform4fvImmediate(GLint location, GLsizei count, const GLfloat* v) {
1229     const uint32 size = gles2::cmds::Uniform4fvImmediate::ComputeSize(count);
1230     gles2::cmds::Uniform4fvImmediate* c =
1231         GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform4fvImmediate>(size);
1232     if (c) {
1233       c->Init(location, count, v);
1234     }
1235   }
1236
1237   void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) {
1238     gles2::cmds::Uniform4i* c = GetCmdSpace<gles2::cmds::Uniform4i>();
1239     if (c) {
1240       c->Init(location, x, y, z, w);
1241     }
1242   }
1243
1244   void Uniform4iv(
1245       GLint location, GLsizei count, uint32 v_shm_id, uint32 v_shm_offset) {
1246     gles2::cmds::Uniform4iv* c = GetCmdSpace<gles2::cmds::Uniform4iv>();
1247     if (c) {
1248       c->Init(location, count, v_shm_id, v_shm_offset);
1249     }
1250   }
1251
1252   void Uniform4ivImmediate(GLint location, GLsizei count, const GLint* v) {
1253     const uint32 size = gles2::cmds::Uniform4ivImmediate::ComputeSize(count);
1254     gles2::cmds::Uniform4ivImmediate* c =
1255         GetImmediateCmdSpaceTotalSize<gles2::cmds::Uniform4ivImmediate>(size);
1256     if (c) {
1257       c->Init(location, count, v);
1258     }
1259   }
1260
1261   void UniformMatrix2fv(
1262       GLint location, GLsizei count, GLboolean transpose, uint32 value_shm_id,
1263       uint32 value_shm_offset) {
1264     gles2::cmds::UniformMatrix2fv* c =
1265         GetCmdSpace<gles2::cmds::UniformMatrix2fv>();
1266     if (c) {
1267       c->Init(location, count, transpose, value_shm_id, value_shm_offset);
1268     }
1269   }
1270
1271   void UniformMatrix2fvImmediate(
1272       GLint location, GLsizei count, GLboolean transpose,
1273       const GLfloat* value) {
1274     const uint32 size =
1275         gles2::cmds::UniformMatrix2fvImmediate::ComputeSize(count);
1276     gles2::cmds::UniformMatrix2fvImmediate* c =
1277         GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix2fvImmediate>(
1278             size);
1279     if (c) {
1280       c->Init(location, count, transpose, value);
1281     }
1282   }
1283
1284   void UniformMatrix3fv(
1285       GLint location, GLsizei count, GLboolean transpose, uint32 value_shm_id,
1286       uint32 value_shm_offset) {
1287     gles2::cmds::UniformMatrix3fv* c =
1288         GetCmdSpace<gles2::cmds::UniformMatrix3fv>();
1289     if (c) {
1290       c->Init(location, count, transpose, value_shm_id, value_shm_offset);
1291     }
1292   }
1293
1294   void UniformMatrix3fvImmediate(
1295       GLint location, GLsizei count, GLboolean transpose,
1296       const GLfloat* value) {
1297     const uint32 size =
1298         gles2::cmds::UniformMatrix3fvImmediate::ComputeSize(count);
1299     gles2::cmds::UniformMatrix3fvImmediate* c =
1300         GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix3fvImmediate>(
1301             size);
1302     if (c) {
1303       c->Init(location, count, transpose, value);
1304     }
1305   }
1306
1307   void UniformMatrix4fv(
1308       GLint location, GLsizei count, GLboolean transpose, uint32 value_shm_id,
1309       uint32 value_shm_offset) {
1310     gles2::cmds::UniformMatrix4fv* c =
1311         GetCmdSpace<gles2::cmds::UniformMatrix4fv>();
1312     if (c) {
1313       c->Init(location, count, transpose, value_shm_id, value_shm_offset);
1314     }
1315   }
1316
1317   void UniformMatrix4fvImmediate(
1318       GLint location, GLsizei count, GLboolean transpose,
1319       const GLfloat* value) {
1320     const uint32 size =
1321         gles2::cmds::UniformMatrix4fvImmediate::ComputeSize(count);
1322     gles2::cmds::UniformMatrix4fvImmediate* c =
1323         GetImmediateCmdSpaceTotalSize<gles2::cmds::UniformMatrix4fvImmediate>(
1324             size);
1325     if (c) {
1326       c->Init(location, count, transpose, value);
1327     }
1328   }
1329
1330   void UseProgram(GLuint program) {
1331     gles2::cmds::UseProgram* c = GetCmdSpace<gles2::cmds::UseProgram>();
1332     if (c) {
1333       c->Init(program);
1334     }
1335   }
1336
1337   void ValidateProgram(GLuint program) {
1338     gles2::cmds::ValidateProgram* c =
1339         GetCmdSpace<gles2::cmds::ValidateProgram>();
1340     if (c) {
1341       c->Init(program);
1342     }
1343   }
1344
1345   void VertexAttrib1f(GLuint indx, GLfloat x) {
1346     gles2::cmds::VertexAttrib1f* c =
1347         GetCmdSpace<gles2::cmds::VertexAttrib1f>();
1348     if (c) {
1349       c->Init(indx, x);
1350     }
1351   }
1352
1353   void VertexAttrib1fv(
1354       GLuint indx, uint32 values_shm_id, uint32 values_shm_offset) {
1355     gles2::cmds::VertexAttrib1fv* c =
1356         GetCmdSpace<gles2::cmds::VertexAttrib1fv>();
1357     if (c) {
1358       c->Init(indx, values_shm_id, values_shm_offset);
1359     }
1360   }
1361
1362   void VertexAttrib1fvImmediate(GLuint indx, const GLfloat* values) {
1363     const uint32 size = gles2::cmds::VertexAttrib1fvImmediate::ComputeSize();
1364     gles2::cmds::VertexAttrib1fvImmediate* c =
1365         GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib1fvImmediate>(
1366             size);
1367     if (c) {
1368       c->Init(indx, values);
1369     }
1370   }
1371
1372   void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
1373     gles2::cmds::VertexAttrib2f* c =
1374         GetCmdSpace<gles2::cmds::VertexAttrib2f>();
1375     if (c) {
1376       c->Init(indx, x, y);
1377     }
1378   }
1379
1380   void VertexAttrib2fv(
1381       GLuint indx, uint32 values_shm_id, uint32 values_shm_offset) {
1382     gles2::cmds::VertexAttrib2fv* c =
1383         GetCmdSpace<gles2::cmds::VertexAttrib2fv>();
1384     if (c) {
1385       c->Init(indx, values_shm_id, values_shm_offset);
1386     }
1387   }
1388
1389   void VertexAttrib2fvImmediate(GLuint indx, const GLfloat* values) {
1390     const uint32 size = gles2::cmds::VertexAttrib2fvImmediate::ComputeSize();
1391     gles2::cmds::VertexAttrib2fvImmediate* c =
1392         GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib2fvImmediate>(
1393             size);
1394     if (c) {
1395       c->Init(indx, values);
1396     }
1397   }
1398
1399   void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
1400     gles2::cmds::VertexAttrib3f* c =
1401         GetCmdSpace<gles2::cmds::VertexAttrib3f>();
1402     if (c) {
1403       c->Init(indx, x, y, z);
1404     }
1405   }
1406
1407   void VertexAttrib3fv(
1408       GLuint indx, uint32 values_shm_id, uint32 values_shm_offset) {
1409     gles2::cmds::VertexAttrib3fv* c =
1410         GetCmdSpace<gles2::cmds::VertexAttrib3fv>();
1411     if (c) {
1412       c->Init(indx, values_shm_id, values_shm_offset);
1413     }
1414   }
1415
1416   void VertexAttrib3fvImmediate(GLuint indx, const GLfloat* values) {
1417     const uint32 size = gles2::cmds::VertexAttrib3fvImmediate::ComputeSize();
1418     gles2::cmds::VertexAttrib3fvImmediate* c =
1419         GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib3fvImmediate>(
1420             size);
1421     if (c) {
1422       c->Init(indx, values);
1423     }
1424   }
1425
1426   void VertexAttrib4f(
1427       GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
1428     gles2::cmds::VertexAttrib4f* c =
1429         GetCmdSpace<gles2::cmds::VertexAttrib4f>();
1430     if (c) {
1431       c->Init(indx, x, y, z, w);
1432     }
1433   }
1434
1435   void VertexAttrib4fv(
1436       GLuint indx, uint32 values_shm_id, uint32 values_shm_offset) {
1437     gles2::cmds::VertexAttrib4fv* c =
1438         GetCmdSpace<gles2::cmds::VertexAttrib4fv>();
1439     if (c) {
1440       c->Init(indx, values_shm_id, values_shm_offset);
1441     }
1442   }
1443
1444   void VertexAttrib4fvImmediate(GLuint indx, const GLfloat* values) {
1445     const uint32 size = gles2::cmds::VertexAttrib4fvImmediate::ComputeSize();
1446     gles2::cmds::VertexAttrib4fvImmediate* c =
1447         GetImmediateCmdSpaceTotalSize<gles2::cmds::VertexAttrib4fvImmediate>(
1448             size);
1449     if (c) {
1450       c->Init(indx, values);
1451     }
1452   }
1453
1454   void VertexAttribPointer(
1455       GLuint indx, GLint size, GLenum type, GLboolean normalized,
1456       GLsizei stride, GLuint offset) {
1457     gles2::cmds::VertexAttribPointer* c =
1458         GetCmdSpace<gles2::cmds::VertexAttribPointer>();
1459     if (c) {
1460       c->Init(indx, size, type, normalized, stride, offset);
1461     }
1462   }
1463
1464   void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) {
1465     gles2::cmds::Viewport* c = GetCmdSpace<gles2::cmds::Viewport>();
1466     if (c) {
1467       c->Init(x, y, width, height);
1468     }
1469   }
1470
1471   void BlitFramebufferEXT(
1472       GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0,
1473       GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
1474     gles2::cmds::BlitFramebufferEXT* c =
1475         GetCmdSpace<gles2::cmds::BlitFramebufferEXT>();
1476     if (c) {
1477       c->Init(
1478           srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask,
1479           filter);
1480     }
1481   }
1482
1483   void RenderbufferStorageMultisampleEXT(
1484       GLenum target, GLsizei samples, GLenum internalformat, GLsizei width,
1485       GLsizei height) {
1486     gles2::cmds::RenderbufferStorageMultisampleEXT* c =
1487         GetCmdSpace<gles2::cmds::RenderbufferStorageMultisampleEXT>();
1488     if (c) {
1489       c->Init(target, samples, internalformat, width, height);
1490     }
1491   }
1492
1493   void FramebufferTexture2DMultisampleEXT(
1494       GLenum target, GLenum attachment, GLenum textarget, GLuint texture,
1495       GLint level, GLsizei samples) {
1496     gles2::cmds::FramebufferTexture2DMultisampleEXT* c =
1497         GetCmdSpace<gles2::cmds::FramebufferTexture2DMultisampleEXT>();
1498     if (c) {
1499       c->Init(target, attachment, textarget, texture, level, samples);
1500     }
1501   }
1502
1503   void TexStorage2DEXT(
1504       GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width,
1505       GLsizei height) {
1506     gles2::cmds::TexStorage2DEXT* c =
1507         GetCmdSpace<gles2::cmds::TexStorage2DEXT>();
1508     if (c) {
1509       c->Init(target, levels, internalFormat, width, height);
1510     }
1511   }
1512
1513   void GenQueriesEXT(
1514       GLsizei n, uint32 queries_shm_id, uint32 queries_shm_offset) {
1515     gles2::cmds::GenQueriesEXT* c = GetCmdSpace<gles2::cmds::GenQueriesEXT>();
1516     if (c) {
1517       c->Init(n, queries_shm_id, queries_shm_offset);
1518     }
1519   }
1520
1521   void GenQueriesEXTImmediate(GLsizei n, GLuint* queries) {
1522     const uint32 size = gles2::cmds::GenQueriesEXTImmediate::ComputeSize(n);
1523     gles2::cmds::GenQueriesEXTImmediate* c =
1524         GetImmediateCmdSpaceTotalSize<gles2::cmds::GenQueriesEXTImmediate>(
1525             size);
1526     if (c) {
1527       c->Init(n, queries);
1528     }
1529   }
1530
1531   void DeleteQueriesEXT(
1532       GLsizei n, uint32 queries_shm_id, uint32 queries_shm_offset) {
1533     gles2::cmds::DeleteQueriesEXT* c =
1534         GetCmdSpace<gles2::cmds::DeleteQueriesEXT>();
1535     if (c) {
1536       c->Init(n, queries_shm_id, queries_shm_offset);
1537     }
1538   }
1539
1540   void DeleteQueriesEXTImmediate(GLsizei n, const GLuint* queries) {
1541     const uint32 size = gles2::cmds::DeleteQueriesEXTImmediate::ComputeSize(n);
1542     gles2::cmds::DeleteQueriesEXTImmediate* c =
1543         GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteQueriesEXTImmediate>(
1544             size);
1545     if (c) {
1546       c->Init(n, queries);
1547     }
1548   }
1549
1550   void BeginQueryEXT(
1551       GLenum target, GLuint id, uint32 sync_data_shm_id,
1552       uint32 sync_data_shm_offset) {
1553     gles2::cmds::BeginQueryEXT* c = GetCmdSpace<gles2::cmds::BeginQueryEXT>();
1554     if (c) {
1555       c->Init(target, id, sync_data_shm_id, sync_data_shm_offset);
1556     }
1557   }
1558
1559   void EndQueryEXT(GLenum target, GLuint submit_count) {
1560     gles2::cmds::EndQueryEXT* c = GetCmdSpace<gles2::cmds::EndQueryEXT>();
1561     if (c) {
1562       c->Init(target, submit_count);
1563     }
1564   }
1565
1566   void InsertEventMarkerEXT(GLuint bucket_id) {
1567     gles2::cmds::InsertEventMarkerEXT* c =
1568         GetCmdSpace<gles2::cmds::InsertEventMarkerEXT>();
1569     if (c) {
1570       c->Init(bucket_id);
1571     }
1572   }
1573
1574   void PushGroupMarkerEXT(GLuint bucket_id) {
1575     gles2::cmds::PushGroupMarkerEXT* c =
1576         GetCmdSpace<gles2::cmds::PushGroupMarkerEXT>();
1577     if (c) {
1578       c->Init(bucket_id);
1579     }
1580   }
1581
1582   void PopGroupMarkerEXT() {
1583     gles2::cmds::PopGroupMarkerEXT* c =
1584         GetCmdSpace<gles2::cmds::PopGroupMarkerEXT>();
1585     if (c) {
1586       c->Init();
1587     }
1588   }
1589
1590   void GenVertexArraysOES(
1591       GLsizei n, uint32 arrays_shm_id, uint32 arrays_shm_offset) {
1592     gles2::cmds::GenVertexArraysOES* c =
1593         GetCmdSpace<gles2::cmds::GenVertexArraysOES>();
1594     if (c) {
1595       c->Init(n, arrays_shm_id, arrays_shm_offset);
1596     }
1597   }
1598
1599   void GenVertexArraysOESImmediate(GLsizei n, GLuint* arrays) {
1600     const uint32 size =
1601         gles2::cmds::GenVertexArraysOESImmediate::ComputeSize(n);
1602     gles2::cmds::GenVertexArraysOESImmediate* c =
1603         GetImmediateCmdSpaceTotalSize<gles2::cmds::GenVertexArraysOESImmediate>(
1604             size);
1605     if (c) {
1606       c->Init(n, arrays);
1607     }
1608   }
1609
1610   void DeleteVertexArraysOES(
1611       GLsizei n, uint32 arrays_shm_id, uint32 arrays_shm_offset) {
1612     gles2::cmds::DeleteVertexArraysOES* c =
1613         GetCmdSpace<gles2::cmds::DeleteVertexArraysOES>();
1614     if (c) {
1615       c->Init(n, arrays_shm_id, arrays_shm_offset);
1616     }
1617   }
1618
1619   void DeleteVertexArraysOESImmediate(GLsizei n, const GLuint* arrays) {
1620     const uint32 size =
1621         gles2::cmds::DeleteVertexArraysOESImmediate::ComputeSize(n);
1622     gles2::cmds::DeleteVertexArraysOESImmediate* c =
1623         GetImmediateCmdSpaceTotalSize<gles2::cmds::DeleteVertexArraysOESImmediate>(size);  // NOLINT
1624     if (c) {
1625       c->Init(n, arrays);
1626     }
1627   }
1628
1629   void IsVertexArrayOES(
1630       GLuint array, uint32 result_shm_id, uint32 result_shm_offset) {
1631     gles2::cmds::IsVertexArrayOES* c =
1632         GetCmdSpace<gles2::cmds::IsVertexArrayOES>();
1633     if (c) {
1634       c->Init(array, result_shm_id, result_shm_offset);
1635     }
1636   }
1637
1638   void BindVertexArrayOES(GLuint array) {
1639     gles2::cmds::BindVertexArrayOES* c =
1640         GetCmdSpace<gles2::cmds::BindVertexArrayOES>();
1641     if (c) {
1642       c->Init(array);
1643     }
1644   }
1645
1646   void SwapBuffers() {
1647     gles2::cmds::SwapBuffers* c = GetCmdSpace<gles2::cmds::SwapBuffers>();
1648     if (c) {
1649       c->Init();
1650     }
1651   }
1652
1653   void GetMaxValueInBufferCHROMIUM(
1654       GLuint buffer_id, GLsizei count, GLenum type, GLuint offset,
1655       uint32 result_shm_id, uint32 result_shm_offset) {
1656     gles2::cmds::GetMaxValueInBufferCHROMIUM* c =
1657         GetCmdSpace<gles2::cmds::GetMaxValueInBufferCHROMIUM>();
1658     if (c) {
1659       c->Init(
1660           buffer_id, count, type, offset, result_shm_id, result_shm_offset);
1661     }
1662   }
1663
1664   void GenSharedIdsCHROMIUM(
1665       GLuint namespace_id, GLuint id_offset, GLsizei n, uint32 ids_shm_id,
1666       uint32 ids_shm_offset) {
1667     gles2::cmds::GenSharedIdsCHROMIUM* c =
1668         GetCmdSpace<gles2::cmds::GenSharedIdsCHROMIUM>();
1669     if (c) {
1670       c->Init(namespace_id, id_offset, n, ids_shm_id, ids_shm_offset);
1671     }
1672   }
1673
1674   void DeleteSharedIdsCHROMIUM(
1675       GLuint namespace_id, GLsizei n, uint32 ids_shm_id,
1676       uint32 ids_shm_offset) {
1677     gles2::cmds::DeleteSharedIdsCHROMIUM* c =
1678         GetCmdSpace<gles2::cmds::DeleteSharedIdsCHROMIUM>();
1679     if (c) {
1680       c->Init(namespace_id, n, ids_shm_id, ids_shm_offset);
1681     }
1682   }
1683
1684   void RegisterSharedIdsCHROMIUM(
1685       GLuint namespace_id, GLsizei n, uint32 ids_shm_id,
1686       uint32 ids_shm_offset) {
1687     gles2::cmds::RegisterSharedIdsCHROMIUM* c =
1688         GetCmdSpace<gles2::cmds::RegisterSharedIdsCHROMIUM>();
1689     if (c) {
1690       c->Init(namespace_id, n, ids_shm_id, ids_shm_offset);
1691     }
1692   }
1693
1694   void EnableFeatureCHROMIUM(
1695       GLuint bucket_id, uint32 result_shm_id, uint32 result_shm_offset) {
1696     gles2::cmds::EnableFeatureCHROMIUM* c =
1697         GetCmdSpace<gles2::cmds::EnableFeatureCHROMIUM>();
1698     if (c) {
1699       c->Init(bucket_id, result_shm_id, result_shm_offset);
1700     }
1701   }
1702
1703   void ResizeCHROMIUM(GLuint width, GLuint height, GLfloat scale_factor) {
1704     gles2::cmds::ResizeCHROMIUM* c =
1705         GetCmdSpace<gles2::cmds::ResizeCHROMIUM>();
1706     if (c) {
1707       c->Init(width, height, scale_factor);
1708     }
1709   }
1710
1711   void GetRequestableExtensionsCHROMIUM(uint32 bucket_id) {
1712     gles2::cmds::GetRequestableExtensionsCHROMIUM* c =
1713         GetCmdSpace<gles2::cmds::GetRequestableExtensionsCHROMIUM>();
1714     if (c) {
1715       c->Init(bucket_id);
1716     }
1717   }
1718
1719   void RequestExtensionCHROMIUM(uint32 bucket_id) {
1720     gles2::cmds::RequestExtensionCHROMIUM* c =
1721         GetCmdSpace<gles2::cmds::RequestExtensionCHROMIUM>();
1722     if (c) {
1723       c->Init(bucket_id);
1724     }
1725   }
1726
1727   void GetMultipleIntegervCHROMIUM(
1728       uint32 pnames_shm_id, uint32 pnames_shm_offset, GLuint count,
1729       uint32 results_shm_id, uint32 results_shm_offset, GLsizeiptr size) {
1730     gles2::cmds::GetMultipleIntegervCHROMIUM* c =
1731         GetCmdSpace<gles2::cmds::GetMultipleIntegervCHROMIUM>();
1732     if (c) {
1733       c->Init(
1734           pnames_shm_id, pnames_shm_offset, count, results_shm_id,
1735           results_shm_offset, size);
1736     }
1737   }
1738
1739   void GetProgramInfoCHROMIUM(GLuint program, uint32 bucket_id) {
1740     gles2::cmds::GetProgramInfoCHROMIUM* c =
1741         GetCmdSpace<gles2::cmds::GetProgramInfoCHROMIUM>();
1742     if (c) {
1743       c->Init(program, bucket_id);
1744     }
1745   }
1746
1747   void CreateStreamTextureCHROMIUM(
1748       GLuint client_id, uint32 result_shm_id, uint32 result_shm_offset) {
1749     gles2::cmds::CreateStreamTextureCHROMIUM* c =
1750         GetCmdSpace<gles2::cmds::CreateStreamTextureCHROMIUM>();
1751     if (c) {
1752       c->Init(client_id, result_shm_id, result_shm_offset);
1753     }
1754   }
1755
1756   void DestroyStreamTextureCHROMIUM(GLuint texture) {
1757     gles2::cmds::DestroyStreamTextureCHROMIUM* c =
1758         GetCmdSpace<gles2::cmds::DestroyStreamTextureCHROMIUM>();
1759     if (c) {
1760       c->Init(texture);
1761     }
1762   }
1763
1764   void GetTranslatedShaderSourceANGLE(GLuint shader, uint32 bucket_id) {
1765     gles2::cmds::GetTranslatedShaderSourceANGLE* c =
1766         GetCmdSpace<gles2::cmds::GetTranslatedShaderSourceANGLE>();
1767     if (c) {
1768       c->Init(shader, bucket_id);
1769     }
1770   }
1771
1772   void PostSubBufferCHROMIUM(GLint x, GLint y, GLint width, GLint height) {
1773     gles2::cmds::PostSubBufferCHROMIUM* c =
1774         GetCmdSpace<gles2::cmds::PostSubBufferCHROMIUM>();
1775     if (c) {
1776       c->Init(x, y, width, height);
1777     }
1778   }
1779
1780   void TexImageIOSurface2DCHROMIUM(
1781       GLenum target, GLsizei width, GLsizei height, GLuint ioSurfaceId,
1782       GLuint plane) {
1783     gles2::cmds::TexImageIOSurface2DCHROMIUM* c =
1784         GetCmdSpace<gles2::cmds::TexImageIOSurface2DCHROMIUM>();
1785     if (c) {
1786       c->Init(target, width, height, ioSurfaceId, plane);
1787     }
1788   }
1789
1790   void CopyTextureCHROMIUM(
1791       GLenum target, GLenum source_id, GLenum dest_id, GLint level,
1792       GLint internalformat, GLenum dest_type) {
1793     gles2::cmds::CopyTextureCHROMIUM* c =
1794         GetCmdSpace<gles2::cmds::CopyTextureCHROMIUM>();
1795     if (c) {
1796       c->Init(target, source_id, dest_id, level, internalformat, dest_type);
1797     }
1798   }
1799
1800   void DrawArraysInstancedANGLE(
1801       GLenum mode, GLint first, GLsizei count, GLsizei primcount) {
1802     gles2::cmds::DrawArraysInstancedANGLE* c =
1803         GetCmdSpace<gles2::cmds::DrawArraysInstancedANGLE>();
1804     if (c) {
1805       c->Init(mode, first, count, primcount);
1806     }
1807   }
1808
1809   void DrawElementsInstancedANGLE(
1810       GLenum mode, GLsizei count, GLenum type, GLuint index_offset,
1811       GLsizei primcount) {
1812     gles2::cmds::DrawElementsInstancedANGLE* c =
1813         GetCmdSpace<gles2::cmds::DrawElementsInstancedANGLE>();
1814     if (c) {
1815       c->Init(mode, count, type, index_offset, primcount);
1816     }
1817   }
1818
1819   void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) {
1820     gles2::cmds::VertexAttribDivisorANGLE* c =
1821         GetCmdSpace<gles2::cmds::VertexAttribDivisorANGLE>();
1822     if (c) {
1823       c->Init(index, divisor);
1824     }
1825   }
1826
1827   void ProduceTextureCHROMIUM(
1828       GLenum target, uint32 mailbox_shm_id, uint32 mailbox_shm_offset) {
1829     gles2::cmds::ProduceTextureCHROMIUM* c =
1830         GetCmdSpace<gles2::cmds::ProduceTextureCHROMIUM>();
1831     if (c) {
1832       c->Init(target, mailbox_shm_id, mailbox_shm_offset);
1833     }
1834   }
1835
1836   void ProduceTextureCHROMIUMImmediate(GLenum target, const GLbyte* mailbox) {
1837     const uint32 size =
1838         gles2::cmds::ProduceTextureCHROMIUMImmediate::ComputeSize();
1839     gles2::cmds::ProduceTextureCHROMIUMImmediate* c =
1840         GetImmediateCmdSpaceTotalSize<gles2::cmds::ProduceTextureCHROMIUMImmediate>(size);  // NOLINT
1841     if (c) {
1842       c->Init(target, mailbox);
1843     }
1844   }
1845
1846   void ConsumeTextureCHROMIUM(
1847       GLenum target, uint32 mailbox_shm_id, uint32 mailbox_shm_offset) {
1848     gles2::cmds::ConsumeTextureCHROMIUM* c =
1849         GetCmdSpace<gles2::cmds::ConsumeTextureCHROMIUM>();
1850     if (c) {
1851       c->Init(target, mailbox_shm_id, mailbox_shm_offset);
1852     }
1853   }
1854
1855   void ConsumeTextureCHROMIUMImmediate(GLenum target, const GLbyte* mailbox) {
1856     const uint32 size =
1857         gles2::cmds::ConsumeTextureCHROMIUMImmediate::ComputeSize();
1858     gles2::cmds::ConsumeTextureCHROMIUMImmediate* c =
1859         GetImmediateCmdSpaceTotalSize<gles2::cmds::ConsumeTextureCHROMIUMImmediate>(size);  // NOLINT
1860     if (c) {
1861       c->Init(target, mailbox);
1862     }
1863   }
1864
1865   void BindUniformLocationCHROMIUM(
1866       GLuint program, GLint location, uint32 name_shm_id,
1867       uint32 name_shm_offset, uint32 data_size) {
1868     gles2::cmds::BindUniformLocationCHROMIUM* c =
1869         GetCmdSpace<gles2::cmds::BindUniformLocationCHROMIUM>();
1870     if (c) {
1871       c->Init(program, location, name_shm_id, name_shm_offset, data_size);
1872     }
1873   }
1874
1875   void BindUniformLocationCHROMIUMBucket(
1876       GLuint program, GLint location, uint32 name_bucket_id) {
1877     gles2::cmds::BindUniformLocationCHROMIUMBucket* c =
1878         GetCmdSpace<gles2::cmds::BindUniformLocationCHROMIUMBucket>();
1879     if (c) {
1880       c->Init(program, location, name_bucket_id);
1881     }
1882   }
1883
1884   void BindTexImage2DCHROMIUM(GLenum target, GLint imageId) {
1885     gles2::cmds::BindTexImage2DCHROMIUM* c =
1886         GetCmdSpace<gles2::cmds::BindTexImage2DCHROMIUM>();
1887     if (c) {
1888       c->Init(target, imageId);
1889     }
1890   }
1891
1892   void ReleaseTexImage2DCHROMIUM(GLenum target, GLint imageId) {
1893     gles2::cmds::ReleaseTexImage2DCHROMIUM* c =
1894         GetCmdSpace<gles2::cmds::ReleaseTexImage2DCHROMIUM>();
1895     if (c) {
1896       c->Init(target, imageId);
1897     }
1898   }
1899
1900   void TraceBeginCHROMIUM(GLuint bucket_id) {
1901     gles2::cmds::TraceBeginCHROMIUM* c =
1902         GetCmdSpace<gles2::cmds::TraceBeginCHROMIUM>();
1903     if (c) {
1904       c->Init(bucket_id);
1905     }
1906   }
1907
1908   void TraceEndCHROMIUM() {
1909     gles2::cmds::TraceEndCHROMIUM* c =
1910         GetCmdSpace<gles2::cmds::TraceEndCHROMIUM>();
1911     if (c) {
1912       c->Init();
1913     }
1914   }
1915
1916   void AsyncTexSubImage2DCHROMIUM(
1917       GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
1918       GLsizei height, GLenum format, GLenum type, uint32 data_shm_id,
1919       uint32 data_shm_offset) {
1920     gles2::cmds::AsyncTexSubImage2DCHROMIUM* c =
1921         GetCmdSpace<gles2::cmds::AsyncTexSubImage2DCHROMIUM>();
1922     if (c) {
1923       c->Init(
1924           target, level, xoffset, yoffset, width, height, format, type,
1925           data_shm_id, data_shm_offset);
1926     }
1927   }
1928
1929   void AsyncTexImage2DCHROMIUM(
1930       GLenum target, GLint level, GLint internalformat, GLsizei width,
1931       GLsizei height, GLint border, GLenum format, GLenum type,
1932       uint32 pixels_shm_id, uint32 pixels_shm_offset) {
1933     gles2::cmds::AsyncTexImage2DCHROMIUM* c =
1934         GetCmdSpace<gles2::cmds::AsyncTexImage2DCHROMIUM>();
1935     if (c) {
1936       c->Init(
1937           target, level, internalformat, width, height, border, format, type,
1938           pixels_shm_id, pixels_shm_offset);
1939     }
1940   }
1941
1942   void WaitAsyncTexImage2DCHROMIUM(GLenum target) {
1943     gles2::cmds::WaitAsyncTexImage2DCHROMIUM* c =
1944         GetCmdSpace<gles2::cmds::WaitAsyncTexImage2DCHROMIUM>();
1945     if (c) {
1946       c->Init(target);
1947     }
1948   }
1949
1950   void DiscardFramebufferEXT(
1951       GLenum target, GLsizei count, uint32 attachments_shm_id,
1952       uint32 attachments_shm_offset) {
1953     gles2::cmds::DiscardFramebufferEXT* c =
1954         GetCmdSpace<gles2::cmds::DiscardFramebufferEXT>();
1955     if (c) {
1956       c->Init(target, count, attachments_shm_id, attachments_shm_offset);
1957     }
1958   }
1959
1960   void DiscardFramebufferEXTImmediate(
1961       GLenum target, GLsizei count, const GLenum* attachments) {
1962     const uint32 size =
1963         gles2::cmds::DiscardFramebufferEXTImmediate::ComputeSize(count);
1964     gles2::cmds::DiscardFramebufferEXTImmediate* c =
1965         GetImmediateCmdSpaceTotalSize<gles2::cmds::DiscardFramebufferEXTImmediate>(size);  // NOLINT
1966     if (c) {
1967       c->Init(target, count, attachments);
1968     }
1969   }
1970
1971   void LoseContextCHROMIUM(GLenum current, GLenum other) {
1972     gles2::cmds::LoseContextCHROMIUM* c =
1973         GetCmdSpace<gles2::cmds::LoseContextCHROMIUM>();
1974     if (c) {
1975       c->Init(current, other);
1976     }
1977   }
1978
1979   void WaitSyncPointCHROMIUM(GLuint sync_point) {
1980     gles2::cmds::WaitSyncPointCHROMIUM* c =
1981         GetCmdSpace<gles2::cmds::WaitSyncPointCHROMIUM>();
1982     if (c) {
1983       c->Init(sync_point);
1984     }
1985   }
1986
1987   void DrawBuffersEXT(
1988       GLsizei count, uint32 bufs_shm_id, uint32 bufs_shm_offset) {
1989     gles2::cmds::DrawBuffersEXT* c =
1990         GetCmdSpace<gles2::cmds::DrawBuffersEXT>();
1991     if (c) {
1992       c->Init(count, bufs_shm_id, bufs_shm_offset);
1993     }
1994   }
1995
1996   void DrawBuffersEXTImmediate(GLsizei count, const GLenum* bufs) {
1997     const uint32 size =
1998         gles2::cmds::DrawBuffersEXTImmediate::ComputeSize(count);
1999     gles2::cmds::DrawBuffersEXTImmediate* c =
2000         GetImmediateCmdSpaceTotalSize<gles2::cmds::DrawBuffersEXTImmediate>(
2001             size);
2002     if (c) {
2003       c->Init(count, bufs);
2004     }
2005   }
2006
2007 #endif  // GPU_COMMAND_BUFFER_CLIENT_GLES2_CMD_HELPER_AUTOGEN_H_
2008