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