| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef WebGL2RenderingContextBase_h | 5 #ifndef WebGL2RenderingContextBase_h |
| 6 #define WebGL2RenderingContextBase_h | 6 #define WebGL2RenderingContextBase_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/TraceWrapperMember.h" | 8 #include "bindings/core/v8/TraceWrapperMember.h" |
| 9 #include "modules/webgl/WebGLExtension.h" | 9 #include "modules/webgl/WebGLExtension.h" |
| 10 #include "modules/webgl/WebGLRenderingContextBase.h" | 10 #include "modules/webgl/WebGLRenderingContextBase.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class WebGLSync; | 24 class WebGLSync; |
| 25 class WebGLTransformFeedback; | 25 class WebGLTransformFeedback; |
| 26 class WebGLUniformLocation; | 26 class WebGLUniformLocation; |
| 27 class WebGLVertexArrayObject; | 27 class WebGLVertexArrayObject; |
| 28 | 28 |
| 29 class WebGL2RenderingContextBase : public WebGLRenderingContextBase { | 29 class WebGL2RenderingContextBase : public WebGLRenderingContextBase { |
| 30 public: | 30 public: |
| 31 void destroyContext() override; | 31 void destroyContext() override; |
| 32 | 32 |
| 33 /* Buffer objects */ | 33 /* Buffer objects */ |
| 34 void bufferData(GLenum, DOMArrayBufferView*, GLenum, GLuint, GLuint); | 34 void bufferData(GLenum, |
| 35 void bufferSubData(GLenum, GLintptr, DOMArrayBufferView*, GLuint, GLuint); | 35 const NotShared<DOMArrayBufferView>&, |
| 36 GLenum, |
| 37 GLuint, |
| 38 GLuint); |
| 39 void bufferSubData(GLenum, |
| 40 GLintptr, |
| 41 const NotShared<DOMArrayBufferView>&, |
| 42 GLuint, |
| 43 GLuint); |
| 36 // Have to re-declare/re-define the following buffer{Sub}Data functions from | 44 // Have to re-declare/re-define the following buffer{Sub}Data functions from |
| 37 // base class. This is because the above buffer{Sub}Data() hides the name | 45 // base class. This is because the above buffer{Sub}Data() hides the name |
| 38 // from base class. | 46 // from base class. |
| 39 void bufferData(GLenum target, long long size, GLenum usage); | 47 void bufferData(GLenum target, long long size, GLenum usage); |
| 40 void bufferData(GLenum target, DOMArrayBuffer* data, GLenum usage); | 48 void bufferData(GLenum target, DOMArrayBuffer* data, GLenum usage); |
| 41 void bufferData(GLenum target, DOMArrayBufferView* data, GLenum usage); | 49 void bufferData(GLenum target, |
| 50 const NotShared<DOMArrayBufferView>& data, |
| 51 GLenum usage); |
| 42 void bufferSubData(GLenum target, long long offset, DOMArrayBuffer* data); | 52 void bufferSubData(GLenum target, long long offset, DOMArrayBuffer* data); |
| 43 void bufferSubData(GLenum target, | 53 void bufferSubData(GLenum target, |
| 44 long long offset, | 54 long long offset, |
| 45 const FlexibleArrayBufferView& data); | 55 const FlexibleArrayBufferView& data); |
| 46 | 56 |
| 47 void copyBufferSubData(GLenum, GLenum, long long, long long, long long); | 57 void copyBufferSubData(GLenum, GLenum, long long, long long, long long); |
| 48 void getBufferSubData(GLenum, long long, DOMArrayBufferView*, GLuint, GLuint); | 58 void getBufferSubData(GLenum, |
| 59 long long, |
| 60 const NotShared<DOMArrayBufferView>&, |
| 61 GLuint, |
| 62 GLuint); |
| 49 | 63 |
| 50 void registerGetBufferSubDataAsyncCallback( | 64 void registerGetBufferSubDataAsyncCallback( |
| 51 WebGLGetBufferSubDataAsyncCallback*); | 65 WebGLGetBufferSubDataAsyncCallback*); |
| 52 void unregisterGetBufferSubDataAsyncCallback( | 66 void unregisterGetBufferSubDataAsyncCallback( |
| 53 WebGLGetBufferSubDataAsyncCallback*); | 67 WebGLGetBufferSubDataAsyncCallback*); |
| 54 | 68 |
| 55 /* Framebuffer objects */ | 69 /* Framebuffer objects */ |
| 56 bool validateTexFuncLayer(const char*, GLenum texTarget, GLint layer); | 70 bool validateTexFuncLayer(const char*, GLenum texTarget, GLint layer); |
| 57 void blitFramebuffer(GLint, | 71 void blitFramebuffer(GLint, |
| 58 GLint, | 72 GLint, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 ImageBitmap*, | 156 ImageBitmap*, |
| 143 ExceptionState&); | 157 ExceptionState&); |
| 144 void texImage2D(GLenum, | 158 void texImage2D(GLenum, |
| 145 GLint, | 159 GLint, |
| 146 GLint, | 160 GLint, |
| 147 GLsizei, | 161 GLsizei, |
| 148 GLsizei, | 162 GLsizei, |
| 149 GLint, | 163 GLint, |
| 150 GLenum, | 164 GLenum, |
| 151 GLenum, | 165 GLenum, |
| 152 DOMArrayBufferView*, | 166 const NotShared<DOMArrayBufferView>&, |
| 153 GLuint); | 167 GLuint); |
| 154 | 168 |
| 155 void texSubImage2D(GLenum, | 169 void texSubImage2D(GLenum, |
| 156 GLint, | 170 GLint, |
| 157 GLint, | 171 GLint, |
| 158 GLint, | 172 GLint, |
| 159 GLsizei, | 173 GLsizei, |
| 160 GLsizei, | 174 GLsizei, |
| 161 GLenum, | 175 GLenum, |
| 162 GLenum, | 176 GLenum, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 ImageBitmap*, | 225 ImageBitmap*, |
| 212 ExceptionState&); | 226 ExceptionState&); |
| 213 void texSubImage2D(GLenum, | 227 void texSubImage2D(GLenum, |
| 214 GLint, | 228 GLint, |
| 215 GLint, | 229 GLint, |
| 216 GLint, | 230 GLint, |
| 217 GLsizei, | 231 GLsizei, |
| 218 GLsizei, | 232 GLsizei, |
| 219 GLenum, | 233 GLenum, |
| 220 GLenum, | 234 GLenum, |
| 221 DOMArrayBufferView*, | 235 const NotShared<DOMArrayBufferView>&, |
| 222 GLuint); | 236 GLuint); |
| 223 | 237 |
| 224 // Have to re-declare/re-define the following tex{Sub}Image2D functions from | 238 // Have to re-declare/re-define the following tex{Sub}Image2D functions from |
| 225 // base class. This is because the above tex{Sub}Image2D() hides the name | 239 // base class. This is because the above tex{Sub}Image2D() hides the name |
| 226 // from base class. | 240 // from base class. |
| 227 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, ImageData*); | 241 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, ImageData*); |
| 228 void texImage2D(GLenum, | 242 void texImage2D(GLenum, |
| 229 GLint, | 243 GLint, |
| 230 GLint, | 244 GLint, |
| 231 GLenum, | 245 GLenum, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 void texStorage3D(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei); | 305 void texStorage3D(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei); |
| 292 void texImage3D(GLenum, | 306 void texImage3D(GLenum, |
| 293 GLint, | 307 GLint, |
| 294 GLint, | 308 GLint, |
| 295 GLsizei, | 309 GLsizei, |
| 296 GLsizei, | 310 GLsizei, |
| 297 GLsizei, | 311 GLsizei, |
| 298 GLint, | 312 GLint, |
| 299 GLenum, | 313 GLenum, |
| 300 GLenum, | 314 GLenum, |
| 301 DOMArrayBufferView*); | 315 const NotShared<DOMArrayBufferView>&); |
| 302 void texImage3D(GLenum, | 316 void texImage3D(GLenum, |
| 303 GLint, | 317 GLint, |
| 304 GLint, | 318 GLint, |
| 305 GLsizei, | 319 GLsizei, |
| 306 GLsizei, | 320 GLsizei, |
| 307 GLsizei, | 321 GLsizei, |
| 308 GLint, | 322 GLint, |
| 309 GLenum, | 323 GLenum, |
| 310 GLenum, | 324 GLenum, |
| 311 DOMArrayBufferView*, | 325 const NotShared<DOMArrayBufferView>&, |
| 312 GLuint); | 326 GLuint); |
| 313 void texImage3D(GLenum, | 327 void texImage3D(GLenum, |
| 314 GLint, | 328 GLint, |
| 315 GLint, | 329 GLint, |
| 316 GLsizei, | 330 GLsizei, |
| 317 GLsizei, | 331 GLsizei, |
| 318 GLsizei, | 332 GLsizei, |
| 319 GLint, | 333 GLint, |
| 320 GLenum, | 334 GLenum, |
| 321 GLenum, | 335 GLenum, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 void texSubImage3D(GLenum, | 391 void texSubImage3D(GLenum, |
| 378 GLint, | 392 GLint, |
| 379 GLint, | 393 GLint, |
| 380 GLint, | 394 GLint, |
| 381 GLint, | 395 GLint, |
| 382 GLsizei, | 396 GLsizei, |
| 383 GLsizei, | 397 GLsizei, |
| 384 GLsizei, | 398 GLsizei, |
| 385 GLenum, | 399 GLenum, |
| 386 GLenum, | 400 GLenum, |
| 387 DOMArrayBufferView*, | 401 const NotShared<DOMArrayBufferView>&, |
| 388 GLuint); | 402 GLuint); |
| 389 void texSubImage3D(GLenum, | 403 void texSubImage3D(GLenum, |
| 390 GLint, | 404 GLint, |
| 391 GLint, | 405 GLint, |
| 392 GLint, | 406 GLint, |
| 393 GLint, | 407 GLint, |
| 394 GLsizei, | 408 GLsizei, |
| 395 GLsizei, | 409 GLsizei, |
| 396 GLsizei, | 410 GLsizei, |
| 397 GLenum, | 411 GLenum, |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 ExceptionState&); | 472 ExceptionState&); |
| 459 | 473 |
| 460 void texImage2D(GLenum, | 474 void texImage2D(GLenum, |
| 461 GLint, | 475 GLint, |
| 462 GLint, | 476 GLint, |
| 463 GLsizei, | 477 GLsizei, |
| 464 GLsizei, | 478 GLsizei, |
| 465 GLint, | 479 GLint, |
| 466 GLenum, | 480 GLenum, |
| 467 GLenum, | 481 GLenum, |
| 468 DOMArrayBufferView*); | 482 const NotShared<DOMArrayBufferView>&); |
| 469 void texSubImage2D(GLenum, | 483 void texSubImage2D(GLenum, |
| 470 GLint, | 484 GLint, |
| 471 GLint, | 485 GLint, |
| 472 GLint, | 486 GLint, |
| 473 GLsizei, | 487 GLsizei, |
| 474 GLsizei, | 488 GLsizei, |
| 475 GLenum, | 489 GLenum, |
| 476 GLenum, | 490 GLenum, |
| 477 DOMArrayBufferView*); | 491 const NotShared<DOMArrayBufferView>&); |
| 478 | 492 |
| 479 void copyTexSubImage3D(GLenum, | 493 void copyTexSubImage3D(GLenum, |
| 480 GLint, | 494 GLint, |
| 481 GLint, | 495 GLint, |
| 482 GLint, | 496 GLint, |
| 483 GLint, | 497 GLint, |
| 484 GLint, | 498 GLint, |
| 485 GLint, | 499 GLint, |
| 486 GLsizei, | 500 GLsizei, |
| 487 GLsizei); | 501 GLsizei); |
| 488 | 502 |
| 489 void compressedTexImage2D(GLenum target, | 503 void compressedTexImage2D(GLenum target, |
| 490 GLint level, | 504 GLint level, |
| 491 GLenum internalformat, | 505 GLenum internalformat, |
| 492 GLsizei width, | 506 GLsizei width, |
| 493 GLsizei height, | 507 GLsizei height, |
| 494 GLint border, | 508 GLint border, |
| 495 DOMArrayBufferView* data, | 509 const NotShared<DOMArrayBufferView>& data, |
| 496 GLuint srcOffset, | 510 GLuint srcOffset, |
| 497 GLuint srcLengthOverride); | 511 GLuint srcLengthOverride); |
| 498 void compressedTexSubImage2D(GLenum target, | 512 void compressedTexSubImage2D(GLenum target, |
| 499 GLint level, | 513 GLint level, |
| 500 GLint xoffset, | 514 GLint xoffset, |
| 501 GLint yoffset, | 515 GLint yoffset, |
| 502 GLsizei width, | 516 GLsizei width, |
| 503 GLsizei height, | 517 GLsizei height, |
| 504 GLenum format, | 518 GLenum format, |
| 505 DOMArrayBufferView* data, | 519 const NotShared<DOMArrayBufferView>& data, |
| 506 GLuint srcOffset, | 520 GLuint srcOffset, |
| 507 GLuint srcLengthOverride); | 521 GLuint srcLengthOverride); |
| 508 void compressedTexImage3D(GLenum, | 522 void compressedTexImage3D(GLenum, |
| 509 GLint, | 523 GLint, |
| 510 GLenum, | 524 GLenum, |
| 511 GLsizei, | 525 GLsizei, |
| 512 GLsizei, | 526 GLsizei, |
| 513 GLsizei, | 527 GLsizei, |
| 514 GLint, | 528 GLint, |
| 515 DOMArrayBufferView*, | 529 const NotShared<DOMArrayBufferView>&, |
| 516 GLuint, | 530 GLuint, |
| 517 GLuint); | 531 GLuint); |
| 518 void compressedTexSubImage3D(GLenum, | 532 void compressedTexSubImage3D(GLenum, |
| 519 GLint, | 533 GLint, |
| 520 GLint, | 534 GLint, |
| 521 GLint, | 535 GLint, |
| 522 GLint, | 536 GLint, |
| 523 GLsizei, | 537 GLsizei, |
| 524 GLsizei, | 538 GLsizei, |
| 525 GLsizei, | 539 GLsizei, |
| 526 GLenum, | 540 GLenum, |
| 527 DOMArrayBufferView*, | 541 const NotShared<DOMArrayBufferView>&, |
| 528 GLuint, | 542 GLuint, |
| 529 GLuint); | 543 GLuint); |
| 530 void compressedTexImage2D(GLenum target, | 544 void compressedTexImage2D(GLenum target, |
| 531 GLint level, | 545 GLint level, |
| 532 GLenum internalformat, | 546 GLenum internalformat, |
| 533 GLsizei width, | 547 GLsizei width, |
| 534 GLsizei height, | 548 GLsizei height, |
| 535 GLint border, | 549 GLint border, |
| 536 GLsizei imageSize, | 550 GLsizei imageSize, |
| 537 GLintptr offset); | 551 GLintptr offset); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 567 | 581 |
| 568 // Have to re-declare/re-define the following compressedTex{Sub}Image2D | 582 // Have to re-declare/re-define the following compressedTex{Sub}Image2D |
| 569 // functions from the base class. This is because the above | 583 // functions from the base class. This is because the above |
| 570 // compressedTex{Sub}Image2D() hide the name from base class. | 584 // compressedTex{Sub}Image2D() hide the name from base class. |
| 571 void compressedTexImage2D(GLenum target, | 585 void compressedTexImage2D(GLenum target, |
| 572 GLint level, | 586 GLint level, |
| 573 GLenum internalformat, | 587 GLenum internalformat, |
| 574 GLsizei width, | 588 GLsizei width, |
| 575 GLsizei height, | 589 GLsizei height, |
| 576 GLint border, | 590 GLint border, |
| 577 DOMArrayBufferView* data); | 591 const NotShared<DOMArrayBufferView>& data); |
| 578 void compressedTexSubImage2D(GLenum target, | 592 void compressedTexSubImage2D(GLenum target, |
| 579 GLint level, | 593 GLint level, |
| 580 GLint xoffset, | 594 GLint xoffset, |
| 581 GLint yoffset, | 595 GLint yoffset, |
| 582 GLsizei width, | 596 GLsizei width, |
| 583 GLsizei height, | 597 GLsizei height, |
| 584 GLenum format, | 598 GLenum format, |
| 585 DOMArrayBufferView* data); | 599 const NotShared<DOMArrayBufferView>& data); |
| 586 | 600 |
| 587 /* Programs and shaders */ | 601 /* Programs and shaders */ |
| 588 GLint getFragDataLocation(WebGLProgram*, const String&); | 602 GLint getFragDataLocation(WebGLProgram*, const String&); |
| 589 | 603 |
| 590 /* Uniforms and attributes */ | 604 /* Uniforms and attributes */ |
| 591 void uniform1ui(const WebGLUniformLocation*, GLuint); | 605 void uniform1ui(const WebGLUniformLocation*, GLuint); |
| 592 void uniform2ui(const WebGLUniformLocation*, GLuint, GLuint); | 606 void uniform2ui(const WebGLUniformLocation*, GLuint, GLuint); |
| 593 void uniform3ui(const WebGLUniformLocation*, GLuint, GLuint, GLuint); | 607 void uniform3ui(const WebGLUniformLocation*, GLuint, GLuint, GLuint); |
| 594 void uniform4ui(const WebGLUniformLocation*, GLuint, GLuint, GLuint, GLuint); | 608 void uniform4ui(const WebGLUniformLocation*, GLuint, GLuint, GLuint, GLuint); |
| 595 void uniform1fv(const WebGLUniformLocation*, | 609 void uniform1fv(const WebGLUniformLocation*, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 void uniform4uiv(const WebGLUniformLocation*, | 685 void uniform4uiv(const WebGLUniformLocation*, |
| 672 const FlexibleUint32ArrayView&, | 686 const FlexibleUint32ArrayView&, |
| 673 GLuint, | 687 GLuint, |
| 674 GLuint); | 688 GLuint); |
| 675 void uniform4uiv(const WebGLUniformLocation*, | 689 void uniform4uiv(const WebGLUniformLocation*, |
| 676 Vector<GLuint>&, | 690 Vector<GLuint>&, |
| 677 GLuint, | 691 GLuint, |
| 678 GLuint); | 692 GLuint); |
| 679 void uniformMatrix2fv(const WebGLUniformLocation*, | 693 void uniformMatrix2fv(const WebGLUniformLocation*, |
| 680 GLboolean, | 694 GLboolean, |
| 681 DOMFloat32Array*, | 695 const NotShared<DOMFloat32Array>&, |
| 682 GLuint, | 696 GLuint, |
| 683 GLuint); | 697 GLuint); |
| 684 void uniformMatrix2fv(const WebGLUniformLocation*, | 698 void uniformMatrix2fv(const WebGLUniformLocation*, |
| 685 GLboolean, | 699 GLboolean, |
| 686 Vector<GLfloat>&, | 700 Vector<GLfloat>&, |
| 687 GLuint, | 701 GLuint, |
| 688 GLuint); | 702 GLuint); |
| 689 void uniformMatrix3fv(const WebGLUniformLocation*, | 703 void uniformMatrix3fv(const WebGLUniformLocation*, |
| 690 GLboolean, | 704 GLboolean, |
| 691 DOMFloat32Array*, | 705 const NotShared<DOMFloat32Array>&, |
| 692 GLuint, | 706 GLuint, |
| 693 GLuint); | 707 GLuint); |
| 694 void uniformMatrix3fv(const WebGLUniformLocation*, | 708 void uniformMatrix3fv(const WebGLUniformLocation*, |
| 695 GLboolean, | 709 GLboolean, |
| 696 Vector<GLfloat>&, | 710 Vector<GLfloat>&, |
| 697 GLuint, | 711 GLuint, |
| 698 GLuint); | 712 GLuint); |
| 699 void uniformMatrix4fv(const WebGLUniformLocation*, | 713 void uniformMatrix4fv(const WebGLUniformLocation*, |
| 700 GLboolean, | 714 GLboolean, |
| 701 DOMFloat32Array*, | 715 const NotShared<DOMFloat32Array>&, |
| 702 GLuint, | 716 GLuint, |
| 703 GLuint); | 717 GLuint); |
| 704 void uniformMatrix4fv(const WebGLUniformLocation*, | 718 void uniformMatrix4fv(const WebGLUniformLocation*, |
| 705 GLboolean, | 719 GLboolean, |
| 706 Vector<GLfloat>&, | 720 Vector<GLfloat>&, |
| 707 GLuint, | 721 GLuint, |
| 708 GLuint); | 722 GLuint); |
| 709 void uniformMatrix2x3fv(const WebGLUniformLocation*, | 723 void uniformMatrix2x3fv(const WebGLUniformLocation*, |
| 710 GLboolean, | 724 GLboolean, |
| 711 DOMFloat32Array*, | 725 const NotShared<DOMFloat32Array>&, |
| 712 GLuint, | 726 GLuint, |
| 713 GLuint); | 727 GLuint); |
| 714 void uniformMatrix2x3fv(const WebGLUniformLocation*, | 728 void uniformMatrix2x3fv(const WebGLUniformLocation*, |
| 715 GLboolean, | 729 GLboolean, |
| 716 Vector<GLfloat>&, | 730 Vector<GLfloat>&, |
| 717 GLuint, | 731 GLuint, |
| 718 GLuint); | 732 GLuint); |
| 719 void uniformMatrix3x2fv(const WebGLUniformLocation*, | 733 void uniformMatrix3x2fv(const WebGLUniformLocation*, |
| 720 GLboolean, | 734 GLboolean, |
| 721 DOMFloat32Array*, | 735 const NotShared<DOMFloat32Array>&, |
| 722 GLuint, | 736 GLuint, |
| 723 GLuint); | 737 GLuint); |
| 724 void uniformMatrix3x2fv(const WebGLUniformLocation*, | 738 void uniformMatrix3x2fv(const WebGLUniformLocation*, |
| 725 GLboolean, | 739 GLboolean, |
| 726 Vector<GLfloat>&, | 740 Vector<GLfloat>&, |
| 727 GLuint, | 741 GLuint, |
| 728 GLuint); | 742 GLuint); |
| 729 void uniformMatrix2x4fv(const WebGLUniformLocation*, | 743 void uniformMatrix2x4fv(const WebGLUniformLocation*, |
| 730 GLboolean, | 744 GLboolean, |
| 731 DOMFloat32Array*, | 745 const NotShared<DOMFloat32Array>&, |
| 732 GLuint, | 746 GLuint, |
| 733 GLuint); | 747 GLuint); |
| 734 void uniformMatrix2x4fv(const WebGLUniformLocation*, | 748 void uniformMatrix2x4fv(const WebGLUniformLocation*, |
| 735 GLboolean, | 749 GLboolean, |
| 736 Vector<GLfloat>&, | 750 Vector<GLfloat>&, |
| 737 GLuint, | 751 GLuint, |
| 738 GLuint); | 752 GLuint); |
| 739 void uniformMatrix4x2fv(const WebGLUniformLocation*, | 753 void uniformMatrix4x2fv(const WebGLUniformLocation*, |
| 740 GLboolean, | 754 GLboolean, |
| 741 DOMFloat32Array*, | 755 const NotShared<DOMFloat32Array>&, |
| 742 GLuint, | 756 GLuint, |
| 743 GLuint); | 757 GLuint); |
| 744 void uniformMatrix4x2fv(const WebGLUniformLocation*, | 758 void uniformMatrix4x2fv(const WebGLUniformLocation*, |
| 745 GLboolean, | 759 GLboolean, |
| 746 Vector<GLfloat>&, | 760 Vector<GLfloat>&, |
| 747 GLuint, | 761 GLuint, |
| 748 GLuint); | 762 GLuint); |
| 749 void uniformMatrix3x4fv(const WebGLUniformLocation*, | 763 void uniformMatrix3x4fv(const WebGLUniformLocation*, |
| 750 GLboolean, | 764 GLboolean, |
| 751 DOMFloat32Array*, | 765 const NotShared<DOMFloat32Array>&, |
| 752 GLuint, | 766 GLuint, |
| 753 GLuint); | 767 GLuint); |
| 754 void uniformMatrix3x4fv(const WebGLUniformLocation*, | 768 void uniformMatrix3x4fv(const WebGLUniformLocation*, |
| 755 GLboolean, | 769 GLboolean, |
| 756 Vector<GLfloat>&, | 770 Vector<GLfloat>&, |
| 757 GLuint, | 771 GLuint, |
| 758 GLuint); | 772 GLuint); |
| 759 void uniformMatrix4x3fv(const WebGLUniformLocation*, | 773 void uniformMatrix4x3fv(const WebGLUniformLocation*, |
| 760 GLboolean, | 774 GLboolean, |
| 761 DOMFloat32Array*, | 775 const NotShared<DOMFloat32Array>&, |
| 762 GLuint, | 776 GLuint, |
| 763 GLuint); | 777 GLuint); |
| 764 void uniformMatrix4x3fv(const WebGLUniformLocation*, | 778 void uniformMatrix4x3fv(const WebGLUniformLocation*, |
| 765 GLboolean, | 779 GLboolean, |
| 766 Vector<GLfloat>&, | 780 Vector<GLfloat>&, |
| 767 GLuint, | 781 GLuint, |
| 768 GLuint); | 782 GLuint); |
| 769 // Have to re-declare/re-define the following uniform*() | 783 // Have to re-declare/re-define the following uniform*() |
| 770 // functions from the base class. This is because the above | 784 // functions from the base class. This is because the above |
| 771 // uniform*() hide the name from base class. | 785 // uniform*() hide the name from base class. |
| 772 void uniform1fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); | 786 void uniform1fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); |
| 773 void uniform1fv(const WebGLUniformLocation*, Vector<GLfloat>&); | 787 void uniform1fv(const WebGLUniformLocation*, Vector<GLfloat>&); |
| 774 void uniform2fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); | 788 void uniform2fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); |
| 775 void uniform2fv(const WebGLUniformLocation*, Vector<GLfloat>&); | 789 void uniform2fv(const WebGLUniformLocation*, Vector<GLfloat>&); |
| 776 void uniform3fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); | 790 void uniform3fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); |
| 777 void uniform3fv(const WebGLUniformLocation*, Vector<GLfloat>&); | 791 void uniform3fv(const WebGLUniformLocation*, Vector<GLfloat>&); |
| 778 void uniform4fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); | 792 void uniform4fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); |
| 779 void uniform4fv(const WebGLUniformLocation*, Vector<GLfloat>&); | 793 void uniform4fv(const WebGLUniformLocation*, Vector<GLfloat>&); |
| 780 void uniform1iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); | 794 void uniform1iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); |
| 781 void uniform1iv(const WebGLUniformLocation*, Vector<GLint>&); | 795 void uniform1iv(const WebGLUniformLocation*, Vector<GLint>&); |
| 782 void uniform2iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); | 796 void uniform2iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); |
| 783 void uniform2iv(const WebGLUniformLocation*, Vector<GLint>&); | 797 void uniform2iv(const WebGLUniformLocation*, Vector<GLint>&); |
| 784 void uniform3iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); | 798 void uniform3iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); |
| 785 void uniform3iv(const WebGLUniformLocation*, Vector<GLint>&); | 799 void uniform3iv(const WebGLUniformLocation*, Vector<GLint>&); |
| 786 void uniform4iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); | 800 void uniform4iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); |
| 787 void uniform4iv(const WebGLUniformLocation*, Vector<GLint>&); | 801 void uniform4iv(const WebGLUniformLocation*, Vector<GLint>&); |
| 788 void uniformMatrix2fv(const WebGLUniformLocation*, | 802 void uniformMatrix2fv(const WebGLUniformLocation*, |
| 789 GLboolean transpose, | 803 GLboolean transpose, |
| 790 DOMFloat32Array* value); | 804 const NotShared<DOMFloat32Array>& value); |
| 791 void uniformMatrix2fv(const WebGLUniformLocation*, | 805 void uniformMatrix2fv(const WebGLUniformLocation*, |
| 792 GLboolean transpose, | 806 GLboolean transpose, |
| 793 Vector<GLfloat>& value); | 807 Vector<GLfloat>& value); |
| 794 void uniformMatrix3fv(const WebGLUniformLocation*, | 808 void uniformMatrix3fv(const WebGLUniformLocation*, |
| 795 GLboolean transpose, | 809 GLboolean transpose, |
| 796 DOMFloat32Array* value); | 810 const NotShared<DOMFloat32Array>& value); |
| 797 void uniformMatrix3fv(const WebGLUniformLocation*, | 811 void uniformMatrix3fv(const WebGLUniformLocation*, |
| 798 GLboolean transpose, | 812 GLboolean transpose, |
| 799 Vector<GLfloat>& value); | 813 Vector<GLfloat>& value); |
| 800 void uniformMatrix4fv(const WebGLUniformLocation*, | 814 void uniformMatrix4fv(const WebGLUniformLocation*, |
| 801 GLboolean transpose, | 815 GLboolean transpose, |
| 802 DOMFloat32Array* value); | 816 const NotShared<DOMFloat32Array>& value); |
| 803 void uniformMatrix4fv(const WebGLUniformLocation*, | 817 void uniformMatrix4fv(const WebGLUniformLocation*, |
| 804 GLboolean transpose, | 818 GLboolean transpose, |
| 805 Vector<GLfloat>& value); | 819 Vector<GLfloat>& value); |
| 806 | 820 |
| 807 void vertexAttribI4i(GLuint, GLint, GLint, GLint, GLint); | 821 void vertexAttribI4i(GLuint, GLint, GLint, GLint, GLint); |
| 808 void vertexAttribI4iv(GLuint, const DOMInt32Array*); | 822 void vertexAttribI4iv(GLuint, const NotShared<const DOMInt32Array>&); |
| 809 void vertexAttribI4iv(GLuint, const Vector<GLint>&); | 823 void vertexAttribI4iv(GLuint, const Vector<GLint>&); |
| 810 void vertexAttribI4ui(GLuint, GLuint, GLuint, GLuint, GLuint); | 824 void vertexAttribI4ui(GLuint, GLuint, GLuint, GLuint, GLuint); |
| 811 void vertexAttribI4uiv(GLuint, const DOMUint32Array*); | 825 void vertexAttribI4uiv(GLuint, const NotShared<const DOMUint32Array>&); |
| 812 void vertexAttribI4uiv(GLuint, const Vector<GLuint>&); | 826 void vertexAttribI4uiv(GLuint, const Vector<GLuint>&); |
| 813 void vertexAttribIPointer(GLuint index, | 827 void vertexAttribIPointer(GLuint index, |
| 814 GLint size, | 828 GLint size, |
| 815 GLenum type, | 829 GLenum type, |
| 816 GLsizei stride, | 830 GLsizei stride, |
| 817 long long offset); | 831 long long offset); |
| 818 | 832 |
| 819 /* Writing to the drawing buffer */ | 833 /* Writing to the drawing buffer */ |
| 820 void vertexAttribDivisor(GLuint, GLuint); | 834 void vertexAttribDivisor(GLuint, GLuint); |
| 821 void drawArraysInstanced(GLenum, GLint, GLsizei, GLsizei); | 835 void drawArraysInstanced(GLenum, GLint, GLsizei, GLsizei); |
| 822 void drawElementsInstanced(GLenum, GLsizei, GLenum, long long, GLsizei); | 836 void drawElementsInstanced(GLenum, GLsizei, GLenum, long long, GLsizei); |
| 823 void drawRangeElements(GLenum mode, | 837 void drawRangeElements(GLenum mode, |
| 824 GLuint start, | 838 GLuint start, |
| 825 GLuint end, | 839 GLuint end, |
| 826 GLsizei count, | 840 GLsizei count, |
| 827 GLenum type, | 841 GLenum type, |
| 828 long long offset); | 842 long long offset); |
| 829 | 843 |
| 830 /* Multiple Render Targets */ | 844 /* Multiple Render Targets */ |
| 831 void drawBuffers(const Vector<GLenum>&); | 845 void drawBuffers(const Vector<GLenum>&); |
| 832 void clearBufferiv(GLenum, GLint, DOMInt32Array*); | 846 void clearBufferiv(GLenum, GLint, const NotShared<DOMInt32Array>&); |
| 833 void clearBufferiv(GLenum, GLint, const Vector<GLint>&); | 847 void clearBufferiv(GLenum, GLint, const Vector<GLint>&); |
| 834 void clearBufferuiv(GLenum, GLint, DOMUint32Array*); | 848 void clearBufferuiv(GLenum, GLint, const NotShared<DOMUint32Array>&); |
| 835 void clearBufferuiv(GLenum, GLint, const Vector<GLuint>&); | 849 void clearBufferuiv(GLenum, GLint, const Vector<GLuint>&); |
| 836 void clearBufferfv(GLenum, GLint, DOMFloat32Array*); | 850 void clearBufferfv(GLenum, GLint, const NotShared<DOMFloat32Array>&); |
| 837 void clearBufferfv(GLenum, GLint, const Vector<GLfloat>&); | 851 void clearBufferfv(GLenum, GLint, const Vector<GLfloat>&); |
| 838 void clearBufferfi(GLenum, GLint, GLfloat, GLint); | 852 void clearBufferfi(GLenum, GLint, GLfloat, GLint); |
| 839 | 853 |
| 840 /* Query Objects */ | 854 /* Query Objects */ |
| 841 WebGLQuery* createQuery(); | 855 WebGLQuery* createQuery(); |
| 842 void deleteQuery(WebGLQuery*); | 856 void deleteQuery(WebGLQuery*); |
| 843 GLboolean isQuery(WebGLQuery*); | 857 GLboolean isQuery(WebGLQuery*); |
| 844 void beginQuery(GLenum, WebGLQuery*); | 858 void beginQuery(GLenum, WebGLQuery*); |
| 845 void endQuery(GLenum); | 859 void endQuery(GLenum); |
| 846 ScriptValue getQuery(ScriptState*, GLenum, GLenum); | 860 ScriptValue getQuery(ScriptState*, GLenum, GLenum); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 GLboolean isVertexArray(WebGLVertexArrayObject*); | 915 GLboolean isVertexArray(WebGLVertexArrayObject*); |
| 902 void bindVertexArray(WebGLVertexArrayObject*); | 916 void bindVertexArray(WebGLVertexArrayObject*); |
| 903 | 917 |
| 904 /* Reading */ | 918 /* Reading */ |
| 905 void readPixels(GLint x, | 919 void readPixels(GLint x, |
| 906 GLint y, | 920 GLint y, |
| 907 GLsizei width, | 921 GLsizei width, |
| 908 GLsizei height, | 922 GLsizei height, |
| 909 GLenum format, | 923 GLenum format, |
| 910 GLenum type, | 924 GLenum type, |
| 911 DOMArrayBufferView* pixels, | 925 const NotShared<DOMArrayBufferView>& pixels, |
| 912 GLuint offset); | 926 GLuint offset); |
| 913 void readPixels(GLint x, | 927 void readPixels(GLint x, |
| 914 GLint y, | 928 GLint y, |
| 915 GLsizei width, | 929 GLsizei width, |
| 916 GLsizei height, | 930 GLsizei height, |
| 917 GLenum format, | 931 GLenum format, |
| 918 GLenum type, | 932 GLenum type, |
| 919 long long offset); | 933 long long offset); |
| 920 | 934 |
| 921 /* WebGLRenderingContextBase overrides */ | 935 /* WebGLRenderingContextBase overrides */ |
| 922 void initializeNewContext() override; | 936 void initializeNewContext() override; |
| 923 void bindFramebuffer(GLenum target, WebGLFramebuffer*) override; | 937 void bindFramebuffer(GLenum target, WebGLFramebuffer*) override; |
| 924 void deleteFramebuffer(WebGLFramebuffer*) override; | 938 void deleteFramebuffer(WebGLFramebuffer*) override; |
| 925 ScriptValue getParameter(ScriptState*, GLenum pname) override; | 939 ScriptValue getParameter(ScriptState*, GLenum pname) override; |
| 926 ScriptValue getTexParameter(ScriptState*, | 940 ScriptValue getTexParameter(ScriptState*, |
| 927 GLenum target, | 941 GLenum target, |
| 928 GLenum pname) override; | 942 GLenum pname) override; |
| 929 ScriptValue getFramebufferAttachmentParameter(ScriptState*, | 943 ScriptValue getFramebufferAttachmentParameter(ScriptState*, |
| 930 GLenum target, | 944 GLenum target, |
| 931 GLenum attachment, | 945 GLenum attachment, |
| 932 GLenum pname) override; | 946 GLenum pname) override; |
| 933 void pixelStorei(GLenum pname, GLint param) override; | 947 void pixelStorei(GLenum pname, GLint param) override; |
| 934 void readPixels(GLint x, | 948 void readPixels(GLint x, |
| 935 GLint y, | 949 GLint y, |
| 936 GLsizei width, | 950 GLsizei width, |
| 937 GLsizei height, | 951 GLsizei height, |
| 938 GLenum format, | 952 GLenum format, |
| 939 GLenum type, | 953 GLenum type, |
| 940 DOMArrayBufferView* pixels) override; | 954 const NotShared<DOMArrayBufferView>& pixels) override; |
| 941 void restoreCurrentFramebuffer() override; | 955 void restoreCurrentFramebuffer() override; |
| 942 | 956 |
| 943 DECLARE_VIRTUAL_TRACE(); | 957 DECLARE_VIRTUAL_TRACE(); |
| 944 DECLARE_VIRTUAL_TRACE_WRAPPERS(); | 958 DECLARE_VIRTUAL_TRACE_WRAPPERS(); |
| 945 | 959 |
| 946 protected: | 960 protected: |
| 947 friend class V8WebGL2RenderingContext; | 961 friend class V8WebGL2RenderingContext; |
| 948 friend class WebGLGetBufferSubDataAsync; | 962 friend class WebGLGetBufferSubDataAsync; |
| 949 | 963 |
| 950 WebGL2RenderingContextBase( | 964 WebGL2RenderingContextBase( |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 context, | 1131 context, |
| 1118 context->is3d() && | 1132 context->is3d() && |
| 1119 WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 1133 WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
| 1120 context.is3d() && | 1134 context.is3d() && |
| 1121 WebGLRenderingContextBase::getWebGLVersion(&context) >= | 1135 WebGLRenderingContextBase::getWebGLVersion(&context) >= |
| 1122 2); | 1136 2); |
| 1123 | 1137 |
| 1124 } // namespace blink | 1138 } // namespace blink |
| 1125 | 1139 |
| 1126 #endif | 1140 #endif |
| OLD | NEW |