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

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContextBase.h

Issue 606653006: bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 10 matching lines...) Expand all
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef WebGLRenderingContextBase_h 26 #ifndef WebGLRenderingContextBase_h
27 #define WebGLRenderingContextBase_h 27 #define WebGLRenderingContextBase_h
28 28
29 #include "bindings/core/v8/Nullable.h" 29 #include "bindings/core/v8/Nullable.h"
30 #include "core/dom/ActiveDOMObject.h" 30 #include "core/dom/ActiveDOMObject.h"
31 #include "core/dom/DOMTypedArray.h"
31 #include "core/html/canvas/CanvasRenderingContext.h" 32 #include "core/html/canvas/CanvasRenderingContext.h"
32 #include "core/html/canvas/WebGLExtensionName.h" 33 #include "core/html/canvas/WebGLExtensionName.h"
33 #include "core/html/canvas/WebGLGetInfo.h" 34 #include "core/html/canvas/WebGLGetInfo.h"
34 #include "core/page/Page.h" 35 #include "core/page/Page.h"
35 #include "core/rendering/RenderBoxModelObject.h" 36 #include "core/rendering/RenderBoxModelObject.h"
36 #include "platform/Timer.h" 37 #include "platform/Timer.h"
37 #include "platform/graphics/GraphicsTypes3D.h" 38 #include "platform/graphics/GraphicsTypes3D.h"
38 #include "platform/graphics/ImageBuffer.h" 39 #include "platform/graphics/ImageBuffer.h"
39 #include "platform/graphics/gpu/DrawingBuffer.h" 40 #include "platform/graphics/gpu/DrawingBuffer.h"
40 #include "platform/graphics/gpu/Extensions3DUtil.h" 41 #include "platform/graphics/gpu/Extensions3DUtil.h"
41 #include "platform/graphics/gpu/WebGLImageConversion.h" 42 #include "platform/graphics/gpu/WebGLImageConversion.h"
42 #include "public/platform/WebGraphicsContext3D.h" 43 #include "public/platform/WebGraphicsContext3D.h"
43 #include "wtf/Float32Array.h"
44 #include "wtf/Int32Array.h"
45 #include "wtf/OwnPtr.h" 44 #include "wtf/OwnPtr.h"
46 #include "wtf/text/WTFString.h" 45 #include "wtf/text/WTFString.h"
47 46
48 namespace blink { 47 namespace blink {
49 class WebLayer; 48 class WebLayer;
50 } 49 }
51 50
52 namespace blink { 51 namespace blink {
53 52
54 class ANGLEInstancedArrays; 53 class ANGLEInstancedArrays;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 void bindFramebuffer(GLenum target, WebGLFramebuffer*); 119 void bindFramebuffer(GLenum target, WebGLFramebuffer*);
121 void bindRenderbuffer(GLenum target, WebGLRenderbuffer*); 120 void bindRenderbuffer(GLenum target, WebGLRenderbuffer*);
122 void bindTexture(GLenum target, WebGLTexture*); 121 void bindTexture(GLenum target, WebGLTexture*);
123 void blendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); 122 void blendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
124 void blendEquation(GLenum mode); 123 void blendEquation(GLenum mode);
125 void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); 124 void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
126 void blendFunc(GLenum sfactor, GLenum dfactor); 125 void blendFunc(GLenum sfactor, GLenum dfactor);
127 void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); 126 void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
128 127
129 void bufferData(GLenum target, long long size, GLenum usage); 128 void bufferData(GLenum target, long long size, GLenum usage);
130 void bufferData(GLenum target, ArrayBuffer* data, GLenum usage); 129 void bufferData(GLenum target, DOMArrayBuffer* data, GLenum usage);
131 void bufferData(GLenum target, ArrayBufferView* data, GLenum usage); 130 void bufferData(GLenum target, DOMArrayBufferView* data, GLenum usage);
132 void bufferSubData(GLenum target, long long offset, ArrayBuffer* data); 131 void bufferSubData(GLenum target, long long offset, DOMArrayBuffer* data);
133 void bufferSubData(GLenum target, long long offset, ArrayBufferView* data); 132 void bufferSubData(GLenum target, long long offset, DOMArrayBufferView* data );
134 133
135 GLenum checkFramebufferStatus(GLenum target); 134 GLenum checkFramebufferStatus(GLenum target);
136 void clear(GLbitfield mask); 135 void clear(GLbitfield mask);
137 void clearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); 136 void clearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
138 void clearDepth(GLfloat); 137 void clearDepth(GLfloat);
139 void clearStencil(GLint); 138 void clearStencil(GLint);
140 void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alp ha); 139 void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alp ha);
141 void compileShader(WebGLShader*); 140 void compileShader(WebGLShader*);
142 141
143 void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, ArrayBufferView* data); 142 void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, DOMArrayBufferView* data);
144 void compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLin t yoffset, GLsizei width, GLsizei height, GLenum format, ArrayBufferView* data); 143 void compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLin t yoffset, GLsizei width, GLsizei height, GLenum format, DOMArrayBufferView* dat a);
145 144
146 void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); 145 void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
147 void copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoff set, GLint x, GLint y, GLsizei width, GLsizei height); 146 void copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoff set, GLint x, GLint y, GLsizei width, GLsizei height);
148 147
149 PassRefPtrWillBeRawPtr<WebGLBuffer> createBuffer(); 148 PassRefPtrWillBeRawPtr<WebGLBuffer> createBuffer();
150 PassRefPtrWillBeRawPtr<WebGLFramebuffer> createFramebuffer(); 149 PassRefPtrWillBeRawPtr<WebGLFramebuffer> createFramebuffer();
151 PassRefPtrWillBeRawPtr<WebGLProgram> createProgram(); 150 PassRefPtrWillBeRawPtr<WebGLProgram> createProgram();
152 PassRefPtrWillBeRawPtr<WebGLRenderbuffer> createRenderbuffer(); 151 PassRefPtrWillBeRawPtr<WebGLRenderbuffer> createRenderbuffer();
153 PassRefPtrWillBeRawPtr<WebGLShader> createShader(GLenum type); 152 PassRefPtrWillBeRawPtr<WebGLShader> createShader(GLenum type);
154 PassRefPtrWillBeRawPtr<WebGLTexture> createTexture(); 153 PassRefPtrWillBeRawPtr<WebGLTexture> createTexture();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 GLboolean isFramebuffer(WebGLFramebuffer*); 214 GLboolean isFramebuffer(WebGLFramebuffer*);
216 GLboolean isProgram(WebGLProgram*); 215 GLboolean isProgram(WebGLProgram*);
217 GLboolean isRenderbuffer(WebGLRenderbuffer*); 216 GLboolean isRenderbuffer(WebGLRenderbuffer*);
218 GLboolean isShader(WebGLShader*); 217 GLboolean isShader(WebGLShader*);
219 GLboolean isTexture(WebGLTexture*); 218 GLboolean isTexture(WebGLTexture*);
220 219
221 void lineWidth(GLfloat); 220 void lineWidth(GLfloat);
222 void linkProgram(WebGLProgram*); 221 void linkProgram(WebGLProgram*);
223 void pixelStorei(GLenum pname, GLint param); 222 void pixelStorei(GLenum pname, GLint param);
224 void polygonOffset(GLfloat factor, GLfloat units); 223 void polygonOffset(GLfloat factor, GLfloat units);
225 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum form at, GLenum type, ArrayBufferView* pixels); 224 void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum form at, GLenum type, DOMArrayBufferView* pixels);
226 void renderbufferStorage(GLenum target, GLenum internalformat, GLsizei width , GLsizei height); 225 void renderbufferStorage(GLenum target, GLenum internalformat, GLsizei width , GLsizei height);
227 void sampleCoverage(GLfloat value, GLboolean invert); 226 void sampleCoverage(GLfloat value, GLboolean invert);
228 void scissor(GLint x, GLint y, GLsizei width, GLsizei height); 227 void scissor(GLint x, GLint y, GLsizei width, GLsizei height);
229 void shaderSource(WebGLShader*, const String&); 228 void shaderSource(WebGLShader*, const String&);
230 void stencilFunc(GLenum func, GLint ref, GLuint mask); 229 void stencilFunc(GLenum func, GLint ref, GLuint mask);
231 void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); 230 void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
232 void stencilMask(GLuint); 231 void stencilMask(GLuint);
233 void stencilMaskSeparate(GLenum face, GLuint mask); 232 void stencilMaskSeparate(GLenum face, GLuint mask);
234 void stencilOp(GLenum fail, GLenum zfail, GLenum zpass); 233 void stencilOp(GLenum fail, GLenum zfail, GLenum zpass);
235 void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) ; 234 void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) ;
236 235
237 void texImage2D(GLenum target, GLint level, GLenum internalformat, 236 void texImage2D(GLenum target, GLint level, GLenum internalformat,
238 GLsizei width, GLsizei height, GLint border, 237 GLsizei width, GLsizei height, GLint border,
239 GLenum format, GLenum type, ArrayBufferView*, ExceptionState&); 238 GLenum format, GLenum type, DOMArrayBufferView*, ExceptionState&);
240 void texImage2D(GLenum target, GLint level, GLenum internalformat, 239 void texImage2D(GLenum target, GLint level, GLenum internalformat,
241 GLenum format, GLenum type, ImageData*, ExceptionState&); 240 GLenum format, GLenum type, ImageData*, ExceptionState&);
242 void texImage2D(GLenum target, GLint level, GLenum internalformat, 241 void texImage2D(GLenum target, GLint level, GLenum internalformat,
243 GLenum format, GLenum type, HTMLImageElement*, ExceptionState&); 242 GLenum format, GLenum type, HTMLImageElement*, ExceptionState&);
244 void texImage2D(GLenum target, GLint level, GLenum internalformat, 243 void texImage2D(GLenum target, GLint level, GLenum internalformat,
245 GLenum format, GLenum type, HTMLCanvasElement*, ExceptionState&); 244 GLenum format, GLenum type, HTMLCanvasElement*, ExceptionState&);
246 void texImage2D(GLenum target, GLint level, GLenum internalformat, 245 void texImage2D(GLenum target, GLint level, GLenum internalformat,
247 GLenum format, GLenum type, HTMLVideoElement*, ExceptionState&); 246 GLenum format, GLenum type, HTMLVideoElement*, ExceptionState&);
248 247
249 void texParameterf(GLenum target, GLenum pname, GLfloat param); 248 void texParameterf(GLenum target, GLenum pname, GLfloat param);
250 void texParameteri(GLenum target, GLenum pname, GLint param); 249 void texParameteri(GLenum target, GLenum pname, GLint param);
251 250
252 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 251 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
253 GLsizei width, GLsizei height, 252 GLsizei width, GLsizei height,
254 GLenum format, GLenum type, ArrayBufferView*, ExceptionState&); 253 GLenum format, GLenum type, DOMArrayBufferView*, ExceptionState&);
255 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 254 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
256 GLenum format, GLenum type, ImageData*, ExceptionState&); 255 GLenum format, GLenum type, ImageData*, ExceptionState&);
257 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 256 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
258 GLenum format, GLenum type, HTMLImageElement*, ExceptionState&); 257 GLenum format, GLenum type, HTMLImageElement*, ExceptionState&);
259 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 258 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
260 GLenum format, GLenum type, HTMLCanvasElement*, ExceptionState&); 259 GLenum format, GLenum type, HTMLCanvasElement*, ExceptionState&);
261 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, 260 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
262 GLenum format, GLenum type, HTMLVideoElement*, ExceptionState&); 261 GLenum format, GLenum type, HTMLVideoElement*, ExceptionState&);
263 262
264 void uniform1f(const WebGLUniformLocation*, GLfloat x); 263 void uniform1f(const WebGLUniformLocation*, GLfloat x);
265 void uniform1fv(const WebGLUniformLocation*, Float32Array* v); 264 void uniform1fv(const WebGLUniformLocation*, DOMFloat32Array* v);
266 void uniform1fv(const WebGLUniformLocation*, GLfloat* v, GLsizei); 265 void uniform1fv(const WebGLUniformLocation*, GLfloat* v, GLsizei);
267 void uniform1i(const WebGLUniformLocation*, GLint x); 266 void uniform1i(const WebGLUniformLocation*, GLint x);
268 void uniform1iv(const WebGLUniformLocation*, Int32Array* v); 267 void uniform1iv(const WebGLUniformLocation*, DOMInt32Array* v);
269 void uniform1iv(const WebGLUniformLocation*, GLint* v, GLsizei); 268 void uniform1iv(const WebGLUniformLocation*, GLint* v, GLsizei);
270 void uniform2f(const WebGLUniformLocation*, GLfloat x, GLfloat y); 269 void uniform2f(const WebGLUniformLocation*, GLfloat x, GLfloat y);
271 void uniform2fv(const WebGLUniformLocation*, Float32Array* v); 270 void uniform2fv(const WebGLUniformLocation*, DOMFloat32Array* v);
272 void uniform2fv(const WebGLUniformLocation*, GLfloat* v, GLsizei); 271 void uniform2fv(const WebGLUniformLocation*, GLfloat* v, GLsizei);
273 void uniform2i(const WebGLUniformLocation*, GLint x, GLint y); 272 void uniform2i(const WebGLUniformLocation*, GLint x, GLint y);
274 void uniform2iv(const WebGLUniformLocation*, Int32Array* v); 273 void uniform2iv(const WebGLUniformLocation*, DOMInt32Array* v);
275 void uniform2iv(const WebGLUniformLocation*, GLint* v, GLsizei); 274 void uniform2iv(const WebGLUniformLocation*, GLint* v, GLsizei);
276 void uniform3f(const WebGLUniformLocation*, GLfloat x, GLfloat y, GLfloat z) ; 275 void uniform3f(const WebGLUniformLocation*, GLfloat x, GLfloat y, GLfloat z) ;
277 void uniform3fv(const WebGLUniformLocation*, Float32Array* v); 276 void uniform3fv(const WebGLUniformLocation*, DOMFloat32Array* v);
278 void uniform3fv(const WebGLUniformLocation*, GLfloat* v, GLsizei); 277 void uniform3fv(const WebGLUniformLocation*, GLfloat* v, GLsizei);
279 void uniform3i(const WebGLUniformLocation*, GLint x, GLint y, GLint z); 278 void uniform3i(const WebGLUniformLocation*, GLint x, GLint y, GLint z);
280 void uniform3iv(const WebGLUniformLocation*, Int32Array* v); 279 void uniform3iv(const WebGLUniformLocation*, DOMInt32Array* v);
281 void uniform3iv(const WebGLUniformLocation*, GLint* v, GLsizei); 280 void uniform3iv(const WebGLUniformLocation*, GLint* v, GLsizei);
282 void uniform4f(const WebGLUniformLocation*, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 281 void uniform4f(const WebGLUniformLocation*, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
283 void uniform4fv(const WebGLUniformLocation*, Float32Array* v); 282 void uniform4fv(const WebGLUniformLocation*, DOMFloat32Array* v);
284 void uniform4fv(const WebGLUniformLocation*, GLfloat* v, GLsizei); 283 void uniform4fv(const WebGLUniformLocation*, GLfloat* v, GLsizei);
285 void uniform4i(const WebGLUniformLocation*, GLint x, GLint y, GLint z, GLint w); 284 void uniform4i(const WebGLUniformLocation*, GLint x, GLint y, GLint z, GLint w);
286 void uniform4iv(const WebGLUniformLocation*, Int32Array* v); 285 void uniform4iv(const WebGLUniformLocation*, DOMInt32Array* v);
287 void uniform4iv(const WebGLUniformLocation*, GLint* v, GLsizei); 286 void uniform4iv(const WebGLUniformLocation*, GLint* v, GLsizei);
288 void uniformMatrix2fv(const WebGLUniformLocation*, GLboolean transpose, Floa t32Array* value); 287 void uniformMatrix2fv(const WebGLUniformLocation*, GLboolean transpose, DOMF loat32Array* value);
289 void uniformMatrix2fv(const WebGLUniformLocation*, GLboolean transpose, GLfl oat* value, GLsizei); 288 void uniformMatrix2fv(const WebGLUniformLocation*, GLboolean transpose, GLfl oat* value, GLsizei);
290 void uniformMatrix3fv(const WebGLUniformLocation*, GLboolean transpose, Floa t32Array* value); 289 void uniformMatrix3fv(const WebGLUniformLocation*, GLboolean transpose, DOMF loat32Array* value);
291 void uniformMatrix3fv(const WebGLUniformLocation*, GLboolean transpose, GLfl oat* value, GLsizei); 290 void uniformMatrix3fv(const WebGLUniformLocation*, GLboolean transpose, GLfl oat* value, GLsizei);
292 void uniformMatrix4fv(const WebGLUniformLocation*, GLboolean transpose, Floa t32Array* value); 291 void uniformMatrix4fv(const WebGLUniformLocation*, GLboolean transpose, DOMF loat32Array* value);
293 void uniformMatrix4fv(const WebGLUniformLocation*, GLboolean transpose, GLfl oat* value, GLsizei); 292 void uniformMatrix4fv(const WebGLUniformLocation*, GLboolean transpose, GLfl oat* value, GLsizei);
294 293
295 void useProgram(WebGLProgram*); 294 void useProgram(WebGLProgram*);
296 void validateProgram(WebGLProgram*); 295 void validateProgram(WebGLProgram*);
297 296
298 void vertexAttrib1f(GLuint index, GLfloat x); 297 void vertexAttrib1f(GLuint index, GLfloat x);
299 void vertexAttrib1fv(GLuint index, Float32Array* values); 298 void vertexAttrib1fv(GLuint index, DOMFloat32Array* values);
300 void vertexAttrib1fv(GLuint index, GLfloat* values, GLsizei); 299 void vertexAttrib1fv(GLuint index, GLfloat* values, GLsizei);
301 void vertexAttrib2f(GLuint index, GLfloat x, GLfloat y); 300 void vertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
302 void vertexAttrib2fv(GLuint index, Float32Array* values); 301 void vertexAttrib2fv(GLuint index, DOMFloat32Array* values);
303 void vertexAttrib2fv(GLuint index, GLfloat* values, GLsizei); 302 void vertexAttrib2fv(GLuint index, GLfloat* values, GLsizei);
304 void vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z); 303 void vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
305 void vertexAttrib3fv(GLuint index, Float32Array* values); 304 void vertexAttrib3fv(GLuint index, DOMFloat32Array* values);
306 void vertexAttrib3fv(GLuint index, GLfloat* values, GLsizei); 305 void vertexAttrib3fv(GLuint index, GLfloat* values, GLsizei);
307 void vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); 306 void vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
308 void vertexAttrib4fv(GLuint index, Float32Array* values); 307 void vertexAttrib4fv(GLuint index, DOMFloat32Array* values);
309 void vertexAttrib4fv(GLuint index, GLfloat* values, GLsizei); 308 void vertexAttrib4fv(GLuint index, GLfloat* values, GLsizei);
310 void vertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean no rmalized, 309 void vertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean no rmalized,
311 GLsizei stride, long long offset); 310 GLsizei stride, long long offset);
312 311
313 void vertexAttribDivisorANGLE(GLuint index, GLuint divisor); 312 void vertexAttribDivisorANGLE(GLuint index, GLuint divisor);
314 313
315 void viewport(GLint x, GLint y, GLsizei width, GLsizei height); 314 void viewport(GLint x, GLint y, GLsizei width, GLsizei height);
316 315
317 // WEBGL_lose_context support 316 // WEBGL_lose_context support
318 enum LostContextMode { 317 enum LostContextMode {
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 bool validateTexFuncParameters(const char* functionName, TexFuncValidationFu nctionType, GLenum target, GLint level, GLenum internalformat, GLsizei width, GL sizei height, GLint border, GLenum format, GLenum type); 789 bool validateTexFuncParameters(const char* functionName, TexFuncValidationFu nctionType, GLenum target, GLint level, GLenum internalformat, GLsizei width, GL sizei height, GLint border, GLenum format, GLenum type);
791 790
792 enum NullDisposition { 791 enum NullDisposition {
793 NullAllowed, 792 NullAllowed,
794 NullNotAllowed 793 NullNotAllowed
795 }; 794 };
796 795
797 // Helper function to validate that the given ArrayBufferView 796 // Helper function to validate that the given ArrayBufferView
798 // is of the correct type and contains enough data for the texImage call. 797 // is of the correct type and contains enough data for the texImage call.
799 // Generates GL error and returns false if parameters are invalid. 798 // Generates GL error and returns false if parameters are invalid.
800 bool validateTexFuncData(const char* functionName, GLint level, GLsizei widt h, GLsizei height, GLenum format, GLenum type, ArrayBufferView* pixels, NullDisp osition); 799 bool validateTexFuncData(const char* functionName, GLint level, GLsizei widt h, GLsizei height, GLenum format, GLenum type, DOMArrayBufferView* pixels, NullD isposition);
801 800
802 // Helper function to validate a given texture format is settable as in 801 // Helper function to validate a given texture format is settable as in
803 // you can supply data to texImage2D, or call texImage2D, copyTexImage2D and 802 // you can supply data to texImage2D, or call texImage2D, copyTexImage2D and
804 // copyTexSubImage2D. 803 // copyTexSubImage2D.
805 // Generates GL error and returns false if the format is not settable. 804 // Generates GL error and returns false if the format is not settable.
806 bool validateSettableTexFormat(const char* functionName, GLenum format); 805 bool validateSettableTexFormat(const char* functionName, GLenum format);
807 806
808 // Helper function to validate compressed texture data is correct size 807 // Helper function to validate compressed texture data is correct size
809 // for the given format and dimensions. 808 // for the given format and dimensions.
810 bool validateCompressedTexFuncData(const char* functionName, GLsizei width, GLsizei height, GLenum format, ArrayBufferView* pixels); 809 bool validateCompressedTexFuncData(const char* functionName, GLsizei width, GLsizei height, GLenum format, DOMArrayBufferView* pixels);
811 810
812 // Helper function for validating compressed texture formats. 811 // Helper function for validating compressed texture formats.
813 bool validateCompressedTexFormat(GLenum format); 812 bool validateCompressedTexFormat(GLenum format);
814 813
815 // Helper function to validate compressed texture dimensions are valid for 814 // Helper function to validate compressed texture dimensions are valid for
816 // the given format. 815 // the given format.
817 bool validateCompressedTexDimensions(const char* functionName, TexFuncValida tionFunctionType, GLenum target, GLint level, GLsizei width, GLsizei height, GLe num format); 816 bool validateCompressedTexDimensions(const char* functionName, TexFuncValida tionFunctionType, GLenum target, GLint level, GLsizei width, GLsizei height, GLe num format);
818 817
819 // Helper function to validate compressed texture dimensions are valid for 818 // Helper function to validate compressed texture dimensions are valid for
820 // the given format. 819 // the given format.
(...skipping 25 matching lines...) Expand all
846 // Helper function to validate blend equation mode. 845 // Helper function to validate blend equation mode.
847 bool validateBlendEquation(const char* functionName, GLenum); 846 bool validateBlendEquation(const char* functionName, GLenum);
848 847
849 // Helper function to validate blend func factors. 848 // Helper function to validate blend func factors.
850 bool validateBlendFuncFactors(const char* functionName, GLenum src, GLenum d st); 849 bool validateBlendFuncFactors(const char* functionName, GLenum src, GLenum d st);
851 850
852 // Helper function to validate a GL capability. 851 // Helper function to validate a GL capability.
853 bool validateCapability(const char* functionName, GLenum); 852 bool validateCapability(const char* functionName, GLenum);
854 853
855 // Helper function to validate input parameters for uniform functions. 854 // Helper function to validate input parameters for uniform functions.
856 bool validateUniformParameters(const char* functionName, const WebGLUniformL ocation*, Float32Array*, GLsizei mod); 855 bool validateUniformParameters(const char* functionName, const WebGLUniformL ocation*, DOMFloat32Array*, GLsizei mod);
857 bool validateUniformParameters(const char* functionName, const WebGLUniformL ocation*, Int32Array*, GLsizei mod); 856 bool validateUniformParameters(const char* functionName, const WebGLUniformL ocation*, DOMInt32Array*, GLsizei mod);
858 bool validateUniformParameters(const char* functionName, const WebGLUniformL ocation*, void*, GLsizei, GLsizei mod); 857 bool validateUniformParameters(const char* functionName, const WebGLUniformL ocation*, void*, GLsizei, GLsizei mod);
859 bool validateUniformMatrixParameters(const char* functionName, const WebGLUn iformLocation*, GLboolean transpose, Float32Array*, GLsizei mod); 858 bool validateUniformMatrixParameters(const char* functionName, const WebGLUn iformLocation*, GLboolean transpose, DOMFloat32Array*, GLsizei mod);
860 bool validateUniformMatrixParameters(const char* functionName, const WebGLUn iformLocation*, GLboolean transpose, void*, GLsizei, GLsizei mod); 859 bool validateUniformMatrixParameters(const char* functionName, const WebGLUn iformLocation*, GLboolean transpose, void*, GLsizei, GLsizei mod);
861 860
862 // Helper function to validate the target for bufferData. 861 // Helper function to validate the target for bufferData.
863 // Return the current bound buffer to target, or 0 if the target is invalid. 862 // Return the current bound buffer to target, or 0 if the target is invalid.
864 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe t); 863 WebGLBuffer* validateBufferDataTarget(const char* functionName, GLenum targe t);
865 864
866 // Helper function for tex{Sub}Image2D to make sure image is ready and would n't taint Origin. 865 // Helper function for tex{Sub}Image2D to make sure image is ready and would n't taint Origin.
867 bool validateHTMLImageElement(const char* functionName, HTMLImageElement*, E xceptionState&); 866 bool validateHTMLImageElement(const char* functionName, HTMLImageElement*, E xceptionState&);
868 867
869 // Helper function for tex{Sub}Image2D to make sure canvas is ready and woul dn't taint Origin. 868 // Helper function for tex{Sub}Image2D to make sure canvas is ready and woul dn't taint Origin.
870 bool validateHTMLCanvasElement(const char* functionName, HTMLCanvasElement*, ExceptionState&); 869 bool validateHTMLCanvasElement(const char* functionName, HTMLCanvasElement*, ExceptionState&);
871 870
872 // Helper function for tex{Sub}Image2D to make sure video is ready wouldn't taint Origin. 871 // Helper function for tex{Sub}Image2D to make sure video is ready wouldn't taint Origin.
873 bool validateHTMLVideoElement(const char* functionName, HTMLVideoElement*, E xceptionState&); 872 bool validateHTMLVideoElement(const char* functionName, HTMLVideoElement*, E xceptionState&);
874 873
875 // Helper function to validate drawArrays(Instanced) calls 874 // Helper function to validate drawArrays(Instanced) calls
876 bool validateDrawArrays(const char* functionName, GLenum mode, GLint first, GLsizei count); 875 bool validateDrawArrays(const char* functionName, GLenum mode, GLint first, GLsizei count);
877 876
878 // Helper function to validate drawElements(Instanced) calls 877 // Helper function to validate drawElements(Instanced) calls
879 bool validateDrawElements(const char* functionName, GLenum mode, GLsizei cou nt, GLenum type, long long offset); 878 bool validateDrawElements(const char* functionName, GLenum mode, GLsizei cou nt, GLenum type, long long offset);
880 879
881 // Helper function to validate draw*Instanced calls 880 // Helper function to validate draw*Instanced calls
882 bool validateDrawInstanced(const char* functionName, GLsizei primcount); 881 bool validateDrawInstanced(const char* functionName, GLsizei primcount);
883 882
884 // Helper functions for vertexAttribNf{v}. 883 // Helper functions for vertexAttribNf{v}.
885 void vertexAttribfImpl(const char* functionName, GLuint index, GLsizei expec tedSize, GLfloat, GLfloat, GLfloat, GLfloat); 884 void vertexAttribfImpl(const char* functionName, GLuint index, GLsizei expec tedSize, GLfloat, GLfloat, GLfloat, GLfloat);
886 void vertexAttribfvImpl(const char* functionName, GLuint index, Float32Array *, GLsizei expectedSize); 885 void vertexAttribfvImpl(const char* functionName, GLuint index, DOMFloat32Ar ray*, GLsizei expectedSize);
887 void vertexAttribfvImpl(const char* functionName, GLuint index, GLfloat*, GL sizei, GLsizei expectedSize); 886 void vertexAttribfvImpl(const char* functionName, GLuint index, GLfloat*, GL sizei, GLsizei expectedSize);
888 887
889 // Helper functions to bufferData() and bufferSubData(). 888 // Helper functions to bufferData() and bufferSubData().
890 void bufferDataImpl(GLenum target, long long size, const void* data, GLenum usage); 889 void bufferDataImpl(GLenum target, long long size, const void* data, GLenum usage);
891 void bufferSubDataImpl(GLenum target, long long offset, GLsizeiptr size, con st void* data); 890 void bufferSubDataImpl(GLenum target, long long offset, GLsizeiptr size, con st void* data);
892 891
893 // Helper function for delete* (deleteBuffer, deleteProgram, etc) functions. 892 // Helper function for delete* (deleteBuffer, deleteProgram, etc) functions.
894 // Return false if caller should return without further processing. 893 // Return false if caller should return without further processing.
895 bool deleteObject(WebGLObject*); 894 bool deleteObject(WebGLObject*);
896 895
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 static IntSize oldestContextSize(); 956 static IntSize oldestContextSize();
958 }; 957 };
959 958
960 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 959 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
961 960
962 } // namespace blink 961 } // namespace blink
963 962
964 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState); 963 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB ase::TextureUnitState);
965 964
966 #endif // WebGLRenderingContextBase_h 965 #endif // WebGLRenderingContextBase_h
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLGetInfo.cpp ('k') | Source/core/html/canvas/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698