OLD | NEW |
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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 GLint border, | 345 GLint border, |
346 GLenum format, | 346 GLenum format, |
347 GLenum type, | 347 GLenum type, |
348 DOMArrayBufferView*); | 348 DOMArrayBufferView*); |
349 void texImage2D(GLenum target, | 349 void texImage2D(GLenum target, |
350 GLint level, | 350 GLint level, |
351 GLint internalformat, | 351 GLint internalformat, |
352 GLenum format, | 352 GLenum format, |
353 GLenum type, | 353 GLenum type, |
354 ImageData*); | 354 ImageData*); |
355 void texImage2D(GLenum target, | 355 void texImage2D(ExecutionContext*, |
| 356 GLenum target, |
356 GLint level, | 357 GLint level, |
357 GLint internalformat, | 358 GLint internalformat, |
358 GLenum format, | 359 GLenum format, |
359 GLenum type, | 360 GLenum type, |
360 HTMLImageElement*, | 361 HTMLImageElement*, |
361 ExceptionState&); | 362 ExceptionState&); |
362 void texImage2D(GLenum target, | 363 void texImage2D(ExecutionContext*, |
| 364 GLenum target, |
363 GLint level, | 365 GLint level, |
364 GLint internalformat, | 366 GLint internalformat, |
365 GLenum format, | 367 GLenum format, |
366 GLenum type, | 368 GLenum type, |
367 HTMLCanvasElement*, | 369 HTMLCanvasElement*, |
368 ExceptionState&); | 370 ExceptionState&); |
369 void texImage2D(GLenum target, | 371 void texImage2D(ExecutionContext*, |
| 372 GLenum target, |
370 GLint level, | 373 GLint level, |
371 GLint internalformat, | 374 GLint internalformat, |
372 GLenum format, | 375 GLenum format, |
373 GLenum type, | 376 GLenum type, |
374 HTMLVideoElement*, | 377 HTMLVideoElement*, |
375 ExceptionState&); | 378 ExceptionState&); |
376 void texImage2D(GLenum target, | 379 void texImage2D(GLenum target, |
377 GLint level, | 380 GLint level, |
378 GLint internalformat, | 381 GLint internalformat, |
379 GLenum format, | 382 GLenum format, |
(...skipping 13 matching lines...) Expand all Loading... |
393 GLenum format, | 396 GLenum format, |
394 GLenum type, | 397 GLenum type, |
395 DOMArrayBufferView*); | 398 DOMArrayBufferView*); |
396 void texSubImage2D(GLenum target, | 399 void texSubImage2D(GLenum target, |
397 GLint level, | 400 GLint level, |
398 GLint xoffset, | 401 GLint xoffset, |
399 GLint yoffset, | 402 GLint yoffset, |
400 GLenum format, | 403 GLenum format, |
401 GLenum type, | 404 GLenum type, |
402 ImageData*); | 405 ImageData*); |
403 void texSubImage2D(GLenum target, | 406 void texSubImage2D(ExecutionContext*, |
| 407 GLenum target, |
404 GLint level, | 408 GLint level, |
405 GLint xoffset, | 409 GLint xoffset, |
406 GLint yoffset, | 410 GLint yoffset, |
407 GLenum format, | 411 GLenum format, |
408 GLenum type, | 412 GLenum type, |
409 HTMLImageElement*, | 413 HTMLImageElement*, |
410 ExceptionState&); | 414 ExceptionState&); |
411 void texSubImage2D(GLenum target, | 415 void texSubImage2D(ExecutionContext*, |
| 416 GLenum target, |
412 GLint level, | 417 GLint level, |
413 GLint xoffset, | 418 GLint xoffset, |
414 GLint yoffset, | 419 GLint yoffset, |
415 GLenum format, | 420 GLenum format, |
416 GLenum type, | 421 GLenum type, |
417 HTMLCanvasElement*, | 422 HTMLCanvasElement*, |
418 ExceptionState&); | 423 ExceptionState&); |
419 void texSubImage2D(GLenum target, | 424 void texSubImage2D(ExecutionContext*, |
| 425 GLenum target, |
420 GLint level, | 426 GLint level, |
421 GLint xoffset, | 427 GLint xoffset, |
422 GLint yoffset, | 428 GLint yoffset, |
423 GLenum format, | 429 GLenum format, |
424 GLenum type, | 430 GLenum type, |
425 HTMLVideoElement*, | 431 HTMLVideoElement*, |
426 ExceptionState&); | 432 ExceptionState&); |
427 void texSubImage2D(GLenum target, | 433 void texSubImage2D(GLenum target, |
428 GLint level, | 434 GLint level, |
429 GLint xoffset, | 435 GLint xoffset, |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 // for WebGL 1.0 and in GLSL ES 3.00 spec section 3.1 Character Set for WebGL | 1146 // for WebGL 1.0 and in GLSL ES 3.00 spec section 3.1 Character Set for WebGL |
1141 // 2.0. | 1147 // 2.0. |
1142 bool ValidateShaderSource(const String&); | 1148 bool ValidateShaderSource(const String&); |
1143 | 1149 |
1144 // Helper function to check texture binding target and texture bound to the | 1150 // Helper function to check texture binding target and texture bound to the |
1145 // target. Generate GL errors and return 0 if target is invalid or texture | 1151 // target. Generate GL errors and return 0 if target is invalid or texture |
1146 // bound is null. Otherwise, return the texture bound to the target. | 1152 // bound is null. Otherwise, return the texture bound to the target. |
1147 WebGLTexture* ValidateTextureBinding(const char* function_name, | 1153 WebGLTexture* ValidateTextureBinding(const char* function_name, |
1148 GLenum target); | 1154 GLenum target); |
1149 | 1155 |
1150 // Wrapper function for validateTexture2D(3D)Binding, used in texImageHelper | 1156 // Wrapper function for validateTexture2D(3D)Binding, used in TexImageHelper |
1151 // functions. | 1157 // functions. |
1152 virtual WebGLTexture* ValidateTexImageBinding(const char*, | 1158 virtual WebGLTexture* ValidateTexImageBinding(const char*, |
1153 TexImageFunctionID, | 1159 TexImageFunctionID, |
1154 GLenum); | 1160 GLenum); |
1155 | 1161 |
1156 // Helper function to check texture 2D target and texture bound to the target. | 1162 // Helper function to check texture 2D target and texture bound to the target. |
1157 // Generate GL errors and return 0 if target is invalid or texture bound is | 1163 // Generate GL errors and return 0 if target is invalid or texture bound is |
1158 // null. Otherwise, return the texture bound to the target. | 1164 // null. Otherwise, return the texture bound to the target. |
1159 WebGLTexture* ValidateTexture2DBinding(const char* function_name, | 1165 WebGLTexture* ValidateTexture2DBinding(const char* function_name, |
1160 GLenum target); | 1166 GLenum target); |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 virtual bool ValidateBufferDataUsage(const char* function_name, GLenum usage); | 1411 virtual bool ValidateBufferDataUsage(const char* function_name, GLenum usage); |
1406 | 1412 |
1407 virtual bool ValidateAndUpdateBufferBindTarget(const char* function_name, | 1413 virtual bool ValidateAndUpdateBufferBindTarget(const char* function_name, |
1408 GLenum target, | 1414 GLenum target, |
1409 WebGLBuffer*); | 1415 WebGLBuffer*); |
1410 | 1416 |
1411 virtual void RemoveBoundBuffer(WebGLBuffer*); | 1417 virtual void RemoveBoundBuffer(WebGLBuffer*); |
1412 | 1418 |
1413 // Helper function for tex{Sub}Image2D to make sure image is ready and | 1419 // Helper function for tex{Sub}Image2D to make sure image is ready and |
1414 // wouldn't taint Origin. | 1420 // wouldn't taint Origin. |
1415 bool ValidateHTMLImageElement(const char* function_name, | 1421 |
| 1422 bool ValidateHTMLImageElement(SecurityOrigin*, |
| 1423 const char* function_name, |
1416 HTMLImageElement*, | 1424 HTMLImageElement*, |
1417 ExceptionState&); | 1425 ExceptionState&); |
1418 | 1426 |
1419 // Helper function for tex{Sub}Image2D to make sure canvas is ready and | 1427 // Helper function for tex{Sub}Image2D to make sure canvas is ready and |
1420 // wouldn't taint Origin. | 1428 // wouldn't taint Origin. |
1421 bool ValidateHTMLCanvasElement(const char* function_name, | 1429 bool ValidateHTMLCanvasElement(SecurityOrigin*, |
| 1430 const char* function_name, |
1422 HTMLCanvasElement*, | 1431 HTMLCanvasElement*, |
1423 ExceptionState&); | 1432 ExceptionState&); |
1424 | 1433 |
1425 // Helper function for tex{Sub}Image2D to make sure video is ready wouldn't | 1434 // Helper function for tex{Sub}Image2D to make sure video is ready wouldn't |
1426 // taint Origin. | 1435 // taint Origin. |
1427 bool ValidateHTMLVideoElement(const char* function_name, | 1436 bool ValidateHTMLVideoElement(SecurityOrigin*, |
| 1437 const char* function_name, |
1428 HTMLVideoElement*, | 1438 HTMLVideoElement*, |
1429 ExceptionState&); | 1439 ExceptionState&); |
1430 | 1440 |
1431 // Helper function for tex{Sub}Image2D to make sure imagebitmap is ready and | 1441 // Helper function for tex{Sub}Image2D to make sure imagebitmap is ready and |
1432 // wouldn't taint Origin. | 1442 // wouldn't taint Origin. |
1433 bool ValidateImageBitmap(const char* function_name, | 1443 bool ValidateImageBitmap(const char* function_name, |
1434 ImageBitmap*, | 1444 ImageBitmap*, |
1435 ExceptionState&); | 1445 ExceptionState&); |
1436 | 1446 |
1437 // Helper function to validate drawArrays(Instanced) calls | 1447 // Helper function to validate drawArrays(Instanced) calls |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 GLint, | 1563 GLint, |
1554 GLenum, | 1564 GLenum, |
1555 GLenum, | 1565 GLenum, |
1556 GLsizei, | 1566 GLsizei, |
1557 GLint, | 1567 GLint, |
1558 GLint, | 1568 GLint, |
1559 GLint, | 1569 GLint, |
1560 ImageData*, | 1570 ImageData*, |
1561 const IntRect&, | 1571 const IntRect&, |
1562 GLint); | 1572 GLint); |
1563 void TexImageHelperHTMLImageElement(TexImageFunctionID, | 1573 |
| 1574 void TexImageHelperHTMLImageElement(SecurityOrigin*, |
| 1575 TexImageFunctionID, |
1564 GLenum, | 1576 GLenum, |
1565 GLint, | 1577 GLint, |
1566 GLint, | 1578 GLint, |
1567 GLenum, | 1579 GLenum, |
1568 GLenum, | 1580 GLenum, |
1569 GLint, | 1581 GLint, |
1570 GLint, | 1582 GLint, |
1571 GLint, | 1583 GLint, |
1572 HTMLImageElement*, | 1584 HTMLImageElement*, |
1573 const IntRect&, | 1585 const IntRect&, |
1574 GLsizei, | 1586 GLsizei, |
1575 GLint, | 1587 GLint, |
1576 ExceptionState&); | 1588 ExceptionState&); |
1577 void TexImageHelperHTMLCanvasElement(TexImageFunctionID, | 1589 |
| 1590 void TexImageHelperHTMLCanvasElement(SecurityOrigin*, |
| 1591 TexImageFunctionID, |
1578 GLenum, | 1592 GLenum, |
1579 GLint, | 1593 GLint, |
1580 GLint, | 1594 GLint, |
1581 GLenum, | 1595 GLenum, |
1582 GLenum, | 1596 GLenum, |
1583 GLint, | 1597 GLint, |
1584 GLint, | 1598 GLint, |
1585 GLint, | 1599 GLint, |
1586 HTMLCanvasElement*, | 1600 HTMLCanvasElement*, |
1587 const IntRect&, | 1601 const IntRect&, |
1588 GLsizei, | 1602 GLsizei, |
1589 GLint, | 1603 GLint, |
1590 ExceptionState&); | 1604 ExceptionState&); |
1591 void TexImageHelperHTMLVideoElement(TexImageFunctionID, | 1605 |
| 1606 void TexImageHelperHTMLVideoElement(SecurityOrigin*, |
| 1607 TexImageFunctionID, |
1592 GLenum, | 1608 GLenum, |
1593 GLint, | 1609 GLint, |
1594 GLint, | 1610 GLint, |
1595 GLenum, | 1611 GLenum, |
1596 GLenum, | 1612 GLenum, |
1597 GLint, | 1613 GLint, |
1598 GLint, | 1614 GLint, |
1599 GLint, | 1615 GLint, |
1600 HTMLVideoElement*, | 1616 HTMLVideoElement*, |
1601 const IntRect&, | 1617 const IntRect&, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1670 context, | 1686 context, |
1671 context->Is3d(), | 1687 context->Is3d(), |
1672 context.Is3d()); | 1688 context.Is3d()); |
1673 | 1689 |
1674 } // namespace blink | 1690 } // namespace blink |
1675 | 1691 |
1676 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS( | 1692 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS( |
1677 blink::WebGLRenderingContextBase::TextureUnitState); | 1693 blink::WebGLRenderingContextBase::TextureUnitState); |
1678 | 1694 |
1679 #endif // WebGLRenderingContextBase_h | 1695 #endif // WebGLRenderingContextBase_h |
OLD | NEW |