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

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: merge HEAD 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 16 matching lines...) Expand all
27 #define WebGLRenderingContextBase_h 27 #define WebGLRenderingContextBase_h
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/ArrayBufferViewHelpers.h"
37 #include "core/dom/DOMTypedArray.h" 38 #include "core/dom/DOMTypedArray.h"
38 #include "core/dom/NotShared.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(ExecutionContext*, 358 void texImage2D(ExecutionContext*,
359 GLenum target, 359 GLenum target,
360 GLint level, 360 GLint level,
361 GLint internalformat, 361 GLint internalformat,
(...skipping 29 matching lines...) Expand all
391 void texParameteri(GLenum target, GLenum pname, GLint param); 391 void texParameteri(GLenum target, GLenum pname, GLint param);
392 392
393 void texSubImage2D(GLenum target, 393 void texSubImage2D(GLenum target,
394 GLint level, 394 GLint level,
395 GLint xoffset, 395 GLint xoffset,
396 GLint yoffset, 396 GLint yoffset,
397 GLsizei width, 397 GLsizei width,
398 GLsizei height, 398 GLsizei height,
399 GLenum format, 399 GLenum format,
400 GLenum type, 400 GLenum type,
401 NotShared<DOMArrayBufferView>); 401 MaybeShared<DOMArrayBufferView>);
402 void texSubImage2D(GLenum target, 402 void texSubImage2D(GLenum target,
403 GLint level, 403 GLint level,
404 GLint xoffset, 404 GLint xoffset,
405 GLint yoffset, 405 GLint yoffset,
406 GLenum format, 406 GLenum format,
407 GLenum type, 407 GLenum type,
408 ImageData*); 408 ImageData*);
409 void texSubImage2D(ExecutionContext*, 409 void texSubImage2D(ExecutionContext*,
410 GLenum target, 410 GLenum target,
411 GLint level, 411 GLint level,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 void uniform4fv(const WebGLUniformLocation*, Vector<GLfloat>&); 469 void uniform4fv(const WebGLUniformLocation*, Vector<GLfloat>&);
470 void uniform4i(const WebGLUniformLocation*, 470 void uniform4i(const WebGLUniformLocation*,
471 GLint x, 471 GLint x,
472 GLint y, 472 GLint y,
473 GLint z, 473 GLint z,
474 GLint w); 474 GLint w);
475 void uniform4iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); 475 void uniform4iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&);
476 void uniform4iv(const WebGLUniformLocation*, Vector<GLint>&); 476 void uniform4iv(const WebGLUniformLocation*, Vector<GLint>&);
477 void uniformMatrix2fv(const WebGLUniformLocation*, 477 void uniformMatrix2fv(const WebGLUniformLocation*,
478 GLboolean transpose, 478 GLboolean transpose,
479 NotShared<DOMFloat32Array> value); 479 MaybeShared<DOMFloat32Array> value);
480 void uniformMatrix2fv(const WebGLUniformLocation*, 480 void uniformMatrix2fv(const WebGLUniformLocation*,
481 GLboolean transpose, 481 GLboolean transpose,
482 Vector<GLfloat>& value); 482 Vector<GLfloat>& value);
483 void uniformMatrix3fv(const WebGLUniformLocation*, 483 void uniformMatrix3fv(const WebGLUniformLocation*,
484 GLboolean transpose, 484 GLboolean transpose,
485 NotShared<DOMFloat32Array> value); 485 MaybeShared<DOMFloat32Array> value);
486 void uniformMatrix3fv(const WebGLUniformLocation*, 486 void uniformMatrix3fv(const WebGLUniformLocation*,
487 GLboolean transpose, 487 GLboolean transpose,
488 Vector<GLfloat>& value); 488 Vector<GLfloat>& value);
489 void uniformMatrix4fv(const WebGLUniformLocation*, 489 void uniformMatrix4fv(const WebGLUniformLocation*,
490 GLboolean transpose, 490 GLboolean transpose,
491 NotShared<DOMFloat32Array> value); 491 MaybeShared<DOMFloat32Array> value);
492 void uniformMatrix4fv(const WebGLUniformLocation*, 492 void uniformMatrix4fv(const WebGLUniformLocation*,
493 GLboolean transpose, 493 GLboolean transpose,
494 Vector<GLfloat>& value); 494 Vector<GLfloat>& value);
495 495
496 void useProgram(WebGLProgram*); 496 void useProgram(WebGLProgram*);
497 void validateProgram(WebGLProgram*); 497 void validateProgram(WebGLProgram*);
498 498
499 void vertexAttrib1f(GLuint index, GLfloat x); 499 void vertexAttrib1f(GLuint index, GLfloat x);
500 void vertexAttrib1fv(GLuint index, NotShared<const DOMFloat32Array> values); 500 void vertexAttrib1fv(GLuint index, MaybeShared<const DOMFloat32Array> values);
501 void vertexAttrib1fv(GLuint index, const Vector<GLfloat>& values); 501 void vertexAttrib1fv(GLuint index, const Vector<GLfloat>& values);
502 void vertexAttrib2f(GLuint index, GLfloat x, GLfloat y); 502 void vertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
503 void vertexAttrib2fv(GLuint index, NotShared<const DOMFloat32Array> values); 503 void vertexAttrib2fv(GLuint index, MaybeShared<const DOMFloat32Array> values);
504 void vertexAttrib2fv(GLuint index, const Vector<GLfloat>& values); 504 void vertexAttrib2fv(GLuint index, const Vector<GLfloat>& values);
505 void vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z); 505 void vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
506 void vertexAttrib3fv(GLuint index, NotShared<const DOMFloat32Array> values); 506 void vertexAttrib3fv(GLuint index, MaybeShared<const DOMFloat32Array> values);
507 void vertexAttrib3fv(GLuint index, const Vector<GLfloat>& values); 507 void vertexAttrib3fv(GLuint index, const Vector<GLfloat>& values);
508 void vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); 508 void vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
509 void vertexAttrib4fv(GLuint index, NotShared<const DOMFloat32Array> values); 509 void vertexAttrib4fv(GLuint index, MaybeShared<const DOMFloat32Array> values);
510 void vertexAttrib4fv(GLuint index, const Vector<GLfloat>& values); 510 void vertexAttrib4fv(GLuint index, const Vector<GLfloat>& values);
511 void vertexAttribPointer(GLuint index, 511 void vertexAttribPointer(GLuint index,
512 GLint size, 512 GLint size,
513 GLenum type, 513 GLenum type,
514 GLboolean normalized, 514 GLboolean normalized,
515 GLsizei stride, 515 GLsizei stride,
516 long long offset); 516 long long offset);
517 517
518 void VertexAttribDivisorANGLE(GLuint index, GLuint divisor); 518 void VertexAttribDivisorANGLE(GLuint index, GLuint divisor);
519 519
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 context, 1689 context,
1690 context->Is3d(), 1690 context->Is3d(),
1691 context.Is3d()); 1691 context.Is3d());
1692 1692
1693 } // namespace blink 1693 } // namespace blink
1694 1694
1695 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS( 1695 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(
1696 blink::WebGLRenderingContextBase::TextureUnitState); 1696 blink::WebGLRenderingContextBase::TextureUnitState);
1697 1697
1698 #endif // WebGLRenderingContextBase_h 1698 #endif // WebGLRenderingContextBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698