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

Side by Side Diff: webkit/plugins/ppapi/ppb_opengles_impl.cc

Issue 6062003: Added ppapi::Context3D interface. The API has already been reviewed. I am add... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/ppb_opengles_impl.h ('k') | webkit/plugins/ppapi/resource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is auto-generated. DO NOT EDIT! 5 // This file is auto-generated. DO NOT EDIT!
6 6
7 #include "webkit/plugins/ppapi/ppb_graphics_3d_impl.h" 7 #include "webkit/plugins/ppapi/ppb_opengles_impl.h"
8 8
9 #include "gpu/command_buffer/client/gles2_implementation.h" 9 #include "gpu/command_buffer/client/gles2_implementation.h"
10 #include "ppapi/c/dev/ppb_opengles_dev.h" 10 #include "ppapi/c/dev/ppb_opengles_dev.h"
11 #include "webkit/plugins/ppapi/ppb_context_3d_impl.h"
11 12
12 namespace webkit { 13 namespace webkit {
13 namespace ppapi { 14 namespace ppapi {
14 15
15 namespace { 16 namespace {
16 17
17 void ActiveTexture(PP_Resource context, GLenum texture) { 18 void ActiveTexture(PP_Resource context_id, GLenum texture) {
18 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 19 scoped_refptr<PPB_Context3D_Impl> context =
19 Resource::GetAs<PPB_Graphics3D_Impl>(context); 20 Resource::GetAs<PPB_Context3D_Impl>(context_id);
20 graphics_3d->impl()->ActiveTexture(texture); 21 context->gles2_impl()->ActiveTexture(texture);
21 } 22 }
22 23
23 void AttachShader(PP_Resource context, GLuint program, GLuint shader) { 24 void AttachShader(PP_Resource context_id, GLuint program, GLuint shader) {
24 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 25 scoped_refptr<PPB_Context3D_Impl> context =
25 Resource::GetAs<PPB_Graphics3D_Impl>(context); 26 Resource::GetAs<PPB_Context3D_Impl>(context_id);
26 graphics_3d->impl()->AttachShader(program, shader); 27 context->gles2_impl()->AttachShader(program, shader);
27 } 28 }
28 29
29 void BindAttribLocation( 30 void BindAttribLocation(
30 PP_Resource context, GLuint program, GLuint index, const char* name) { 31 PP_Resource context_id, GLuint program, GLuint index, const char* name) {
31 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 32 scoped_refptr<PPB_Context3D_Impl> context =
32 Resource::GetAs<PPB_Graphics3D_Impl>(context); 33 Resource::GetAs<PPB_Context3D_Impl>(context_id);
33 graphics_3d->impl()->BindAttribLocation(program, index, name); 34 context->gles2_impl()->BindAttribLocation(program, index, name);
34 } 35 }
35 36
36 void BindBuffer(PP_Resource context, GLenum target, GLuint buffer) { 37 void BindBuffer(PP_Resource context_id, GLenum target, GLuint buffer) {
37 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 38 scoped_refptr<PPB_Context3D_Impl> context =
38 Resource::GetAs<PPB_Graphics3D_Impl>(context); 39 Resource::GetAs<PPB_Context3D_Impl>(context_id);
39 graphics_3d->impl()->BindBuffer(target, buffer); 40 context->gles2_impl()->BindBuffer(target, buffer);
40 } 41 }
41 42
42 void BindFramebuffer(PP_Resource context, GLenum target, GLuint framebuffer) { 43 void BindFramebuffer(
43 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 44 PP_Resource context_id, GLenum target, GLuint framebuffer) {
44 Resource::GetAs<PPB_Graphics3D_Impl>(context); 45 scoped_refptr<PPB_Context3D_Impl> context =
45 graphics_3d->impl()->BindFramebuffer(target, framebuffer); 46 Resource::GetAs<PPB_Context3D_Impl>(context_id);
47 context->gles2_impl()->BindFramebuffer(target, framebuffer);
46 } 48 }
47 49
48 void BindRenderbuffer( 50 void BindRenderbuffer(
49 PP_Resource context, GLenum target, GLuint renderbuffer) { 51 PP_Resource context_id, GLenum target, GLuint renderbuffer) {
50 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 52 scoped_refptr<PPB_Context3D_Impl> context =
51 Resource::GetAs<PPB_Graphics3D_Impl>(context); 53 Resource::GetAs<PPB_Context3D_Impl>(context_id);
52 graphics_3d->impl()->BindRenderbuffer(target, renderbuffer); 54 context->gles2_impl()->BindRenderbuffer(target, renderbuffer);
53 } 55 }
54 56
55 void BindTexture(PP_Resource context, GLenum target, GLuint texture) { 57 void BindTexture(PP_Resource context_id, GLenum target, GLuint texture) {
56 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 58 scoped_refptr<PPB_Context3D_Impl> context =
57 Resource::GetAs<PPB_Graphics3D_Impl>(context); 59 Resource::GetAs<PPB_Context3D_Impl>(context_id);
58 graphics_3d->impl()->BindTexture(target, texture); 60 context->gles2_impl()->BindTexture(target, texture);
59 } 61 }
60 62
61 void BlendColor( 63 void BlendColor(
62 PP_Resource context, GLclampf red, GLclampf green, GLclampf blue, 64 PP_Resource context_id, GLclampf red, GLclampf green, GLclampf blue,
63 GLclampf alpha) { 65 GLclampf alpha) {
64 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 66 scoped_refptr<PPB_Context3D_Impl> context =
65 Resource::GetAs<PPB_Graphics3D_Impl>(context); 67 Resource::GetAs<PPB_Context3D_Impl>(context_id);
66 graphics_3d->impl()->BlendColor(red, green, blue, alpha); 68 context->gles2_impl()->BlendColor(red, green, blue, alpha);
67 } 69 }
68 70
69 void BlendEquation(PP_Resource context, GLenum mode) { 71 void BlendEquation(PP_Resource context_id, GLenum mode) {
70 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 72 scoped_refptr<PPB_Context3D_Impl> context =
71 Resource::GetAs<PPB_Graphics3D_Impl>(context); 73 Resource::GetAs<PPB_Context3D_Impl>(context_id);
72 graphics_3d->impl()->BlendEquation(mode); 74 context->gles2_impl()->BlendEquation(mode);
73 } 75 }
74 76
75 void BlendEquationSeparate( 77 void BlendEquationSeparate(
76 PP_Resource context, GLenum modeRGB, GLenum modeAlpha) { 78 PP_Resource context_id, GLenum modeRGB, GLenum modeAlpha) {
77 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 79 scoped_refptr<PPB_Context3D_Impl> context =
78 Resource::GetAs<PPB_Graphics3D_Impl>(context); 80 Resource::GetAs<PPB_Context3D_Impl>(context_id);
79 graphics_3d->impl()->BlendEquationSeparate(modeRGB, modeAlpha); 81 context->gles2_impl()->BlendEquationSeparate(modeRGB, modeAlpha);
80 } 82 }
81 83
82 void BlendFunc(PP_Resource context, GLenum sfactor, GLenum dfactor) { 84 void BlendFunc(PP_Resource context_id, GLenum sfactor, GLenum dfactor) {
83 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 85 scoped_refptr<PPB_Context3D_Impl> context =
84 Resource::GetAs<PPB_Graphics3D_Impl>(context); 86 Resource::GetAs<PPB_Context3D_Impl>(context_id);
85 graphics_3d->impl()->BlendFunc(sfactor, dfactor); 87 context->gles2_impl()->BlendFunc(sfactor, dfactor);
86 } 88 }
87 89
88 void BlendFuncSeparate( 90 void BlendFuncSeparate(
89 PP_Resource context, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, 91 PP_Resource context_id, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha,
90 GLenum dstAlpha) { 92 GLenum dstAlpha) {
91 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 93 scoped_refptr<PPB_Context3D_Impl> context =
92 Resource::GetAs<PPB_Graphics3D_Impl>(context); 94 Resource::GetAs<PPB_Context3D_Impl>(context_id);
93 graphics_3d->impl()->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); 95 context->gles2_impl()->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
94 } 96 }
95 97
96 void BufferData( 98 void BufferData(
97 PP_Resource context, GLenum target, GLsizeiptr size, const void* data, 99 PP_Resource context_id, GLenum target, GLsizeiptr size, const void* data,
98 GLenum usage) { 100 GLenum usage) {
99 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 101 scoped_refptr<PPB_Context3D_Impl> context =
100 Resource::GetAs<PPB_Graphics3D_Impl>(context); 102 Resource::GetAs<PPB_Context3D_Impl>(context_id);
101 graphics_3d->impl()->BufferData(target, size, data, usage); 103 context->gles2_impl()->BufferData(target, size, data, usage);
102 } 104 }
103 105
104 void BufferSubData( 106 void BufferSubData(
105 PP_Resource context, GLenum target, GLintptr offset, GLsizeiptr size, 107 PP_Resource context_id, GLenum target, GLintptr offset, GLsizeiptr size,
106 const void* data) { 108 const void* data) {
107 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 109 scoped_refptr<PPB_Context3D_Impl> context =
108 Resource::GetAs<PPB_Graphics3D_Impl>(context); 110 Resource::GetAs<PPB_Context3D_Impl>(context_id);
109 graphics_3d->impl()->BufferSubData(target, offset, size, data); 111 context->gles2_impl()->BufferSubData(target, offset, size, data);
110 } 112 }
111 113
112 GLenum CheckFramebufferStatus(PP_Resource context, GLenum target) { 114 GLenum CheckFramebufferStatus(PP_Resource context_id, GLenum target) {
113 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 115 scoped_refptr<PPB_Context3D_Impl> context =
114 Resource::GetAs<PPB_Graphics3D_Impl>(context); 116 Resource::GetAs<PPB_Context3D_Impl>(context_id);
115 return graphics_3d->impl()->CheckFramebufferStatus(target); 117 return context->gles2_impl()->CheckFramebufferStatus(target);
116 } 118 }
117 119
118 void Clear(PP_Resource context, GLbitfield mask) { 120 void Clear(PP_Resource context_id, GLbitfield mask) {
119 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 121 scoped_refptr<PPB_Context3D_Impl> context =
120 Resource::GetAs<PPB_Graphics3D_Impl>(context); 122 Resource::GetAs<PPB_Context3D_Impl>(context_id);
121 graphics_3d->impl()->Clear(mask); 123 context->gles2_impl()->Clear(mask);
122 } 124 }
123 125
124 void ClearColor( 126 void ClearColor(
125 PP_Resource context, GLclampf red, GLclampf green, GLclampf blue, 127 PP_Resource context_id, GLclampf red, GLclampf green, GLclampf blue,
126 GLclampf alpha) { 128 GLclampf alpha) {
127 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 129 scoped_refptr<PPB_Context3D_Impl> context =
128 Resource::GetAs<PPB_Graphics3D_Impl>(context); 130 Resource::GetAs<PPB_Context3D_Impl>(context_id);
129 graphics_3d->impl()->ClearColor(red, green, blue, alpha); 131 context->gles2_impl()->ClearColor(red, green, blue, alpha);
130 } 132 }
131 133
132 void ClearDepthf(PP_Resource context, GLclampf depth) { 134 void ClearDepthf(PP_Resource context_id, GLclampf depth) {
133 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 135 scoped_refptr<PPB_Context3D_Impl> context =
134 Resource::GetAs<PPB_Graphics3D_Impl>(context); 136 Resource::GetAs<PPB_Context3D_Impl>(context_id);
135 graphics_3d->impl()->ClearDepthf(depth); 137 context->gles2_impl()->ClearDepthf(depth);
136 } 138 }
137 139
138 void ClearStencil(PP_Resource context, GLint s) { 140 void ClearStencil(PP_Resource context_id, GLint s) {
139 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 141 scoped_refptr<PPB_Context3D_Impl> context =
140 Resource::GetAs<PPB_Graphics3D_Impl>(context); 142 Resource::GetAs<PPB_Context3D_Impl>(context_id);
141 graphics_3d->impl()->ClearStencil(s); 143 context->gles2_impl()->ClearStencil(s);
142 } 144 }
143 145
144 void ColorMask( 146 void ColorMask(
145 PP_Resource context, GLboolean red, GLboolean green, GLboolean blue, 147 PP_Resource context_id, GLboolean red, GLboolean green, GLboolean blue,
146 GLboolean alpha) { 148 GLboolean alpha) {
147 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 149 scoped_refptr<PPB_Context3D_Impl> context =
148 Resource::GetAs<PPB_Graphics3D_Impl>(context); 150 Resource::GetAs<PPB_Context3D_Impl>(context_id);
149 graphics_3d->impl()->ColorMask(red, green, blue, alpha); 151 context->gles2_impl()->ColorMask(red, green, blue, alpha);
150 } 152 }
151 153
152 void CompileShader(PP_Resource context, GLuint shader) { 154 void CompileShader(PP_Resource context_id, GLuint shader) {
153 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 155 scoped_refptr<PPB_Context3D_Impl> context =
154 Resource::GetAs<PPB_Graphics3D_Impl>(context); 156 Resource::GetAs<PPB_Context3D_Impl>(context_id);
155 graphics_3d->impl()->CompileShader(shader); 157 context->gles2_impl()->CompileShader(shader);
156 } 158 }
157 159
158 void CompressedTexImage2D( 160 void CompressedTexImage2D(
159 PP_Resource context, GLenum target, GLint level, GLenum internalformat, 161 PP_Resource context_id, GLenum target, GLint level, GLenum internalformat,
160 GLsizei width, GLsizei height, GLint border, GLsizei imageSize, 162 GLsizei width, GLsizei height, GLint border, GLsizei imageSize,
161 const void* data) { 163 const void* data) {
162 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 164 scoped_refptr<PPB_Context3D_Impl> context =
163 Resource::GetAs<PPB_Graphics3D_Impl>(context); 165 Resource::GetAs<PPB_Context3D_Impl>(context_id);
164 graphics_3d->impl()->CompressedTexImage2D( 166 context->gles2_impl()->CompressedTexImage2D(
165 target, level, internalformat, width, height, border, imageSize, data); 167 target, level, internalformat, width, height, border, imageSize, data);
166 } 168 }
167 169
168 void CompressedTexSubImage2D( 170 void CompressedTexSubImage2D(
169 PP_Resource context, GLenum target, GLint level, GLint xoffset, 171 PP_Resource context_id, GLenum target, GLint level, GLint xoffset,
170 GLint yoffset, GLsizei width, GLsizei height, GLenum format, 172 GLint yoffset, GLsizei width, GLsizei height, GLenum format,
171 GLsizei imageSize, const void* data) { 173 GLsizei imageSize, const void* data) {
172 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 174 scoped_refptr<PPB_Context3D_Impl> context =
173 Resource::GetAs<PPB_Graphics3D_Impl>(context); 175 Resource::GetAs<PPB_Context3D_Impl>(context_id);
174 graphics_3d->impl()->CompressedTexSubImage2D( 176 context->gles2_impl()->CompressedTexSubImage2D(
175 target, level, xoffset, yoffset, width, height, format, imageSize, data); 177 target, level, xoffset, yoffset, width, height, format, imageSize, data);
176 } 178 }
177 179
178 void CopyTexImage2D( 180 void CopyTexImage2D(
179 PP_Resource context, GLenum target, GLint level, GLenum internalformat, 181 PP_Resource context_id, GLenum target, GLint level, GLenum internalformat,
180 GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { 182 GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
181 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 183 scoped_refptr<PPB_Context3D_Impl> context =
182 Resource::GetAs<PPB_Graphics3D_Impl>(context); 184 Resource::GetAs<PPB_Context3D_Impl>(context_id);
183 graphics_3d->impl()->CopyTexImage2D( 185 context->gles2_impl()->CopyTexImage2D(
184 target, level, internalformat, x, y, width, height, border); 186 target, level, internalformat, x, y, width, height, border);
185 } 187 }
186 188
187 void CopyTexSubImage2D( 189 void CopyTexSubImage2D(
188 PP_Resource context, GLenum target, GLint level, GLint xoffset, 190 PP_Resource context_id, GLenum target, GLint level, GLint xoffset,
189 GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { 191 GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
190 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 192 scoped_refptr<PPB_Context3D_Impl> context =
191 Resource::GetAs<PPB_Graphics3D_Impl>(context); 193 Resource::GetAs<PPB_Context3D_Impl>(context_id);
192 graphics_3d->impl()->CopyTexSubImage2D( 194 context->gles2_impl()->CopyTexSubImage2D(
193 target, level, xoffset, yoffset, x, y, width, height); 195 target, level, xoffset, yoffset, x, y, width, height);
194 } 196 }
195 197
196 GLuint CreateProgram(PP_Resource context) { 198 GLuint CreateProgram(PP_Resource context_id) {
197 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 199 scoped_refptr<PPB_Context3D_Impl> context =
198 Resource::GetAs<PPB_Graphics3D_Impl>(context); 200 Resource::GetAs<PPB_Context3D_Impl>(context_id);
199 return graphics_3d->impl()->CreateProgram(); 201 return context->gles2_impl()->CreateProgram();
200 } 202 }
201 203
202 GLuint CreateShader(PP_Resource context, GLenum type) { 204 GLuint CreateShader(PP_Resource context_id, GLenum type) {
203 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 205 scoped_refptr<PPB_Context3D_Impl> context =
204 Resource::GetAs<PPB_Graphics3D_Impl>(context); 206 Resource::GetAs<PPB_Context3D_Impl>(context_id);
205 return graphics_3d->impl()->CreateShader(type); 207 return context->gles2_impl()->CreateShader(type);
206 } 208 }
207 209
208 void CullFace(PP_Resource context, GLenum mode) { 210 void CullFace(PP_Resource context_id, GLenum mode) {
209 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 211 scoped_refptr<PPB_Context3D_Impl> context =
210 Resource::GetAs<PPB_Graphics3D_Impl>(context); 212 Resource::GetAs<PPB_Context3D_Impl>(context_id);
211 graphics_3d->impl()->CullFace(mode); 213 context->gles2_impl()->CullFace(mode);
212 } 214 }
213 215
214 void DeleteBuffers(PP_Resource context, GLsizei n, const GLuint* buffers) { 216 void DeleteBuffers(PP_Resource context_id, GLsizei n, const GLuint* buffers) {
215 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 217 scoped_refptr<PPB_Context3D_Impl> context =
216 Resource::GetAs<PPB_Graphics3D_Impl>(context); 218 Resource::GetAs<PPB_Context3D_Impl>(context_id);
217 graphics_3d->impl()->DeleteBuffers(n, buffers); 219 context->gles2_impl()->DeleteBuffers(n, buffers);
218 } 220 }
219 221
220 void DeleteFramebuffers( 222 void DeleteFramebuffers(
221 PP_Resource context, GLsizei n, const GLuint* framebuffers) { 223 PP_Resource context_id, GLsizei n, const GLuint* framebuffers) {
222 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 224 scoped_refptr<PPB_Context3D_Impl> context =
223 Resource::GetAs<PPB_Graphics3D_Impl>(context); 225 Resource::GetAs<PPB_Context3D_Impl>(context_id);
224 graphics_3d->impl()->DeleteFramebuffers(n, framebuffers); 226 context->gles2_impl()->DeleteFramebuffers(n, framebuffers);
225 } 227 }
226 228
227 void DeleteProgram(PP_Resource context, GLuint program) { 229 void DeleteProgram(PP_Resource context_id, GLuint program) {
228 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 230 scoped_refptr<PPB_Context3D_Impl> context =
229 Resource::GetAs<PPB_Graphics3D_Impl>(context); 231 Resource::GetAs<PPB_Context3D_Impl>(context_id);
230 graphics_3d->impl()->DeleteProgram(program); 232 context->gles2_impl()->DeleteProgram(program);
231 } 233 }
232 234
233 void DeleteRenderbuffers( 235 void DeleteRenderbuffers(
234 PP_Resource context, GLsizei n, const GLuint* renderbuffers) { 236 PP_Resource context_id, GLsizei n, const GLuint* renderbuffers) {
235 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 237 scoped_refptr<PPB_Context3D_Impl> context =
236 Resource::GetAs<PPB_Graphics3D_Impl>(context); 238 Resource::GetAs<PPB_Context3D_Impl>(context_id);
237 graphics_3d->impl()->DeleteRenderbuffers(n, renderbuffers); 239 context->gles2_impl()->DeleteRenderbuffers(n, renderbuffers);
238 } 240 }
239 241
240 void DeleteShader(PP_Resource context, GLuint shader) { 242 void DeleteShader(PP_Resource context_id, GLuint shader) {
241 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 243 scoped_refptr<PPB_Context3D_Impl> context =
242 Resource::GetAs<PPB_Graphics3D_Impl>(context); 244 Resource::GetAs<PPB_Context3D_Impl>(context_id);
243 graphics_3d->impl()->DeleteShader(shader); 245 context->gles2_impl()->DeleteShader(shader);
244 } 246 }
245 247
246 void DeleteTextures(PP_Resource context, GLsizei n, const GLuint* textures) { 248 void DeleteTextures(
247 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 249 PP_Resource context_id, GLsizei n, const GLuint* textures) {
248 Resource::GetAs<PPB_Graphics3D_Impl>(context); 250 scoped_refptr<PPB_Context3D_Impl> context =
249 graphics_3d->impl()->DeleteTextures(n, textures); 251 Resource::GetAs<PPB_Context3D_Impl>(context_id);
250 } 252 context->gles2_impl()->DeleteTextures(n, textures);
251 253 }
252 void DepthFunc(PP_Resource context, GLenum func) { 254
253 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 255 void DepthFunc(PP_Resource context_id, GLenum func) {
254 Resource::GetAs<PPB_Graphics3D_Impl>(context); 256 scoped_refptr<PPB_Context3D_Impl> context =
255 graphics_3d->impl()->DepthFunc(func); 257 Resource::GetAs<PPB_Context3D_Impl>(context_id);
256 } 258 context->gles2_impl()->DepthFunc(func);
257 259 }
258 void DepthMask(PP_Resource context, GLboolean flag) { 260
259 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 261 void DepthMask(PP_Resource context_id, GLboolean flag) {
260 Resource::GetAs<PPB_Graphics3D_Impl>(context); 262 scoped_refptr<PPB_Context3D_Impl> context =
261 graphics_3d->impl()->DepthMask(flag); 263 Resource::GetAs<PPB_Context3D_Impl>(context_id);
262 } 264 context->gles2_impl()->DepthMask(flag);
263 265 }
264 void DepthRangef(PP_Resource context, GLclampf zNear, GLclampf zFar) { 266
265 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 267 void DepthRangef(PP_Resource context_id, GLclampf zNear, GLclampf zFar) {
266 Resource::GetAs<PPB_Graphics3D_Impl>(context); 268 scoped_refptr<PPB_Context3D_Impl> context =
267 graphics_3d->impl()->DepthRangef(zNear, zFar); 269 Resource::GetAs<PPB_Context3D_Impl>(context_id);
268 } 270 context->gles2_impl()->DepthRangef(zNear, zFar);
269 271 }
270 void DetachShader(PP_Resource context, GLuint program, GLuint shader) { 272
271 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 273 void DetachShader(PP_Resource context_id, GLuint program, GLuint shader) {
272 Resource::GetAs<PPB_Graphics3D_Impl>(context); 274 scoped_refptr<PPB_Context3D_Impl> context =
273 graphics_3d->impl()->DetachShader(program, shader); 275 Resource::GetAs<PPB_Context3D_Impl>(context_id);
274 } 276 context->gles2_impl()->DetachShader(program, shader);
275 277 }
276 void Disable(PP_Resource context, GLenum cap) { 278
277 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 279 void Disable(PP_Resource context_id, GLenum cap) {
278 Resource::GetAs<PPB_Graphics3D_Impl>(context); 280 scoped_refptr<PPB_Context3D_Impl> context =
279 graphics_3d->impl()->Disable(cap); 281 Resource::GetAs<PPB_Context3D_Impl>(context_id);
280 } 282 context->gles2_impl()->Disable(cap);
281 283 }
282 void DisableVertexAttribArray(PP_Resource context, GLuint index) { 284
283 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 285 void DisableVertexAttribArray(PP_Resource context_id, GLuint index) {
284 Resource::GetAs<PPB_Graphics3D_Impl>(context); 286 scoped_refptr<PPB_Context3D_Impl> context =
285 graphics_3d->impl()->DisableVertexAttribArray(index); 287 Resource::GetAs<PPB_Context3D_Impl>(context_id);
286 } 288 context->gles2_impl()->DisableVertexAttribArray(index);
287 289 }
288 void DrawArrays(PP_Resource context, GLenum mode, GLint first, GLsizei count) { 290
289 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 291 void DrawArrays(
290 Resource::GetAs<PPB_Graphics3D_Impl>(context); 292 PP_Resource context_id, GLenum mode, GLint first, GLsizei count) {
291 graphics_3d->impl()->DrawArrays(mode, first, count); 293 scoped_refptr<PPB_Context3D_Impl> context =
294 Resource::GetAs<PPB_Context3D_Impl>(context_id);
295 context->gles2_impl()->DrawArrays(mode, first, count);
292 } 296 }
293 297
294 void DrawElements( 298 void DrawElements(
295 PP_Resource context, GLenum mode, GLsizei count, GLenum type, 299 PP_Resource context_id, GLenum mode, GLsizei count, GLenum type,
296 const void* indices) { 300 const void* indices) {
297 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 301 scoped_refptr<PPB_Context3D_Impl> context =
298 Resource::GetAs<PPB_Graphics3D_Impl>(context); 302 Resource::GetAs<PPB_Context3D_Impl>(context_id);
299 graphics_3d->impl()->DrawElements(mode, count, type, indices); 303 context->gles2_impl()->DrawElements(mode, count, type, indices);
300 } 304 }
301 305
302 void Enable(PP_Resource context, GLenum cap) { 306 void Enable(PP_Resource context_id, GLenum cap) {
303 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 307 scoped_refptr<PPB_Context3D_Impl> context =
304 Resource::GetAs<PPB_Graphics3D_Impl>(context); 308 Resource::GetAs<PPB_Context3D_Impl>(context_id);
305 graphics_3d->impl()->Enable(cap); 309 context->gles2_impl()->Enable(cap);
306 } 310 }
307 311
308 void EnableVertexAttribArray(PP_Resource context, GLuint index) { 312 void EnableVertexAttribArray(PP_Resource context_id, GLuint index) {
309 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 313 scoped_refptr<PPB_Context3D_Impl> context =
310 Resource::GetAs<PPB_Graphics3D_Impl>(context); 314 Resource::GetAs<PPB_Context3D_Impl>(context_id);
311 graphics_3d->impl()->EnableVertexAttribArray(index); 315 context->gles2_impl()->EnableVertexAttribArray(index);
312 } 316 }
313 317
314 void Finish(PP_Resource context) { 318 void Finish(PP_Resource context_id) {
315 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 319 scoped_refptr<PPB_Context3D_Impl> context =
316 Resource::GetAs<PPB_Graphics3D_Impl>(context); 320 Resource::GetAs<PPB_Context3D_Impl>(context_id);
317 graphics_3d->impl()->Finish(); 321 context->gles2_impl()->Finish();
318 } 322 }
319 323
320 void Flush(PP_Resource context) { 324 void Flush(PP_Resource context_id) {
321 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 325 scoped_refptr<PPB_Context3D_Impl> context =
322 Resource::GetAs<PPB_Graphics3D_Impl>(context); 326 Resource::GetAs<PPB_Context3D_Impl>(context_id);
323 graphics_3d->impl()->Flush(); 327 context->gles2_impl()->Flush();
324 } 328 }
325 329
326 void FramebufferRenderbuffer( 330 void FramebufferRenderbuffer(
327 PP_Resource context, GLenum target, GLenum attachment, 331 PP_Resource context_id, GLenum target, GLenum attachment,
328 GLenum renderbuffertarget, GLuint renderbuffer) { 332 GLenum renderbuffertarget, GLuint renderbuffer) {
329 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 333 scoped_refptr<PPB_Context3D_Impl> context =
330 Resource::GetAs<PPB_Graphics3D_Impl>(context); 334 Resource::GetAs<PPB_Context3D_Impl>(context_id);
331 graphics_3d->impl()->FramebufferRenderbuffer( 335 context->gles2_impl()->FramebufferRenderbuffer(
332 target, attachment, renderbuffertarget, renderbuffer); 336 target, attachment, renderbuffertarget, renderbuffer);
333 } 337 }
334 338
335 void FramebufferTexture2D( 339 void FramebufferTexture2D(
336 PP_Resource context, GLenum target, GLenum attachment, GLenum textarget, 340 PP_Resource context_id, GLenum target, GLenum attachment, GLenum textarget,
337 GLuint texture, GLint level) { 341 GLuint texture, GLint level) {
338 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 342 scoped_refptr<PPB_Context3D_Impl> context =
339 Resource::GetAs<PPB_Graphics3D_Impl>(context); 343 Resource::GetAs<PPB_Context3D_Impl>(context_id);
340 graphics_3d->impl()->FramebufferTexture2D( 344 context->gles2_impl()->FramebufferTexture2D(
341 target, attachment, textarget, texture, level); 345 target, attachment, textarget, texture, level);
342 } 346 }
343 347
344 void FrontFace(PP_Resource context, GLenum mode) { 348 void FrontFace(PP_Resource context_id, GLenum mode) {
345 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 349 scoped_refptr<PPB_Context3D_Impl> context =
346 Resource::GetAs<PPB_Graphics3D_Impl>(context); 350 Resource::GetAs<PPB_Context3D_Impl>(context_id);
347 graphics_3d->impl()->FrontFace(mode); 351 context->gles2_impl()->FrontFace(mode);
348 } 352 }
349 353
350 void GenBuffers(PP_Resource context, GLsizei n, GLuint* buffers) { 354 void GenBuffers(PP_Resource context_id, GLsizei n, GLuint* buffers) {
351 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 355 scoped_refptr<PPB_Context3D_Impl> context =
352 Resource::GetAs<PPB_Graphics3D_Impl>(context); 356 Resource::GetAs<PPB_Context3D_Impl>(context_id);
353 graphics_3d->impl()->GenBuffers(n, buffers); 357 context->gles2_impl()->GenBuffers(n, buffers);
354 } 358 }
355 359
356 void GenerateMipmap(PP_Resource context, GLenum target) { 360 void GenerateMipmap(PP_Resource context_id, GLenum target) {
357 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 361 scoped_refptr<PPB_Context3D_Impl> context =
358 Resource::GetAs<PPB_Graphics3D_Impl>(context); 362 Resource::GetAs<PPB_Context3D_Impl>(context_id);
359 graphics_3d->impl()->GenerateMipmap(target); 363 context->gles2_impl()->GenerateMipmap(target);
360 } 364 }
361 365
362 void GenFramebuffers(PP_Resource context, GLsizei n, GLuint* framebuffers) { 366 void GenFramebuffers(PP_Resource context_id, GLsizei n, GLuint* framebuffers) {
363 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 367 scoped_refptr<PPB_Context3D_Impl> context =
364 Resource::GetAs<PPB_Graphics3D_Impl>(context); 368 Resource::GetAs<PPB_Context3D_Impl>(context_id);
365 graphics_3d->impl()->GenFramebuffers(n, framebuffers); 369 context->gles2_impl()->GenFramebuffers(n, framebuffers);
366 } 370 }
367 371
368 void GenRenderbuffers(PP_Resource context, GLsizei n, GLuint* renderbuffers) { 372 void GenRenderbuffers(
369 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 373 PP_Resource context_id, GLsizei n, GLuint* renderbuffers) {
370 Resource::GetAs<PPB_Graphics3D_Impl>(context); 374 scoped_refptr<PPB_Context3D_Impl> context =
371 graphics_3d->impl()->GenRenderbuffers(n, renderbuffers); 375 Resource::GetAs<PPB_Context3D_Impl>(context_id);
372 } 376 context->gles2_impl()->GenRenderbuffers(n, renderbuffers);
373 377 }
374 void GenTextures(PP_Resource context, GLsizei n, GLuint* textures) { 378
375 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 379 void GenTextures(PP_Resource context_id, GLsizei n, GLuint* textures) {
376 Resource::GetAs<PPB_Graphics3D_Impl>(context); 380 scoped_refptr<PPB_Context3D_Impl> context =
377 graphics_3d->impl()->GenTextures(n, textures); 381 Resource::GetAs<PPB_Context3D_Impl>(context_id);
382 context->gles2_impl()->GenTextures(n, textures);
378 } 383 }
379 384
380 void GetActiveAttrib( 385 void GetActiveAttrib(
381 PP_Resource context, GLuint program, GLuint index, GLsizei bufsize, 386 PP_Resource context_id, GLuint program, GLuint index, GLsizei bufsize,
382 GLsizei* length, GLint* size, GLenum* type, char* name) { 387 GLsizei* length, GLint* size, GLenum* type, char* name) {
383 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 388 scoped_refptr<PPB_Context3D_Impl> context =
384 Resource::GetAs<PPB_Graphics3D_Impl>(context); 389 Resource::GetAs<PPB_Context3D_Impl>(context_id);
385 graphics_3d->impl()->GetActiveAttrib( 390 context->gles2_impl()->GetActiveAttrib(
386 program, index, bufsize, length, size, type, name); 391 program, index, bufsize, length, size, type, name);
387 } 392 }
388 393
389 void GetActiveUniform( 394 void GetActiveUniform(
390 PP_Resource context, GLuint program, GLuint index, GLsizei bufsize, 395 PP_Resource context_id, GLuint program, GLuint index, GLsizei bufsize,
391 GLsizei* length, GLint* size, GLenum* type, char* name) { 396 GLsizei* length, GLint* size, GLenum* type, char* name) {
392 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 397 scoped_refptr<PPB_Context3D_Impl> context =
393 Resource::GetAs<PPB_Graphics3D_Impl>(context); 398 Resource::GetAs<PPB_Context3D_Impl>(context_id);
394 graphics_3d->impl()->GetActiveUniform( 399 context->gles2_impl()->GetActiveUniform(
395 program, index, bufsize, length, size, type, name); 400 program, index, bufsize, length, size, type, name);
396 } 401 }
397 402
398 void GetAttachedShaders( 403 void GetAttachedShaders(
399 PP_Resource context, GLuint program, GLsizei maxcount, GLsizei* count, 404 PP_Resource context_id, GLuint program, GLsizei maxcount, GLsizei* count,
400 GLuint* shaders) { 405 GLuint* shaders) {
401 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 406 scoped_refptr<PPB_Context3D_Impl> context =
402 Resource::GetAs<PPB_Graphics3D_Impl>(context); 407 Resource::GetAs<PPB_Context3D_Impl>(context_id);
403 graphics_3d->impl()->GetAttachedShaders(program, maxcount, count, shaders); 408 context->gles2_impl()->GetAttachedShaders(program, maxcount, count, shaders);
404 } 409 }
405 410
406 GLint GetAttribLocation( 411 GLint GetAttribLocation(
407 PP_Resource context, GLuint program, const char* name) { 412 PP_Resource context_id, GLuint program, const char* name) {
408 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 413 scoped_refptr<PPB_Context3D_Impl> context =
409 Resource::GetAs<PPB_Graphics3D_Impl>(context); 414 Resource::GetAs<PPB_Context3D_Impl>(context_id);
410 return graphics_3d->impl()->GetAttribLocation(program, name); 415 return context->gles2_impl()->GetAttribLocation(program, name);
411 } 416 }
412 417
413 void GetBooleanv(PP_Resource context, GLenum pname, GLboolean* params) { 418 void GetBooleanv(PP_Resource context_id, GLenum pname, GLboolean* params) {
414 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 419 scoped_refptr<PPB_Context3D_Impl> context =
415 Resource::GetAs<PPB_Graphics3D_Impl>(context); 420 Resource::GetAs<PPB_Context3D_Impl>(context_id);
416 graphics_3d->impl()->GetBooleanv(pname, params); 421 context->gles2_impl()->GetBooleanv(pname, params);
417 } 422 }
418 423
419 void GetBufferParameteriv( 424 void GetBufferParameteriv(
420 PP_Resource context, GLenum target, GLenum pname, GLint* params) { 425 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) {
421 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 426 scoped_refptr<PPB_Context3D_Impl> context =
422 Resource::GetAs<PPB_Graphics3D_Impl>(context); 427 Resource::GetAs<PPB_Context3D_Impl>(context_id);
423 graphics_3d->impl()->GetBufferParameteriv(target, pname, params); 428 context->gles2_impl()->GetBufferParameteriv(target, pname, params);
424 } 429 }
425 430
426 GLenum GetError(PP_Resource context) { 431 GLenum GetError(PP_Resource context_id) {
427 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 432 scoped_refptr<PPB_Context3D_Impl> context =
428 Resource::GetAs<PPB_Graphics3D_Impl>(context); 433 Resource::GetAs<PPB_Context3D_Impl>(context_id);
429 return graphics_3d->impl()->GetError(); 434 return context->gles2_impl()->GetError();
430 } 435 }
431 436
432 void GetFloatv(PP_Resource context, GLenum pname, GLfloat* params) { 437 void GetFloatv(PP_Resource context_id, GLenum pname, GLfloat* params) {
433 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 438 scoped_refptr<PPB_Context3D_Impl> context =
434 Resource::GetAs<PPB_Graphics3D_Impl>(context); 439 Resource::GetAs<PPB_Context3D_Impl>(context_id);
435 graphics_3d->impl()->GetFloatv(pname, params); 440 context->gles2_impl()->GetFloatv(pname, params);
436 } 441 }
437 442
438 void GetFramebufferAttachmentParameteriv( 443 void GetFramebufferAttachmentParameteriv(
439 PP_Resource context, GLenum target, GLenum attachment, GLenum pname, 444 PP_Resource context_id, GLenum target, GLenum attachment, GLenum pname,
440 GLint* params) { 445 GLint* params) {
441 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 446 scoped_refptr<PPB_Context3D_Impl> context =
442 Resource::GetAs<PPB_Graphics3D_Impl>(context); 447 Resource::GetAs<PPB_Context3D_Impl>(context_id);
443 graphics_3d->impl()->GetFramebufferAttachmentParameteriv( 448 context->gles2_impl()->GetFramebufferAttachmentParameteriv(
444 target, attachment, pname, params); 449 target, attachment, pname, params);
445 } 450 }
446 451
447 void GetIntegerv(PP_Resource context, GLenum pname, GLint* params) { 452 void GetIntegerv(PP_Resource context_id, GLenum pname, GLint* params) {
448 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 453 scoped_refptr<PPB_Context3D_Impl> context =
449 Resource::GetAs<PPB_Graphics3D_Impl>(context); 454 Resource::GetAs<PPB_Context3D_Impl>(context_id);
450 graphics_3d->impl()->GetIntegerv(pname, params); 455 context->gles2_impl()->GetIntegerv(pname, params);
451 } 456 }
452 457
453 void GetProgramiv( 458 void GetProgramiv(
454 PP_Resource context, GLuint program, GLenum pname, GLint* params) { 459 PP_Resource context_id, GLuint program, GLenum pname, GLint* params) {
455 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 460 scoped_refptr<PPB_Context3D_Impl> context =
456 Resource::GetAs<PPB_Graphics3D_Impl>(context); 461 Resource::GetAs<PPB_Context3D_Impl>(context_id);
457 graphics_3d->impl()->GetProgramiv(program, pname, params); 462 context->gles2_impl()->GetProgramiv(program, pname, params);
458 } 463 }
459 464
460 void GetProgramInfoLog( 465 void GetProgramInfoLog(
461 PP_Resource context, GLuint program, GLsizei bufsize, GLsizei* length, 466 PP_Resource context_id, GLuint program, GLsizei bufsize, GLsizei* length,
462 char* infolog) { 467 char* infolog) {
463 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 468 scoped_refptr<PPB_Context3D_Impl> context =
464 Resource::GetAs<PPB_Graphics3D_Impl>(context); 469 Resource::GetAs<PPB_Context3D_Impl>(context_id);
465 graphics_3d->impl()->GetProgramInfoLog(program, bufsize, length, infolog); 470 context->gles2_impl()->GetProgramInfoLog(program, bufsize, length, infolog);
466 } 471 }
467 472
468 void GetRenderbufferParameteriv( 473 void GetRenderbufferParameteriv(
469 PP_Resource context, GLenum target, GLenum pname, GLint* params) { 474 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) {
470 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 475 scoped_refptr<PPB_Context3D_Impl> context =
471 Resource::GetAs<PPB_Graphics3D_Impl>(context); 476 Resource::GetAs<PPB_Context3D_Impl>(context_id);
472 graphics_3d->impl()->GetRenderbufferParameteriv(target, pname, params); 477 context->gles2_impl()->GetRenderbufferParameteriv(target, pname, params);
473 } 478 }
474 479
475 void GetShaderiv( 480 void GetShaderiv(
476 PP_Resource context, GLuint shader, GLenum pname, GLint* params) { 481 PP_Resource context_id, GLuint shader, GLenum pname, GLint* params) {
477 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 482 scoped_refptr<PPB_Context3D_Impl> context =
478 Resource::GetAs<PPB_Graphics3D_Impl>(context); 483 Resource::GetAs<PPB_Context3D_Impl>(context_id);
479 graphics_3d->impl()->GetShaderiv(shader, pname, params); 484 context->gles2_impl()->GetShaderiv(shader, pname, params);
480 } 485 }
481 486
482 void GetShaderInfoLog( 487 void GetShaderInfoLog(
483 PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length, 488 PP_Resource context_id, GLuint shader, GLsizei bufsize, GLsizei* length,
484 char* infolog) { 489 char* infolog) {
485 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 490 scoped_refptr<PPB_Context3D_Impl> context =
486 Resource::GetAs<PPB_Graphics3D_Impl>(context); 491 Resource::GetAs<PPB_Context3D_Impl>(context_id);
487 graphics_3d->impl()->GetShaderInfoLog(shader, bufsize, length, infolog); 492 context->gles2_impl()->GetShaderInfoLog(shader, bufsize, length, infolog);
488 } 493 }
489 494
490 void GetShaderPrecisionFormat( 495 void GetShaderPrecisionFormat(
491 PP_Resource context, GLenum shadertype, GLenum precisiontype, GLint* range, 496 PP_Resource context_id, GLenum shadertype, GLenum precisiontype,
492 GLint* precision) { 497 GLint* range, GLint* precision) {
493 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 498 scoped_refptr<PPB_Context3D_Impl> context =
494 Resource::GetAs<PPB_Graphics3D_Impl>(context); 499 Resource::GetAs<PPB_Context3D_Impl>(context_id);
495 graphics_3d->impl()->GetShaderPrecisionFormat( 500 context->gles2_impl()->GetShaderPrecisionFormat(
496 shadertype, precisiontype, range, precision); 501 shadertype, precisiontype, range, precision);
497 } 502 }
498 503
499 void GetShaderSource( 504 void GetShaderSource(
500 PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length, 505 PP_Resource context_id, GLuint shader, GLsizei bufsize, GLsizei* length,
501 char* source) { 506 char* source) {
502 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 507 scoped_refptr<PPB_Context3D_Impl> context =
503 Resource::GetAs<PPB_Graphics3D_Impl>(context); 508 Resource::GetAs<PPB_Context3D_Impl>(context_id);
504 graphics_3d->impl()->GetShaderSource(shader, bufsize, length, source); 509 context->gles2_impl()->GetShaderSource(shader, bufsize, length, source);
505 } 510 }
506 511
507 const GLubyte* GetString(PP_Resource context, GLenum name) { 512 const GLubyte* GetString(PP_Resource context_id, GLenum name) {
508 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 513 scoped_refptr<PPB_Context3D_Impl> context =
509 Resource::GetAs<PPB_Graphics3D_Impl>(context); 514 Resource::GetAs<PPB_Context3D_Impl>(context_id);
510 return graphics_3d->impl()->GetString(name); 515 return context->gles2_impl()->GetString(name);
511 } 516 }
512 517
513 void GetTexParameterfv( 518 void GetTexParameterfv(
514 PP_Resource context, GLenum target, GLenum pname, GLfloat* params) { 519 PP_Resource context_id, GLenum target, GLenum pname, GLfloat* params) {
515 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 520 scoped_refptr<PPB_Context3D_Impl> context =
516 Resource::GetAs<PPB_Graphics3D_Impl>(context); 521 Resource::GetAs<PPB_Context3D_Impl>(context_id);
517 graphics_3d->impl()->GetTexParameterfv(target, pname, params); 522 context->gles2_impl()->GetTexParameterfv(target, pname, params);
518 } 523 }
519 524
520 void GetTexParameteriv( 525 void GetTexParameteriv(
521 PP_Resource context, GLenum target, GLenum pname, GLint* params) { 526 PP_Resource context_id, GLenum target, GLenum pname, GLint* params) {
522 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 527 scoped_refptr<PPB_Context3D_Impl> context =
523 Resource::GetAs<PPB_Graphics3D_Impl>(context); 528 Resource::GetAs<PPB_Context3D_Impl>(context_id);
524 graphics_3d->impl()->GetTexParameteriv(target, pname, params); 529 context->gles2_impl()->GetTexParameteriv(target, pname, params);
525 } 530 }
526 531
527 void GetUniformfv( 532 void GetUniformfv(
528 PP_Resource context, GLuint program, GLint location, GLfloat* params) { 533 PP_Resource context_id, GLuint program, GLint location, GLfloat* params) {
529 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 534 scoped_refptr<PPB_Context3D_Impl> context =
530 Resource::GetAs<PPB_Graphics3D_Impl>(context); 535 Resource::GetAs<PPB_Context3D_Impl>(context_id);
531 graphics_3d->impl()->GetUniformfv(program, location, params); 536 context->gles2_impl()->GetUniformfv(program, location, params);
532 } 537 }
533 538
534 void GetUniformiv( 539 void GetUniformiv(
535 PP_Resource context, GLuint program, GLint location, GLint* params) { 540 PP_Resource context_id, GLuint program, GLint location, GLint* params) {
536 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 541 scoped_refptr<PPB_Context3D_Impl> context =
537 Resource::GetAs<PPB_Graphics3D_Impl>(context); 542 Resource::GetAs<PPB_Context3D_Impl>(context_id);
538 graphics_3d->impl()->GetUniformiv(program, location, params); 543 context->gles2_impl()->GetUniformiv(program, location, params);
539 } 544 }
540 545
541 GLint GetUniformLocation( 546 GLint GetUniformLocation(
542 PP_Resource context, GLuint program, const char* name) { 547 PP_Resource context_id, GLuint program, const char* name) {
543 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 548 scoped_refptr<PPB_Context3D_Impl> context =
544 Resource::GetAs<PPB_Graphics3D_Impl>(context); 549 Resource::GetAs<PPB_Context3D_Impl>(context_id);
545 return graphics_3d->impl()->GetUniformLocation(program, name); 550 return context->gles2_impl()->GetUniformLocation(program, name);
546 } 551 }
547 552
548 void GetVertexAttribfv( 553 void GetVertexAttribfv(
549 PP_Resource context, GLuint index, GLenum pname, GLfloat* params) { 554 PP_Resource context_id, GLuint index, GLenum pname, GLfloat* params) {
550 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 555 scoped_refptr<PPB_Context3D_Impl> context =
551 Resource::GetAs<PPB_Graphics3D_Impl>(context); 556 Resource::GetAs<PPB_Context3D_Impl>(context_id);
552 graphics_3d->impl()->GetVertexAttribfv(index, pname, params); 557 context->gles2_impl()->GetVertexAttribfv(index, pname, params);
553 } 558 }
554 559
555 void GetVertexAttribiv( 560 void GetVertexAttribiv(
556 PP_Resource context, GLuint index, GLenum pname, GLint* params) { 561 PP_Resource context_id, GLuint index, GLenum pname, GLint* params) {
557 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 562 scoped_refptr<PPB_Context3D_Impl> context =
558 Resource::GetAs<PPB_Graphics3D_Impl>(context); 563 Resource::GetAs<PPB_Context3D_Impl>(context_id);
559 graphics_3d->impl()->GetVertexAttribiv(index, pname, params); 564 context->gles2_impl()->GetVertexAttribiv(index, pname, params);
560 } 565 }
561 566
562 void GetVertexAttribPointerv( 567 void GetVertexAttribPointerv(
563 PP_Resource context, GLuint index, GLenum pname, void** pointer) { 568 PP_Resource context_id, GLuint index, GLenum pname, void** pointer) {
564 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 569 scoped_refptr<PPB_Context3D_Impl> context =
565 Resource::GetAs<PPB_Graphics3D_Impl>(context); 570 Resource::GetAs<PPB_Context3D_Impl>(context_id);
566 graphics_3d->impl()->GetVertexAttribPointerv(index, pname, pointer); 571 context->gles2_impl()->GetVertexAttribPointerv(index, pname, pointer);
567 } 572 }
568 573
569 void Hint(PP_Resource context, GLenum target, GLenum mode) { 574 void Hint(PP_Resource context_id, GLenum target, GLenum mode) {
570 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 575 scoped_refptr<PPB_Context3D_Impl> context =
571 Resource::GetAs<PPB_Graphics3D_Impl>(context); 576 Resource::GetAs<PPB_Context3D_Impl>(context_id);
572 graphics_3d->impl()->Hint(target, mode); 577 context->gles2_impl()->Hint(target, mode);
573 } 578 }
574 579
575 GLboolean IsBuffer(PP_Resource context, GLuint buffer) { 580 GLboolean IsBuffer(PP_Resource context_id, GLuint buffer) {
576 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 581 scoped_refptr<PPB_Context3D_Impl> context =
577 Resource::GetAs<PPB_Graphics3D_Impl>(context); 582 Resource::GetAs<PPB_Context3D_Impl>(context_id);
578 return graphics_3d->impl()->IsBuffer(buffer); 583 return context->gles2_impl()->IsBuffer(buffer);
579 } 584 }
580 585
581 GLboolean IsEnabled(PP_Resource context, GLenum cap) { 586 GLboolean IsEnabled(PP_Resource context_id, GLenum cap) {
582 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 587 scoped_refptr<PPB_Context3D_Impl> context =
583 Resource::GetAs<PPB_Graphics3D_Impl>(context); 588 Resource::GetAs<PPB_Context3D_Impl>(context_id);
584 return graphics_3d->impl()->IsEnabled(cap); 589 return context->gles2_impl()->IsEnabled(cap);
585 } 590 }
586 591
587 GLboolean IsFramebuffer(PP_Resource context, GLuint framebuffer) { 592 GLboolean IsFramebuffer(PP_Resource context_id, GLuint framebuffer) {
588 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 593 scoped_refptr<PPB_Context3D_Impl> context =
589 Resource::GetAs<PPB_Graphics3D_Impl>(context); 594 Resource::GetAs<PPB_Context3D_Impl>(context_id);
590 return graphics_3d->impl()->IsFramebuffer(framebuffer); 595 return context->gles2_impl()->IsFramebuffer(framebuffer);
591 } 596 }
592 597
593 GLboolean IsProgram(PP_Resource context, GLuint program) { 598 GLboolean IsProgram(PP_Resource context_id, GLuint program) {
594 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 599 scoped_refptr<PPB_Context3D_Impl> context =
595 Resource::GetAs<PPB_Graphics3D_Impl>(context); 600 Resource::GetAs<PPB_Context3D_Impl>(context_id);
596 return graphics_3d->impl()->IsProgram(program); 601 return context->gles2_impl()->IsProgram(program);
597 } 602 }
598 603
599 GLboolean IsRenderbuffer(PP_Resource context, GLuint renderbuffer) { 604 GLboolean IsRenderbuffer(PP_Resource context_id, GLuint renderbuffer) {
600 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 605 scoped_refptr<PPB_Context3D_Impl> context =
601 Resource::GetAs<PPB_Graphics3D_Impl>(context); 606 Resource::GetAs<PPB_Context3D_Impl>(context_id);
602 return graphics_3d->impl()->IsRenderbuffer(renderbuffer); 607 return context->gles2_impl()->IsRenderbuffer(renderbuffer);
603 } 608 }
604 609
605 GLboolean IsShader(PP_Resource context, GLuint shader) { 610 GLboolean IsShader(PP_Resource context_id, GLuint shader) {
606 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 611 scoped_refptr<PPB_Context3D_Impl> context =
607 Resource::GetAs<PPB_Graphics3D_Impl>(context); 612 Resource::GetAs<PPB_Context3D_Impl>(context_id);
608 return graphics_3d->impl()->IsShader(shader); 613 return context->gles2_impl()->IsShader(shader);
609 } 614 }
610 615
611 GLboolean IsTexture(PP_Resource context, GLuint texture) { 616 GLboolean IsTexture(PP_Resource context_id, GLuint texture) {
612 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 617 scoped_refptr<PPB_Context3D_Impl> context =
613 Resource::GetAs<PPB_Graphics3D_Impl>(context); 618 Resource::GetAs<PPB_Context3D_Impl>(context_id);
614 return graphics_3d->impl()->IsTexture(texture); 619 return context->gles2_impl()->IsTexture(texture);
615 } 620 }
616 621
617 void LineWidth(PP_Resource context, GLfloat width) { 622 void LineWidth(PP_Resource context_id, GLfloat width) {
618 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 623 scoped_refptr<PPB_Context3D_Impl> context =
619 Resource::GetAs<PPB_Graphics3D_Impl>(context); 624 Resource::GetAs<PPB_Context3D_Impl>(context_id);
620 graphics_3d->impl()->LineWidth(width); 625 context->gles2_impl()->LineWidth(width);
621 } 626 }
622 627
623 void LinkProgram(PP_Resource context, GLuint program) { 628 void LinkProgram(PP_Resource context_id, GLuint program) {
624 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 629 scoped_refptr<PPB_Context3D_Impl> context =
625 Resource::GetAs<PPB_Graphics3D_Impl>(context); 630 Resource::GetAs<PPB_Context3D_Impl>(context_id);
626 graphics_3d->impl()->LinkProgram(program); 631 context->gles2_impl()->LinkProgram(program);
627 } 632 }
628 633
629 void PixelStorei(PP_Resource context, GLenum pname, GLint param) { 634 void PixelStorei(PP_Resource context_id, GLenum pname, GLint param) {
630 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 635 scoped_refptr<PPB_Context3D_Impl> context =
631 Resource::GetAs<PPB_Graphics3D_Impl>(context); 636 Resource::GetAs<PPB_Context3D_Impl>(context_id);
632 graphics_3d->impl()->PixelStorei(pname, param); 637 context->gles2_impl()->PixelStorei(pname, param);
633 } 638 }
634 639
635 void PolygonOffset(PP_Resource context, GLfloat factor, GLfloat units) { 640 void PolygonOffset(PP_Resource context_id, GLfloat factor, GLfloat units) {
636 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 641 scoped_refptr<PPB_Context3D_Impl> context =
637 Resource::GetAs<PPB_Graphics3D_Impl>(context); 642 Resource::GetAs<PPB_Context3D_Impl>(context_id);
638 graphics_3d->impl()->PolygonOffset(factor, units); 643 context->gles2_impl()->PolygonOffset(factor, units);
639 } 644 }
640 645
641 void ReadPixels( 646 void ReadPixels(
642 PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height, 647 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height,
643 GLenum format, GLenum type, void* pixels) { 648 GLenum format, GLenum type, void* pixels) {
644 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 649 scoped_refptr<PPB_Context3D_Impl> context =
645 Resource::GetAs<PPB_Graphics3D_Impl>(context); 650 Resource::GetAs<PPB_Context3D_Impl>(context_id);
646 graphics_3d->impl()->ReadPixels(x, y, width, height, format, type, pixels); 651 context->gles2_impl()->ReadPixels(x, y, width, height, format, type, pixels);
647 } 652 }
648 653
649 void ReleaseShaderCompiler(PP_Resource context) { 654 void ReleaseShaderCompiler(PP_Resource context_id) {
650 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 655 scoped_refptr<PPB_Context3D_Impl> context =
651 Resource::GetAs<PPB_Graphics3D_Impl>(context); 656 Resource::GetAs<PPB_Context3D_Impl>(context_id);
652 graphics_3d->impl()->ReleaseShaderCompiler(); 657 context->gles2_impl()->ReleaseShaderCompiler();
653 } 658 }
654 659
655 void RenderbufferStorage( 660 void RenderbufferStorage(
656 PP_Resource context, GLenum target, GLenum internalformat, GLsizei width, 661 PP_Resource context_id, GLenum target, GLenum internalformat, GLsizei width,
657 GLsizei height) { 662 GLsizei height) {
658 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 663 scoped_refptr<PPB_Context3D_Impl> context =
659 Resource::GetAs<PPB_Graphics3D_Impl>(context); 664 Resource::GetAs<PPB_Context3D_Impl>(context_id);
660 graphics_3d->impl()->RenderbufferStorage( 665 context->gles2_impl()->RenderbufferStorage(
661 target, internalformat, width, height); 666 target, internalformat, width, height);
662 } 667 }
663 668
664 void SampleCoverage(PP_Resource context, GLclampf value, GLboolean invert) { 669 void SampleCoverage(PP_Resource context_id, GLclampf value, GLboolean invert) {
665 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 670 scoped_refptr<PPB_Context3D_Impl> context =
666 Resource::GetAs<PPB_Graphics3D_Impl>(context); 671 Resource::GetAs<PPB_Context3D_Impl>(context_id);
667 graphics_3d->impl()->SampleCoverage(value, invert); 672 context->gles2_impl()->SampleCoverage(value, invert);
668 } 673 }
669 674
670 void Scissor( 675 void Scissor(
671 PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height) { 676 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height) {
672 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 677 scoped_refptr<PPB_Context3D_Impl> context =
673 Resource::GetAs<PPB_Graphics3D_Impl>(context); 678 Resource::GetAs<PPB_Context3D_Impl>(context_id);
674 graphics_3d->impl()->Scissor(x, y, width, height); 679 context->gles2_impl()->Scissor(x, y, width, height);
675 } 680 }
676 681
677 void ShaderBinary( 682 void ShaderBinary(
678 PP_Resource context, GLsizei n, const GLuint* shaders, GLenum binaryformat, 683 PP_Resource context_id, GLsizei n, const GLuint* shaders,
679 const void* binary, GLsizei length) { 684 GLenum binaryformat, const void* binary, GLsizei length) {
680 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 685 scoped_refptr<PPB_Context3D_Impl> context =
681 Resource::GetAs<PPB_Graphics3D_Impl>(context); 686 Resource::GetAs<PPB_Context3D_Impl>(context_id);
682 graphics_3d->impl()->ShaderBinary(n, shaders, binaryformat, binary, length); 687 context->gles2_impl()->ShaderBinary(
688 n, shaders, binaryformat, binary, length);
683 } 689 }
684 690
685 void ShaderSource( 691 void ShaderSource(
686 PP_Resource context, GLuint shader, GLsizei count, const char** str, 692 PP_Resource context_id, GLuint shader, GLsizei count, const char** str,
687 const GLint* length) { 693 const GLint* length) {
688 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 694 scoped_refptr<PPB_Context3D_Impl> context =
689 Resource::GetAs<PPB_Graphics3D_Impl>(context); 695 Resource::GetAs<PPB_Context3D_Impl>(context_id);
690 graphics_3d->impl()->ShaderSource(shader, count, str, length); 696 context->gles2_impl()->ShaderSource(shader, count, str, length);
691 } 697 }
692 698
693 void StencilFunc(PP_Resource context, GLenum func, GLint ref, GLuint mask) { 699 void StencilFunc(PP_Resource context_id, GLenum func, GLint ref, GLuint mask) {
694 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 700 scoped_refptr<PPB_Context3D_Impl> context =
695 Resource::GetAs<PPB_Graphics3D_Impl>(context); 701 Resource::GetAs<PPB_Context3D_Impl>(context_id);
696 graphics_3d->impl()->StencilFunc(func, ref, mask); 702 context->gles2_impl()->StencilFunc(func, ref, mask);
697 } 703 }
698 704
699 void StencilFuncSeparate( 705 void StencilFuncSeparate(
700 PP_Resource context, GLenum face, GLenum func, GLint ref, GLuint mask) { 706 PP_Resource context_id, GLenum face, GLenum func, GLint ref, GLuint mask) {
701 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 707 scoped_refptr<PPB_Context3D_Impl> context =
702 Resource::GetAs<PPB_Graphics3D_Impl>(context); 708 Resource::GetAs<PPB_Context3D_Impl>(context_id);
703 graphics_3d->impl()->StencilFuncSeparate(face, func, ref, mask); 709 context->gles2_impl()->StencilFuncSeparate(face, func, ref, mask);
704 } 710 }
705 711
706 void StencilMask(PP_Resource context, GLuint mask) { 712 void StencilMask(PP_Resource context_id, GLuint mask) {
707 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 713 scoped_refptr<PPB_Context3D_Impl> context =
708 Resource::GetAs<PPB_Graphics3D_Impl>(context); 714 Resource::GetAs<PPB_Context3D_Impl>(context_id);
709 graphics_3d->impl()->StencilMask(mask); 715 context->gles2_impl()->StencilMask(mask);
710 } 716 }
711 717
712 void StencilMaskSeparate(PP_Resource context, GLenum face, GLuint mask) { 718 void StencilMaskSeparate(PP_Resource context_id, GLenum face, GLuint mask) {
713 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 719 scoped_refptr<PPB_Context3D_Impl> context =
714 Resource::GetAs<PPB_Graphics3D_Impl>(context); 720 Resource::GetAs<PPB_Context3D_Impl>(context_id);
715 graphics_3d->impl()->StencilMaskSeparate(face, mask); 721 context->gles2_impl()->StencilMaskSeparate(face, mask);
716 } 722 }
717 723
718 void StencilOp(PP_Resource context, GLenum fail, GLenum zfail, GLenum zpass) { 724 void StencilOp(
719 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 725 PP_Resource context_id, GLenum fail, GLenum zfail, GLenum zpass) {
720 Resource::GetAs<PPB_Graphics3D_Impl>(context); 726 scoped_refptr<PPB_Context3D_Impl> context =
721 graphics_3d->impl()->StencilOp(fail, zfail, zpass); 727 Resource::GetAs<PPB_Context3D_Impl>(context_id);
728 context->gles2_impl()->StencilOp(fail, zfail, zpass);
722 } 729 }
723 730
724 void StencilOpSeparate( 731 void StencilOpSeparate(
725 PP_Resource context, GLenum face, GLenum fail, GLenum zfail, 732 PP_Resource context_id, GLenum face, GLenum fail, GLenum zfail,
726 GLenum zpass) { 733 GLenum zpass) {
727 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 734 scoped_refptr<PPB_Context3D_Impl> context =
728 Resource::GetAs<PPB_Graphics3D_Impl>(context); 735 Resource::GetAs<PPB_Context3D_Impl>(context_id);
729 graphics_3d->impl()->StencilOpSeparate(face, fail, zfail, zpass); 736 context->gles2_impl()->StencilOpSeparate(face, fail, zfail, zpass);
730 } 737 }
731 738
732 void TexImage2D( 739 void TexImage2D(
733 PP_Resource context, GLenum target, GLint level, GLint internalformat, 740 PP_Resource context_id, GLenum target, GLint level, GLint internalformat,
734 GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, 741 GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type,
735 const void* pixels) { 742 const void* pixels) {
736 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 743 scoped_refptr<PPB_Context3D_Impl> context =
737 Resource::GetAs<PPB_Graphics3D_Impl>(context); 744 Resource::GetAs<PPB_Context3D_Impl>(context_id);
738 graphics_3d->impl()->TexImage2D( 745 context->gles2_impl()->TexImage2D(
739 target, level, internalformat, width, height, border, format, type, 746 target, level, internalformat, width, height, border, format, type,
740 pixels); 747 pixels);
741 } 748 }
742 749
743 void TexParameterf( 750 void TexParameterf(
744 PP_Resource context, GLenum target, GLenum pname, GLfloat param) { 751 PP_Resource context_id, GLenum target, GLenum pname, GLfloat param) {
745 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 752 scoped_refptr<PPB_Context3D_Impl> context =
746 Resource::GetAs<PPB_Graphics3D_Impl>(context); 753 Resource::GetAs<PPB_Context3D_Impl>(context_id);
747 graphics_3d->impl()->TexParameterf(target, pname, param); 754 context->gles2_impl()->TexParameterf(target, pname, param);
748 } 755 }
749 756
750 void TexParameterfv( 757 void TexParameterfv(
751 PP_Resource context, GLenum target, GLenum pname, const GLfloat* params) { 758 PP_Resource context_id, GLenum target, GLenum pname,
752 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 759 const GLfloat* params) {
753 Resource::GetAs<PPB_Graphics3D_Impl>(context); 760 scoped_refptr<PPB_Context3D_Impl> context =
754 graphics_3d->impl()->TexParameterfv(target, pname, params); 761 Resource::GetAs<PPB_Context3D_Impl>(context_id);
762 context->gles2_impl()->TexParameterfv(target, pname, params);
755 } 763 }
756 764
757 void TexParameteri( 765 void TexParameteri(
758 PP_Resource context, GLenum target, GLenum pname, GLint param) { 766 PP_Resource context_id, GLenum target, GLenum pname, GLint param) {
759 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 767 scoped_refptr<PPB_Context3D_Impl> context =
760 Resource::GetAs<PPB_Graphics3D_Impl>(context); 768 Resource::GetAs<PPB_Context3D_Impl>(context_id);
761 graphics_3d->impl()->TexParameteri(target, pname, param); 769 context->gles2_impl()->TexParameteri(target, pname, param);
762 } 770 }
763 771
764 void TexParameteriv( 772 void TexParameteriv(
765 PP_Resource context, GLenum target, GLenum pname, const GLint* params) { 773 PP_Resource context_id, GLenum target, GLenum pname, const GLint* params) {
766 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 774 scoped_refptr<PPB_Context3D_Impl> context =
767 Resource::GetAs<PPB_Graphics3D_Impl>(context); 775 Resource::GetAs<PPB_Context3D_Impl>(context_id);
768 graphics_3d->impl()->TexParameteriv(target, pname, params); 776 context->gles2_impl()->TexParameteriv(target, pname, params);
769 } 777 }
770 778
771 void TexSubImage2D( 779 void TexSubImage2D(
772 PP_Resource context, GLenum target, GLint level, GLint xoffset, 780 PP_Resource context_id, GLenum target, GLint level, GLint xoffset,
773 GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, 781 GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type,
774 const void* pixels) { 782 const void* pixels) {
775 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 783 scoped_refptr<PPB_Context3D_Impl> context =
776 Resource::GetAs<PPB_Graphics3D_Impl>(context); 784 Resource::GetAs<PPB_Context3D_Impl>(context_id);
777 graphics_3d->impl()->TexSubImage2D( 785 context->gles2_impl()->TexSubImage2D(
778 target, level, xoffset, yoffset, width, height, format, type, pixels); 786 target, level, xoffset, yoffset, width, height, format, type, pixels);
779 } 787 }
780 788
781 void Uniform1f(PP_Resource context, GLint location, GLfloat x) { 789 void Uniform1f(PP_Resource context_id, GLint location, GLfloat x) {
782 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 790 scoped_refptr<PPB_Context3D_Impl> context =
783 Resource::GetAs<PPB_Graphics3D_Impl>(context); 791 Resource::GetAs<PPB_Context3D_Impl>(context_id);
784 graphics_3d->impl()->Uniform1f(location, x); 792 context->gles2_impl()->Uniform1f(location, x);
785 } 793 }
786 794
787 void Uniform1fv( 795 void Uniform1fv(
788 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) { 796 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) {
789 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 797 scoped_refptr<PPB_Context3D_Impl> context =
790 Resource::GetAs<PPB_Graphics3D_Impl>(context); 798 Resource::GetAs<PPB_Context3D_Impl>(context_id);
791 graphics_3d->impl()->Uniform1fv(location, count, v); 799 context->gles2_impl()->Uniform1fv(location, count, v);
792 } 800 }
793 801
794 void Uniform1i(PP_Resource context, GLint location, GLint x) { 802 void Uniform1i(PP_Resource context_id, GLint location, GLint x) {
795 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 803 scoped_refptr<PPB_Context3D_Impl> context =
796 Resource::GetAs<PPB_Graphics3D_Impl>(context); 804 Resource::GetAs<PPB_Context3D_Impl>(context_id);
797 graphics_3d->impl()->Uniform1i(location, x); 805 context->gles2_impl()->Uniform1i(location, x);
798 } 806 }
799 807
800 void Uniform1iv( 808 void Uniform1iv(
801 PP_Resource context, GLint location, GLsizei count, const GLint* v) { 809 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) {
802 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 810 scoped_refptr<PPB_Context3D_Impl> context =
803 Resource::GetAs<PPB_Graphics3D_Impl>(context); 811 Resource::GetAs<PPB_Context3D_Impl>(context_id);
804 graphics_3d->impl()->Uniform1iv(location, count, v); 812 context->gles2_impl()->Uniform1iv(location, count, v);
805 } 813 }
806 814
807 void Uniform2f(PP_Resource context, GLint location, GLfloat x, GLfloat y) { 815 void Uniform2f(PP_Resource context_id, GLint location, GLfloat x, GLfloat y) {
808 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 816 scoped_refptr<PPB_Context3D_Impl> context =
809 Resource::GetAs<PPB_Graphics3D_Impl>(context); 817 Resource::GetAs<PPB_Context3D_Impl>(context_id);
810 graphics_3d->impl()->Uniform2f(location, x, y); 818 context->gles2_impl()->Uniform2f(location, x, y);
811 } 819 }
812 820
813 void Uniform2fv( 821 void Uniform2fv(
814 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) { 822 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) {
815 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 823 scoped_refptr<PPB_Context3D_Impl> context =
816 Resource::GetAs<PPB_Graphics3D_Impl>(context); 824 Resource::GetAs<PPB_Context3D_Impl>(context_id);
817 graphics_3d->impl()->Uniform2fv(location, count, v); 825 context->gles2_impl()->Uniform2fv(location, count, v);
818 } 826 }
819 827
820 void Uniform2i(PP_Resource context, GLint location, GLint x, GLint y) { 828 void Uniform2i(PP_Resource context_id, GLint location, GLint x, GLint y) {
821 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 829 scoped_refptr<PPB_Context3D_Impl> context =
822 Resource::GetAs<PPB_Graphics3D_Impl>(context); 830 Resource::GetAs<PPB_Context3D_Impl>(context_id);
823 graphics_3d->impl()->Uniform2i(location, x, y); 831 context->gles2_impl()->Uniform2i(location, x, y);
824 } 832 }
825 833
826 void Uniform2iv( 834 void Uniform2iv(
827 PP_Resource context, GLint location, GLsizei count, const GLint* v) { 835 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) {
828 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 836 scoped_refptr<PPB_Context3D_Impl> context =
829 Resource::GetAs<PPB_Graphics3D_Impl>(context); 837 Resource::GetAs<PPB_Context3D_Impl>(context_id);
830 graphics_3d->impl()->Uniform2iv(location, count, v); 838 context->gles2_impl()->Uniform2iv(location, count, v);
831 } 839 }
832 840
833 void Uniform3f( 841 void Uniform3f(
834 PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z) { 842 PP_Resource context_id, GLint location, GLfloat x, GLfloat y, GLfloat z) {
835 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 843 scoped_refptr<PPB_Context3D_Impl> context =
836 Resource::GetAs<PPB_Graphics3D_Impl>(context); 844 Resource::GetAs<PPB_Context3D_Impl>(context_id);
837 graphics_3d->impl()->Uniform3f(location, x, y, z); 845 context->gles2_impl()->Uniform3f(location, x, y, z);
838 } 846 }
839 847
840 void Uniform3fv( 848 void Uniform3fv(
841 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) { 849 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) {
842 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 850 scoped_refptr<PPB_Context3D_Impl> context =
843 Resource::GetAs<PPB_Graphics3D_Impl>(context); 851 Resource::GetAs<PPB_Context3D_Impl>(context_id);
844 graphics_3d->impl()->Uniform3fv(location, count, v); 852 context->gles2_impl()->Uniform3fv(location, count, v);
845 } 853 }
846 854
847 void Uniform3i( 855 void Uniform3i(
848 PP_Resource context, GLint location, GLint x, GLint y, GLint z) { 856 PP_Resource context_id, GLint location, GLint x, GLint y, GLint z) {
849 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 857 scoped_refptr<PPB_Context3D_Impl> context =
850 Resource::GetAs<PPB_Graphics3D_Impl>(context); 858 Resource::GetAs<PPB_Context3D_Impl>(context_id);
851 graphics_3d->impl()->Uniform3i(location, x, y, z); 859 context->gles2_impl()->Uniform3i(location, x, y, z);
852 } 860 }
853 861
854 void Uniform3iv( 862 void Uniform3iv(
855 PP_Resource context, GLint location, GLsizei count, const GLint* v) { 863 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) {
856 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 864 scoped_refptr<PPB_Context3D_Impl> context =
857 Resource::GetAs<PPB_Graphics3D_Impl>(context); 865 Resource::GetAs<PPB_Context3D_Impl>(context_id);
858 graphics_3d->impl()->Uniform3iv(location, count, v); 866 context->gles2_impl()->Uniform3iv(location, count, v);
859 } 867 }
860 868
861 void Uniform4f( 869 void Uniform4f(
862 PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z, 870 PP_Resource context_id, GLint location, GLfloat x, GLfloat y, GLfloat z,
863 GLfloat w) { 871 GLfloat w) {
864 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 872 scoped_refptr<PPB_Context3D_Impl> context =
865 Resource::GetAs<PPB_Graphics3D_Impl>(context); 873 Resource::GetAs<PPB_Context3D_Impl>(context_id);
866 graphics_3d->impl()->Uniform4f(location, x, y, z, w); 874 context->gles2_impl()->Uniform4f(location, x, y, z, w);
867 } 875 }
868 876
869 void Uniform4fv( 877 void Uniform4fv(
870 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) { 878 PP_Resource context_id, GLint location, GLsizei count, const GLfloat* v) {
871 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 879 scoped_refptr<PPB_Context3D_Impl> context =
872 Resource::GetAs<PPB_Graphics3D_Impl>(context); 880 Resource::GetAs<PPB_Context3D_Impl>(context_id);
873 graphics_3d->impl()->Uniform4fv(location, count, v); 881 context->gles2_impl()->Uniform4fv(location, count, v);
874 } 882 }
875 883
876 void Uniform4i( 884 void Uniform4i(
877 PP_Resource context, GLint location, GLint x, GLint y, GLint z, GLint w) { 885 PP_Resource context_id, GLint location, GLint x, GLint y, GLint z,
878 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 886 GLint w) {
879 Resource::GetAs<PPB_Graphics3D_Impl>(context); 887 scoped_refptr<PPB_Context3D_Impl> context =
880 graphics_3d->impl()->Uniform4i(location, x, y, z, w); 888 Resource::GetAs<PPB_Context3D_Impl>(context_id);
889 context->gles2_impl()->Uniform4i(location, x, y, z, w);
881 } 890 }
882 891
883 void Uniform4iv( 892 void Uniform4iv(
884 PP_Resource context, GLint location, GLsizei count, const GLint* v) { 893 PP_Resource context_id, GLint location, GLsizei count, const GLint* v) {
885 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 894 scoped_refptr<PPB_Context3D_Impl> context =
886 Resource::GetAs<PPB_Graphics3D_Impl>(context); 895 Resource::GetAs<PPB_Context3D_Impl>(context_id);
887 graphics_3d->impl()->Uniform4iv(location, count, v); 896 context->gles2_impl()->Uniform4iv(location, count, v);
888 } 897 }
889 898
890 void UniformMatrix2fv( 899 void UniformMatrix2fv(
891 PP_Resource context, GLint location, GLsizei count, GLboolean transpose, 900 PP_Resource context_id, GLint location, GLsizei count, GLboolean transpose,
892 const GLfloat* value) { 901 const GLfloat* value) {
893 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 902 scoped_refptr<PPB_Context3D_Impl> context =
894 Resource::GetAs<PPB_Graphics3D_Impl>(context); 903 Resource::GetAs<PPB_Context3D_Impl>(context_id);
895 graphics_3d->impl()->UniformMatrix2fv(location, count, transpose, value); 904 context->gles2_impl()->UniformMatrix2fv(location, count, transpose, value);
896 } 905 }
897 906
898 void UniformMatrix3fv( 907 void UniformMatrix3fv(
899 PP_Resource context, GLint location, GLsizei count, GLboolean transpose, 908 PP_Resource context_id, GLint location, GLsizei count, GLboolean transpose,
900 const GLfloat* value) { 909 const GLfloat* value) {
901 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 910 scoped_refptr<PPB_Context3D_Impl> context =
902 Resource::GetAs<PPB_Graphics3D_Impl>(context); 911 Resource::GetAs<PPB_Context3D_Impl>(context_id);
903 graphics_3d->impl()->UniformMatrix3fv(location, count, transpose, value); 912 context->gles2_impl()->UniformMatrix3fv(location, count, transpose, value);
904 } 913 }
905 914
906 void UniformMatrix4fv( 915 void UniformMatrix4fv(
907 PP_Resource context, GLint location, GLsizei count, GLboolean transpose, 916 PP_Resource context_id, GLint location, GLsizei count, GLboolean transpose,
908 const GLfloat* value) { 917 const GLfloat* value) {
909 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 918 scoped_refptr<PPB_Context3D_Impl> context =
910 Resource::GetAs<PPB_Graphics3D_Impl>(context); 919 Resource::GetAs<PPB_Context3D_Impl>(context_id);
911 graphics_3d->impl()->UniformMatrix4fv(location, count, transpose, value); 920 context->gles2_impl()->UniformMatrix4fv(location, count, transpose, value);
912 } 921 }
913 922
914 void UseProgram(PP_Resource context, GLuint program) { 923 void UseProgram(PP_Resource context_id, GLuint program) {
915 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 924 scoped_refptr<PPB_Context3D_Impl> context =
916 Resource::GetAs<PPB_Graphics3D_Impl>(context); 925 Resource::GetAs<PPB_Context3D_Impl>(context_id);
917 graphics_3d->impl()->UseProgram(program); 926 context->gles2_impl()->UseProgram(program);
918 } 927 }
919 928
920 void ValidateProgram(PP_Resource context, GLuint program) { 929 void ValidateProgram(PP_Resource context_id, GLuint program) {
921 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 930 scoped_refptr<PPB_Context3D_Impl> context =
922 Resource::GetAs<PPB_Graphics3D_Impl>(context); 931 Resource::GetAs<PPB_Context3D_Impl>(context_id);
923 graphics_3d->impl()->ValidateProgram(program); 932 context->gles2_impl()->ValidateProgram(program);
924 } 933 }
925 934
926 void VertexAttrib1f(PP_Resource context, GLuint indx, GLfloat x) { 935 void VertexAttrib1f(PP_Resource context_id, GLuint indx, GLfloat x) {
927 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 936 scoped_refptr<PPB_Context3D_Impl> context =
928 Resource::GetAs<PPB_Graphics3D_Impl>(context); 937 Resource::GetAs<PPB_Context3D_Impl>(context_id);
929 graphics_3d->impl()->VertexAttrib1f(indx, x); 938 context->gles2_impl()->VertexAttrib1f(indx, x);
930 } 939 }
931 940
932 void VertexAttrib1fv(PP_Resource context, GLuint indx, const GLfloat* values) { 941 void VertexAttrib1fv(
933 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 942 PP_Resource context_id, GLuint indx, const GLfloat* values) {
934 Resource::GetAs<PPB_Graphics3D_Impl>(context); 943 scoped_refptr<PPB_Context3D_Impl> context =
935 graphics_3d->impl()->VertexAttrib1fv(indx, values); 944 Resource::GetAs<PPB_Context3D_Impl>(context_id);
936 } 945 context->gles2_impl()->VertexAttrib1fv(indx, values);
937 946 }
938 void VertexAttrib2f(PP_Resource context, GLuint indx, GLfloat x, GLfloat y) { 947
939 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 948 void VertexAttrib2f(
940 Resource::GetAs<PPB_Graphics3D_Impl>(context); 949 PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y) {
941 graphics_3d->impl()->VertexAttrib2f(indx, x, y); 950 scoped_refptr<PPB_Context3D_Impl> context =
942 } 951 Resource::GetAs<PPB_Context3D_Impl>(context_id);
943 952 context->gles2_impl()->VertexAttrib2f(indx, x, y);
944 void VertexAttrib2fv(PP_Resource context, GLuint indx, const GLfloat* values) { 953 }
945 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 954
946 Resource::GetAs<PPB_Graphics3D_Impl>(context); 955 void VertexAttrib2fv(
947 graphics_3d->impl()->VertexAttrib2fv(indx, values); 956 PP_Resource context_id, GLuint indx, const GLfloat* values) {
957 scoped_refptr<PPB_Context3D_Impl> context =
958 Resource::GetAs<PPB_Context3D_Impl>(context_id);
959 context->gles2_impl()->VertexAttrib2fv(indx, values);
948 } 960 }
949 961
950 void VertexAttrib3f( 962 void VertexAttrib3f(
951 PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z) { 963 PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
952 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 964 scoped_refptr<PPB_Context3D_Impl> context =
953 Resource::GetAs<PPB_Graphics3D_Impl>(context); 965 Resource::GetAs<PPB_Context3D_Impl>(context_id);
954 graphics_3d->impl()->VertexAttrib3f(indx, x, y, z); 966 context->gles2_impl()->VertexAttrib3f(indx, x, y, z);
955 } 967 }
956 968
957 void VertexAttrib3fv(PP_Resource context, GLuint indx, const GLfloat* values) { 969 void VertexAttrib3fv(
958 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 970 PP_Resource context_id, GLuint indx, const GLfloat* values) {
959 Resource::GetAs<PPB_Graphics3D_Impl>(context); 971 scoped_refptr<PPB_Context3D_Impl> context =
960 graphics_3d->impl()->VertexAttrib3fv(indx, values); 972 Resource::GetAs<PPB_Context3D_Impl>(context_id);
973 context->gles2_impl()->VertexAttrib3fv(indx, values);
961 } 974 }
962 975
963 void VertexAttrib4f( 976 void VertexAttrib4f(
964 PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z, 977 PP_Resource context_id, GLuint indx, GLfloat x, GLfloat y, GLfloat z,
965 GLfloat w) { 978 GLfloat w) {
966 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 979 scoped_refptr<PPB_Context3D_Impl> context =
967 Resource::GetAs<PPB_Graphics3D_Impl>(context); 980 Resource::GetAs<PPB_Context3D_Impl>(context_id);
968 graphics_3d->impl()->VertexAttrib4f(indx, x, y, z, w); 981 context->gles2_impl()->VertexAttrib4f(indx, x, y, z, w);
969 } 982 }
970 983
971 void VertexAttrib4fv(PP_Resource context, GLuint indx, const GLfloat* values) { 984 void VertexAttrib4fv(
972 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 985 PP_Resource context_id, GLuint indx, const GLfloat* values) {
973 Resource::GetAs<PPB_Graphics3D_Impl>(context); 986 scoped_refptr<PPB_Context3D_Impl> context =
974 graphics_3d->impl()->VertexAttrib4fv(indx, values); 987 Resource::GetAs<PPB_Context3D_Impl>(context_id);
988 context->gles2_impl()->VertexAttrib4fv(indx, values);
975 } 989 }
976 990
977 void VertexAttribPointer( 991 void VertexAttribPointer(
978 PP_Resource context, GLuint indx, GLint size, GLenum type, 992 PP_Resource context_id, GLuint indx, GLint size, GLenum type,
979 GLboolean normalized, GLsizei stride, const void* ptr) { 993 GLboolean normalized, GLsizei stride, const void* ptr) {
980 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 994 scoped_refptr<PPB_Context3D_Impl> context =
981 Resource::GetAs<PPB_Graphics3D_Impl>(context); 995 Resource::GetAs<PPB_Context3D_Impl>(context_id);
982 graphics_3d->impl()->VertexAttribPointer( 996 context->gles2_impl()->VertexAttribPointer(
983 indx, size, type, normalized, stride, ptr); 997 indx, size, type, normalized, stride, ptr);
984 } 998 }
985 999
986 void Viewport( 1000 void Viewport(
987 PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height) { 1001 PP_Resource context_id, GLint x, GLint y, GLsizei width, GLsizei height) {
988 scoped_refptr<PPB_Graphics3D_Impl> graphics_3d = 1002 scoped_refptr<PPB_Context3D_Impl> context =
989 Resource::GetAs<PPB_Graphics3D_Impl>(context); 1003 Resource::GetAs<PPB_Context3D_Impl>(context_id);
990 graphics_3d->impl()->Viewport(x, y, width, height); 1004 context->gles2_impl()->Viewport(x, y, width, height);
991 } 1005 }
992 1006
993 1007
994 const struct PPB_OpenGLES2_Dev ppb_opengles2 = { 1008 const struct PPB_OpenGLES2_Dev ppb_opengles2 = {
995 &ActiveTexture, 1009 &ActiveTexture,
996 &AttachShader, 1010 &AttachShader,
997 &BindAttribLocation, 1011 &BindAttribLocation,
998 &BindBuffer, 1012 &BindBuffer,
999 &BindFramebuffer, 1013 &BindFramebuffer,
1000 &BindRenderbuffer, 1014 &BindRenderbuffer,
1001 &BindTexture, 1015 &BindTexture,
1002 &BlendColor, 1016 &BlendColor,
1003 &BlendEquation, 1017 &BlendEquation,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 &VertexAttrib3f, 1145 &VertexAttrib3f,
1132 &VertexAttrib3fv, 1146 &VertexAttrib3fv,
1133 &VertexAttrib4f, 1147 &VertexAttrib4f,
1134 &VertexAttrib4fv, 1148 &VertexAttrib4fv,
1135 &VertexAttribPointer, 1149 &VertexAttribPointer,
1136 &Viewport 1150 &Viewport
1137 }; 1151 };
1138 1152
1139 } // namespace 1153 } // namespace
1140 1154
1141 const PPB_OpenGLES2_Dev* PPB_Graphics3D_Impl::GetOpenGLES2Interface() { 1155 const PPB_OpenGLES2_Dev* PPB_OpenGLES_Impl::GetInterface() {
1142 return &ppb_opengles2; 1156 return &ppb_opengles2;
1143 } 1157 }
1144 1158
1145 } // namespace ppapi 1159 } // namespace ppapi
1146 } // namespace webkit 1160 } // namespace webkit
1147 1161
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_opengles_impl.h ('k') | webkit/plugins/ppapi/resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698