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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h

Issue 2815793002: [SharedArrayBuffer] Add "AllowShared" extended attribute, used for WebGL (Closed)
Patch Set: Created 3 years, 8 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
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 17 matching lines...) Expand all
28 28
29 #include <memory> 29 #include <memory>
30 #include <set> 30 #include <set>
31 #include "bindings/core/v8/Nullable.h" 31 #include "bindings/core/v8/Nullable.h"
32 #include "bindings/core/v8/ScriptState.h" 32 #include "bindings/core/v8/ScriptState.h"
33 #include "bindings/core/v8/ScriptValue.h" 33 #include "bindings/core/v8/ScriptValue.h"
34 #include "bindings/core/v8/ScriptWrappable.h" 34 #include "bindings/core/v8/ScriptWrappable.h"
35 #include "bindings/core/v8/ScriptWrappableVisitor.h" 35 #include "bindings/core/v8/ScriptWrappableVisitor.h"
36 #include "core/CoreExport.h" 36 #include "core/CoreExport.h"
37 #include "core/dom/DOMTypedArray.h" 37 #include "core/dom/DOMTypedArray.h"
38 #include "core/dom/NotShared.h" 38 #include "core/dom/MaybeShared.h"
39 #include "core/dom/TypedFlexibleArrayBufferView.h" 39 #include "core/dom/TypedFlexibleArrayBufferView.h"
40 #include "core/html/canvas/CanvasContextCreationAttributes.h" 40 #include "core/html/canvas/CanvasContextCreationAttributes.h"
41 #include "core/html/canvas/CanvasRenderingContext.h" 41 #include "core/html/canvas/CanvasRenderingContext.h"
42 #include "core/layout/ContentChangeType.h" 42 #include "core/layout/ContentChangeType.h"
43 #include "modules/webgl/WebGLContextAttributes.h" 43 #include "modules/webgl/WebGLContextAttributes.h"
44 #include "modules/webgl/WebGLExtensionName.h" 44 #include "modules/webgl/WebGLExtensionName.h"
45 #include "modules/webgl/WebGLTexture.h" 45 #include "modules/webgl/WebGLTexture.h"
46 #include "modules/webgl/WebGLVertexArrayObjectBase.h" 46 #include "modules/webgl/WebGLVertexArrayObjectBase.h"
47 #include "platform/Timer.h" 47 #include "platform/Timer.h"
48 #include "platform/graphics/ImageBuffer.h" 48 #include "platform/graphics/ImageBuffer.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void blendEquationSeparate(GLenum mode_rgb, GLenum mode_alpha); 161 void blendEquationSeparate(GLenum mode_rgb, GLenum mode_alpha);
162 void blendFunc(GLenum sfactor, GLenum dfactor); 162 void blendFunc(GLenum sfactor, GLenum dfactor);
163 void blendFuncSeparate(GLenum src_rgb, 163 void blendFuncSeparate(GLenum src_rgb,
164 GLenum dst_rgb, 164 GLenum dst_rgb,
165 GLenum src_alpha, 165 GLenum src_alpha,
166 GLenum dst_alpha); 166 GLenum dst_alpha);
167 167
168 void bufferData(GLenum target, long long size, GLenum usage); 168 void bufferData(GLenum target, long long size, GLenum usage);
169 void bufferData(GLenum target, DOMArrayBuffer* data, GLenum usage); 169 void bufferData(GLenum target, DOMArrayBuffer* data, GLenum usage);
170 void bufferData(GLenum target, 170 void bufferData(GLenum target,
171 NotShared<DOMArrayBufferView> data, 171 MaybeShared<DOMArrayBufferView> data,
172 GLenum usage); 172 GLenum usage);
173 void bufferSubData(GLenum target, long long offset, DOMArrayBuffer* data); 173 void bufferSubData(GLenum target, long long offset, DOMArrayBuffer* data);
174 void bufferSubData(GLenum target, 174 void bufferSubData(GLenum target,
175 long long offset, 175 long long offset,
176 const FlexibleArrayBufferView& data); 176 const FlexibleArrayBufferView& data);
177 177
178 GLenum checkFramebufferStatus(GLenum target); 178 GLenum checkFramebufferStatus(GLenum target);
179 void clear(GLbitfield mask); 179 void clear(GLbitfield mask);
180 void clearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); 180 void clearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
181 void clearDepth(GLfloat); 181 void clearDepth(GLfloat);
182 void clearStencil(GLint); 182 void clearStencil(GLint);
183 void colorMask(GLboolean red, 183 void colorMask(GLboolean red,
184 GLboolean green, 184 GLboolean green,
185 GLboolean blue, 185 GLboolean blue,
186 GLboolean alpha); 186 GLboolean alpha);
187 void compileShader(WebGLShader*); 187 void compileShader(WebGLShader*);
188 188
189 void compressedTexImage2D(GLenum target, 189 void compressedTexImage2D(GLenum target,
190 GLint level, 190 GLint level,
191 GLenum internalformat, 191 GLenum internalformat,
192 GLsizei width, 192 GLsizei width,
193 GLsizei height, 193 GLsizei height,
194 GLint border, 194 GLint border,
195 NotShared<DOMArrayBufferView> data); 195 MaybeShared<DOMArrayBufferView> data);
196 void compressedTexSubImage2D(GLenum target, 196 void compressedTexSubImage2D(GLenum target,
197 GLint level, 197 GLint level,
198 GLint xoffset, 198 GLint xoffset,
199 GLint yoffset, 199 GLint yoffset,
200 GLsizei width, 200 GLsizei width,
201 GLsizei height, 201 GLsizei height,
202 GLenum format, 202 GLenum format,
203 NotShared<DOMArrayBufferView> data); 203 MaybeShared<DOMArrayBufferView> data);
204 204
205 void copyTexImage2D(GLenum target, 205 void copyTexImage2D(GLenum target,
206 GLint level, 206 GLint level,
207 GLenum internalformat, 207 GLenum internalformat,
208 GLint x, 208 GLint x,
209 GLint y, 209 GLint y,
210 GLsizei width, 210 GLsizei width,
211 GLsizei height, 211 GLsizei height,
212 GLint border); 212 GLint border);
213 void copyTexSubImage2D(GLenum target, 213 void copyTexSubImage2D(GLenum target,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 void lineWidth(GLfloat); 318 void lineWidth(GLfloat);
319 void linkProgram(WebGLProgram*); 319 void linkProgram(WebGLProgram*);
320 virtual void pixelStorei(GLenum pname, GLint param); 320 virtual void pixelStorei(GLenum pname, GLint param);
321 void polygonOffset(GLfloat factor, GLfloat units); 321 void polygonOffset(GLfloat factor, GLfloat units);
322 virtual void readPixels(GLint x, 322 virtual void readPixels(GLint x,
323 GLint y, 323 GLint y,
324 GLsizei width, 324 GLsizei width,
325 GLsizei height, 325 GLsizei height,
326 GLenum format, 326 GLenum format,
327 GLenum type, 327 GLenum type,
328 NotShared<DOMArrayBufferView> pixels); 328 MaybeShared<DOMArrayBufferView> pixels);
329 void renderbufferStorage(GLenum target, 329 void renderbufferStorage(GLenum target,
330 GLenum internalformat, 330 GLenum internalformat,
331 GLsizei width, 331 GLsizei width,
332 GLsizei height); 332 GLsizei height);
333 void sampleCoverage(GLfloat value, GLboolean invert); 333 void sampleCoverage(GLfloat value, GLboolean invert);
334 void scissor(GLint x, GLint y, GLsizei width, GLsizei height); 334 void scissor(GLint x, GLint y, GLsizei width, GLsizei height);
335 void shaderSource(WebGLShader*, const String&); 335 void shaderSource(WebGLShader*, const String&);
336 void stencilFunc(GLenum func, GLint ref, GLuint mask); 336 void stencilFunc(GLenum func, GLint ref, GLuint mask);
337 void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); 337 void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
338 void stencilMask(GLuint); 338 void stencilMask(GLuint);
339 void stencilMaskSeparate(GLenum face, GLuint mask); 339 void stencilMaskSeparate(GLenum face, GLuint mask);
340 void stencilOp(GLenum fail, GLenum zfail, GLenum zpass); 340 void stencilOp(GLenum fail, GLenum zfail, GLenum zpass);
341 void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); 341 void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
342 342
343 void texImage2D(GLenum target, 343 void texImage2D(GLenum target,
344 GLint level, 344 GLint level,
345 GLint internalformat, 345 GLint internalformat,
346 GLsizei width, 346 GLsizei width,
347 GLsizei height, 347 GLsizei height,
348 GLint border, 348 GLint border,
349 GLenum format, 349 GLenum format,
350 GLenum type, 350 GLenum type,
351 NotShared<DOMArrayBufferView>); 351 MaybeShared<DOMArrayBufferView>);
352 void texImage2D(GLenum target, 352 void texImage2D(GLenum target,
353 GLint level, 353 GLint level,
354 GLint internalformat, 354 GLint internalformat,
355 GLenum format, 355 GLenum format,
356 GLenum type, 356 GLenum type,
357 ImageData*); 357 ImageData*);
358 void texImage2D(GLenum target, 358 void texImage2D(GLenum target,
359 GLint level, 359 GLint level,
360 GLint internalformat, 360 GLint internalformat,
361 GLenum format, 361 GLenum format,
(...skipping 26 matching lines...) Expand all
388 void texParameteri(GLenum target, GLenum pname, GLint param); 388 void texParameteri(GLenum target, GLenum pname, GLint param);
389 389
390 void texSubImage2D(GLenum target, 390 void texSubImage2D(GLenum target,
391 GLint level, 391 GLint level,
392 GLint xoffset, 392 GLint xoffset,
393 GLint yoffset, 393 GLint yoffset,
394 GLsizei width, 394 GLsizei width,
395 GLsizei height, 395 GLsizei height,
396 GLenum format, 396 GLenum format,
397 GLenum type, 397 GLenum type,
398 NotShared<DOMArrayBufferView>); 398 MaybeShared<DOMArrayBufferView>);
399 void texSubImage2D(GLenum target, 399 void texSubImage2D(GLenum target,
400 GLint level, 400 GLint level,
401 GLint xoffset, 401 GLint xoffset,
402 GLint yoffset, 402 GLint yoffset,
403 GLenum format, 403 GLenum format,
404 GLenum type, 404 GLenum type,
405 ImageData*); 405 ImageData*);
406 void texSubImage2D(GLenum target, 406 void texSubImage2D(GLenum target,
407 GLint level, 407 GLint level,
408 GLint xoffset, 408 GLint xoffset,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 void uniform4fv(const WebGLUniformLocation*, Vector<GLfloat>&); 463 void uniform4fv(const WebGLUniformLocation*, Vector<GLfloat>&);
464 void uniform4i(const WebGLUniformLocation*, 464 void uniform4i(const WebGLUniformLocation*,
465 GLint x, 465 GLint x,
466 GLint y, 466 GLint y,
467 GLint z, 467 GLint z,
468 GLint w); 468 GLint w);
469 void uniform4iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); 469 void uniform4iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&);
470 void uniform4iv(const WebGLUniformLocation*, Vector<GLint>&); 470 void uniform4iv(const WebGLUniformLocation*, Vector<GLint>&);
471 void uniformMatrix2fv(const WebGLUniformLocation*, 471 void uniformMatrix2fv(const WebGLUniformLocation*,
472 GLboolean transpose, 472 GLboolean transpose,
473 NotShared<DOMFloat32Array> value); 473 MaybeShared<DOMFloat32Array> value);
474 void uniformMatrix2fv(const WebGLUniformLocation*, 474 void uniformMatrix2fv(const WebGLUniformLocation*,
475 GLboolean transpose, 475 GLboolean transpose,
476 Vector<GLfloat>& value); 476 Vector<GLfloat>& value);
477 void uniformMatrix3fv(const WebGLUniformLocation*, 477 void uniformMatrix3fv(const WebGLUniformLocation*,
478 GLboolean transpose, 478 GLboolean transpose,
479 NotShared<DOMFloat32Array> value); 479 MaybeShared<DOMFloat32Array> value);
480 void uniformMatrix3fv(const WebGLUniformLocation*, 480 void uniformMatrix3fv(const WebGLUniformLocation*,
481 GLboolean transpose, 481 GLboolean transpose,
482 Vector<GLfloat>& value); 482 Vector<GLfloat>& value);
483 void uniformMatrix4fv(const WebGLUniformLocation*, 483 void uniformMatrix4fv(const WebGLUniformLocation*,
484 GLboolean transpose, 484 GLboolean transpose,
485 NotShared<DOMFloat32Array> value); 485 MaybeShared<DOMFloat32Array> value);
486 void uniformMatrix4fv(const WebGLUniformLocation*, 486 void uniformMatrix4fv(const WebGLUniformLocation*,
487 GLboolean transpose, 487 GLboolean transpose,
488 Vector<GLfloat>& value); 488 Vector<GLfloat>& value);
489 489
490 void useProgram(WebGLProgram*); 490 void useProgram(WebGLProgram*);
491 void validateProgram(WebGLProgram*); 491 void validateProgram(WebGLProgram*);
492 492
493 void vertexAttrib1f(GLuint index, GLfloat x); 493 void vertexAttrib1f(GLuint index, GLfloat x);
494 void vertexAttrib1fv(GLuint index, NotShared<const DOMFloat32Array> values); 494 void vertexAttrib1fv(GLuint index, MaybeShared<const DOMFloat32Array> values);
495 void vertexAttrib1fv(GLuint index, const Vector<GLfloat>& values); 495 void vertexAttrib1fv(GLuint index, const Vector<GLfloat>& values);
496 void vertexAttrib2f(GLuint index, GLfloat x, GLfloat y); 496 void vertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
497 void vertexAttrib2fv(GLuint index, NotShared<const DOMFloat32Array> values); 497 void vertexAttrib2fv(GLuint index, MaybeShared<const DOMFloat32Array> values);
498 void vertexAttrib2fv(GLuint index, const Vector<GLfloat>& values); 498 void vertexAttrib2fv(GLuint index, const Vector<GLfloat>& values);
499 void vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z); 499 void vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
500 void vertexAttrib3fv(GLuint index, NotShared<const DOMFloat32Array> values); 500 void vertexAttrib3fv(GLuint index, MaybeShared<const DOMFloat32Array> values);
501 void vertexAttrib3fv(GLuint index, const Vector<GLfloat>& values); 501 void vertexAttrib3fv(GLuint index, const Vector<GLfloat>& values);
502 void vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 502 void vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
503 void vertexAttrib4fv(GLuint index, NotShared<const DOMFloat32Array> values); 503 void vertexAttrib4fv(GLuint index, MaybeShared<const DOMFloat32Array> values);
504 void vertexAttrib4fv(GLuint index, const Vector<GLfloat>& values); 504 void vertexAttrib4fv(GLuint index, const Vector<GLfloat>& values);
505 void vertexAttribPointer(GLuint index, 505 void vertexAttribPointer(GLuint index,
506 GLint size, 506 GLint size,
507 GLenum type, 507 GLenum type,
508 GLboolean normalized, 508 GLboolean normalized,
509 GLsizei stride, 509 GLsizei stride,
510 long long offset); 510 long long offset);
511 511
512 void VertexAttribDivisorANGLE(GLuint index, GLuint divisor); 512 void VertexAttribDivisorANGLE(GLuint index, GLuint divisor);
513 513
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 context, 1673 context,
1674 context->Is3d(), 1674 context->Is3d(),
1675 context.Is3d()); 1675 context.Is3d());
1676 1676
1677 } // namespace blink 1677 } // namespace blink
1678 1678
1679 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS( 1679 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(
1680 blink::WebGLRenderingContextBase::TextureUnitState); 1680 blink::WebGLRenderingContextBase::TextureUnitState);
1681 1681
1682 #endif // WebGLRenderingContextBase_h 1682 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698