| 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 14 matching lines...) Expand all Loading... |
| 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, | 34 void bufferData(GLenum, |
| 35 NotShared<DOMArrayBufferView>, | 35 MaybeShared<DOMArrayBufferView>, |
| 36 GLenum, | 36 GLenum, |
| 37 GLuint, | 37 GLuint, |
| 38 GLuint); | 38 GLuint); |
| 39 void bufferSubData(GLenum, | 39 void bufferSubData(GLenum, |
| 40 GLintptr, | 40 GLintptr, |
| 41 NotShared<DOMArrayBufferView>, | 41 MaybeShared<DOMArrayBufferView>, |
| 42 GLuint, | 42 GLuint, |
| 43 GLuint); | 43 GLuint); |
| 44 // 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 |
| 45 // 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 |
| 46 // from base class. | 46 // from base class. |
| 47 void bufferData(GLenum target, long long size, GLenum usage); | 47 void bufferData(GLenum target, long long size, GLenum usage); |
| 48 void bufferData(GLenum target, DOMArrayBuffer* data, GLenum usage); | 48 void bufferData(GLenum target, DOMArrayBuffer* data, GLenum usage); |
| 49 void bufferData(GLenum target, | 49 void bufferData(GLenum target, |
| 50 NotShared<DOMArrayBufferView> data, | 50 MaybeShared<DOMArrayBufferView> data, |
| 51 GLenum usage); | 51 GLenum usage); |
| 52 void bufferSubData(GLenum target, long long offset, DOMArrayBuffer* data); | 52 void bufferSubData(GLenum target, long long offset, DOMArrayBuffer* data); |
| 53 void bufferSubData(GLenum target, | 53 void bufferSubData(GLenum target, |
| 54 long long offset, | 54 long long offset, |
| 55 const FlexibleArrayBufferView& data); | 55 const FlexibleArrayBufferView& data); |
| 56 | 56 |
| 57 void copyBufferSubData(GLenum, GLenum, long long, long long, long long); | 57 void copyBufferSubData(GLenum, GLenum, long long, long long, long long); |
| 58 void getBufferSubData(GLenum, | 58 void getBufferSubData(GLenum, |
| 59 long long, | 59 long long, |
| 60 NotShared<DOMArrayBufferView>, | 60 MaybeShared<DOMArrayBufferView>, |
| 61 GLuint, | 61 GLuint, |
| 62 GLuint); | 62 GLuint); |
| 63 | 63 |
| 64 void RegisterGetBufferSubDataAsyncCallback( | 64 void RegisterGetBufferSubDataAsyncCallback( |
| 65 WebGLGetBufferSubDataAsyncCallback*); | 65 WebGLGetBufferSubDataAsyncCallback*); |
| 66 void UnregisterGetBufferSubDataAsyncCallback( | 66 void UnregisterGetBufferSubDataAsyncCallback( |
| 67 WebGLGetBufferSubDataAsyncCallback*); | 67 WebGLGetBufferSubDataAsyncCallback*); |
| 68 | 68 |
| 69 /* Framebuffer objects */ | 69 /* Framebuffer objects */ |
| 70 bool ValidateTexFuncLayer(const char*, GLenum tex_target, GLint layer); | 70 bool ValidateTexFuncLayer(const char*, GLenum tex_target, GLint layer); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 ImageBitmap*, | 156 ImageBitmap*, |
| 157 ExceptionState&); | 157 ExceptionState&); |
| 158 void texImage2D(GLenum, | 158 void texImage2D(GLenum, |
| 159 GLint, | 159 GLint, |
| 160 GLint, | 160 GLint, |
| 161 GLsizei, | 161 GLsizei, |
| 162 GLsizei, | 162 GLsizei, |
| 163 GLint, | 163 GLint, |
| 164 GLenum, | 164 GLenum, |
| 165 GLenum, | 165 GLenum, |
| 166 NotShared<DOMArrayBufferView>, | 166 MaybeShared<DOMArrayBufferView>, |
| 167 GLuint); | 167 GLuint); |
| 168 | 168 |
| 169 void texSubImage2D(GLenum, | 169 void texSubImage2D(GLenum, |
| 170 GLint, | 170 GLint, |
| 171 GLint, | 171 GLint, |
| 172 GLint, | 172 GLint, |
| 173 GLsizei, | 173 GLsizei, |
| 174 GLsizei, | 174 GLsizei, |
| 175 GLenum, | 175 GLenum, |
| 176 GLenum, | 176 GLenum, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 ImageBitmap*, | 225 ImageBitmap*, |
| 226 ExceptionState&); | 226 ExceptionState&); |
| 227 void texSubImage2D(GLenum, | 227 void texSubImage2D(GLenum, |
| 228 GLint, | 228 GLint, |
| 229 GLint, | 229 GLint, |
| 230 GLint, | 230 GLint, |
| 231 GLsizei, | 231 GLsizei, |
| 232 GLsizei, | 232 GLsizei, |
| 233 GLenum, | 233 GLenum, |
| 234 GLenum, | 234 GLenum, |
| 235 NotShared<DOMArrayBufferView>, | 235 MaybeShared<DOMArrayBufferView>, |
| 236 GLuint); | 236 GLuint); |
| 237 | 237 |
| 238 // 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 |
| 239 // 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 |
| 240 // from base class. | 240 // from base class. |
| 241 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, ImageData*); | 241 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, ImageData*); |
| 242 void texImage2D(GLenum, | 242 void texImage2D(GLenum, |
| 243 GLint, | 243 GLint, |
| 244 GLint, | 244 GLint, |
| 245 GLenum, | 245 GLenum, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 void texStorage3D(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei); | 305 void texStorage3D(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei); |
| 306 void texImage3D(GLenum, | 306 void texImage3D(GLenum, |
| 307 GLint, | 307 GLint, |
| 308 GLint, | 308 GLint, |
| 309 GLsizei, | 309 GLsizei, |
| 310 GLsizei, | 310 GLsizei, |
| 311 GLsizei, | 311 GLsizei, |
| 312 GLint, | 312 GLint, |
| 313 GLenum, | 313 GLenum, |
| 314 GLenum, | 314 GLenum, |
| 315 NotShared<DOMArrayBufferView>); | 315 MaybeShared<DOMArrayBufferView>); |
| 316 void texImage3D(GLenum, | 316 void texImage3D(GLenum, |
| 317 GLint, | 317 GLint, |
| 318 GLint, | 318 GLint, |
| 319 GLsizei, | 319 GLsizei, |
| 320 GLsizei, | 320 GLsizei, |
| 321 GLsizei, | 321 GLsizei, |
| 322 GLint, | 322 GLint, |
| 323 GLenum, | 323 GLenum, |
| 324 GLenum, | 324 GLenum, |
| 325 NotShared<DOMArrayBufferView>, | 325 MaybeShared<DOMArrayBufferView>, |
| 326 GLuint); | 326 GLuint); |
| 327 void texImage3D(GLenum, | 327 void texImage3D(GLenum, |
| 328 GLint, | 328 GLint, |
| 329 GLint, | 329 GLint, |
| 330 GLsizei, | 330 GLsizei, |
| 331 GLsizei, | 331 GLsizei, |
| 332 GLsizei, | 332 GLsizei, |
| 333 GLint, | 333 GLint, |
| 334 GLenum, | 334 GLenum, |
| 335 GLenum, | 335 GLenum, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 void texSubImage3D(GLenum, | 391 void texSubImage3D(GLenum, |
| 392 GLint, | 392 GLint, |
| 393 GLint, | 393 GLint, |
| 394 GLint, | 394 GLint, |
| 395 GLint, | 395 GLint, |
| 396 GLsizei, | 396 GLsizei, |
| 397 GLsizei, | 397 GLsizei, |
| 398 GLsizei, | 398 GLsizei, |
| 399 GLenum, | 399 GLenum, |
| 400 GLenum, | 400 GLenum, |
| 401 NotShared<DOMArrayBufferView>, | 401 MaybeShared<DOMArrayBufferView>, |
| 402 GLuint); | 402 GLuint); |
| 403 void texSubImage3D(GLenum, | 403 void texSubImage3D(GLenum, |
| 404 GLint, | 404 GLint, |
| 405 GLint, | 405 GLint, |
| 406 GLint, | 406 GLint, |
| 407 GLint, | 407 GLint, |
| 408 GLsizei, | 408 GLsizei, |
| 409 GLsizei, | 409 GLsizei, |
| 410 GLsizei, | 410 GLsizei, |
| 411 GLenum, | 411 GLenum, |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 ExceptionState&); | 472 ExceptionState&); |
| 473 | 473 |
| 474 void texImage2D(GLenum, | 474 void texImage2D(GLenum, |
| 475 GLint, | 475 GLint, |
| 476 GLint, | 476 GLint, |
| 477 GLsizei, | 477 GLsizei, |
| 478 GLsizei, | 478 GLsizei, |
| 479 GLint, | 479 GLint, |
| 480 GLenum, | 480 GLenum, |
| 481 GLenum, | 481 GLenum, |
| 482 NotShared<DOMArrayBufferView>); | 482 MaybeShared<DOMArrayBufferView>); |
| 483 void texSubImage2D(GLenum, | 483 void texSubImage2D(GLenum, |
| 484 GLint, | 484 GLint, |
| 485 GLint, | 485 GLint, |
| 486 GLint, | 486 GLint, |
| 487 GLsizei, | 487 GLsizei, |
| 488 GLsizei, | 488 GLsizei, |
| 489 GLenum, | 489 GLenum, |
| 490 GLenum, | 490 GLenum, |
| 491 NotShared<DOMArrayBufferView>); | 491 MaybeShared<DOMArrayBufferView>); |
| 492 | 492 |
| 493 void copyTexSubImage3D(GLenum, | 493 void copyTexSubImage3D(GLenum, |
| 494 GLint, | 494 GLint, |
| 495 GLint, | 495 GLint, |
| 496 GLint, | 496 GLint, |
| 497 GLint, | 497 GLint, |
| 498 GLint, | 498 GLint, |
| 499 GLint, | 499 GLint, |
| 500 GLsizei, | 500 GLsizei, |
| 501 GLsizei); | 501 GLsizei); |
| 502 | 502 |
| 503 void compressedTexImage2D(GLenum target, | 503 void compressedTexImage2D(GLenum target, |
| 504 GLint level, | 504 GLint level, |
| 505 GLenum internalformat, | 505 GLenum internalformat, |
| 506 GLsizei width, | 506 GLsizei width, |
| 507 GLsizei height, | 507 GLsizei height, |
| 508 GLint border, | 508 GLint border, |
| 509 NotShared<DOMArrayBufferView> data, | 509 MaybeShared<DOMArrayBufferView> data, |
| 510 GLuint src_offset, | 510 GLuint src_offset, |
| 511 GLuint src_length_override); | 511 GLuint src_length_override); |
| 512 void compressedTexSubImage2D(GLenum target, | 512 void compressedTexSubImage2D(GLenum target, |
| 513 GLint level, | 513 GLint level, |
| 514 GLint xoffset, | 514 GLint xoffset, |
| 515 GLint yoffset, | 515 GLint yoffset, |
| 516 GLsizei width, | 516 GLsizei width, |
| 517 GLsizei height, | 517 GLsizei height, |
| 518 GLenum format, | 518 GLenum format, |
| 519 NotShared<DOMArrayBufferView> data, | 519 MaybeShared<DOMArrayBufferView> data, |
| 520 GLuint src_offset, | 520 GLuint src_offset, |
| 521 GLuint src_length_override); | 521 GLuint src_length_override); |
| 522 void compressedTexImage3D(GLenum, | 522 void compressedTexImage3D(GLenum, |
| 523 GLint, | 523 GLint, |
| 524 GLenum, | 524 GLenum, |
| 525 GLsizei, | 525 GLsizei, |
| 526 GLsizei, | 526 GLsizei, |
| 527 GLsizei, | 527 GLsizei, |
| 528 GLint, | 528 GLint, |
| 529 NotShared<DOMArrayBufferView>, | 529 MaybeShared<DOMArrayBufferView>, |
| 530 GLuint, | 530 GLuint, |
| 531 GLuint); | 531 GLuint); |
| 532 void compressedTexSubImage3D(GLenum, | 532 void compressedTexSubImage3D(GLenum, |
| 533 GLint, | 533 GLint, |
| 534 GLint, | 534 GLint, |
| 535 GLint, | 535 GLint, |
| 536 GLint, | 536 GLint, |
| 537 GLsizei, | 537 GLsizei, |
| 538 GLsizei, | 538 GLsizei, |
| 539 GLsizei, | 539 GLsizei, |
| 540 GLenum, | 540 GLenum, |
| 541 NotShared<DOMArrayBufferView>, | 541 MaybeShared<DOMArrayBufferView>, |
| 542 GLuint, | 542 GLuint, |
| 543 GLuint); | 543 GLuint); |
| 544 void compressedTexImage2D(GLenum target, | 544 void compressedTexImage2D(GLenum target, |
| 545 GLint level, | 545 GLint level, |
| 546 GLenum internalformat, | 546 GLenum internalformat, |
| 547 GLsizei width, | 547 GLsizei width, |
| 548 GLsizei height, | 548 GLsizei height, |
| 549 GLint border, | 549 GLint border, |
| 550 GLsizei image_size, | 550 GLsizei image_size, |
| 551 GLintptr offset); | 551 GLintptr offset); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 581 | 581 |
| 582 // Have to re-declare/re-define the following compressedTex{Sub}Image2D | 582 // Have to re-declare/re-define the following compressedTex{Sub}Image2D |
| 583 // functions from the base class. This is because the above | 583 // functions from the base class. This is because the above |
| 584 // compressedTex{Sub}Image2D() hide the name from base class. | 584 // compressedTex{Sub}Image2D() hide the name from base class. |
| 585 void compressedTexImage2D(GLenum target, | 585 void compressedTexImage2D(GLenum target, |
| 586 GLint level, | 586 GLint level, |
| 587 GLenum internalformat, | 587 GLenum internalformat, |
| 588 GLsizei width, | 588 GLsizei width, |
| 589 GLsizei height, | 589 GLsizei height, |
| 590 GLint border, | 590 GLint border, |
| 591 NotShared<DOMArrayBufferView> data); | 591 MaybeShared<DOMArrayBufferView> data); |
| 592 void compressedTexSubImage2D(GLenum target, | 592 void compressedTexSubImage2D(GLenum target, |
| 593 GLint level, | 593 GLint level, |
| 594 GLint xoffset, | 594 GLint xoffset, |
| 595 GLint yoffset, | 595 GLint yoffset, |
| 596 GLsizei width, | 596 GLsizei width, |
| 597 GLsizei height, | 597 GLsizei height, |
| 598 GLenum format, | 598 GLenum format, |
| 599 NotShared<DOMArrayBufferView> data); | 599 MaybeShared<DOMArrayBufferView> data); |
| 600 | 600 |
| 601 /* Programs and shaders */ | 601 /* Programs and shaders */ |
| 602 GLint getFragDataLocation(WebGLProgram*, const String&); | 602 GLint getFragDataLocation(WebGLProgram*, const String&); |
| 603 | 603 |
| 604 /* Uniforms and attributes */ | 604 /* Uniforms and attributes */ |
| 605 void uniform1ui(const WebGLUniformLocation*, GLuint); | 605 void uniform1ui(const WebGLUniformLocation*, GLuint); |
| 606 void uniform2ui(const WebGLUniformLocation*, GLuint, GLuint); | 606 void uniform2ui(const WebGLUniformLocation*, GLuint, GLuint); |
| 607 void uniform3ui(const WebGLUniformLocation*, GLuint, GLuint, GLuint); | 607 void uniform3ui(const WebGLUniformLocation*, GLuint, GLuint, GLuint); |
| 608 void uniform4ui(const WebGLUniformLocation*, GLuint, GLuint, GLuint, GLuint); | 608 void uniform4ui(const WebGLUniformLocation*, GLuint, GLuint, GLuint, GLuint); |
| 609 void uniform1fv(const WebGLUniformLocation*, | 609 void uniform1fv(const WebGLUniformLocation*, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 void uniform4uiv(const WebGLUniformLocation*, | 685 void uniform4uiv(const WebGLUniformLocation*, |
| 686 const FlexibleUint32ArrayView&, | 686 const FlexibleUint32ArrayView&, |
| 687 GLuint, | 687 GLuint, |
| 688 GLuint); | 688 GLuint); |
| 689 void uniform4uiv(const WebGLUniformLocation*, | 689 void uniform4uiv(const WebGLUniformLocation*, |
| 690 Vector<GLuint>&, | 690 Vector<GLuint>&, |
| 691 GLuint, | 691 GLuint, |
| 692 GLuint); | 692 GLuint); |
| 693 void uniformMatrix2fv(const WebGLUniformLocation*, | 693 void uniformMatrix2fv(const WebGLUniformLocation*, |
| 694 GLboolean, | 694 GLboolean, |
| 695 NotShared<DOMFloat32Array>, | 695 MaybeShared<DOMFloat32Array>, |
| 696 GLuint, | 696 GLuint, |
| 697 GLuint); | 697 GLuint); |
| 698 void uniformMatrix2fv(const WebGLUniformLocation*, | 698 void uniformMatrix2fv(const WebGLUniformLocation*, |
| 699 GLboolean, | 699 GLboolean, |
| 700 Vector<GLfloat>&, | 700 Vector<GLfloat>&, |
| 701 GLuint, | 701 GLuint, |
| 702 GLuint); | 702 GLuint); |
| 703 void uniformMatrix3fv(const WebGLUniformLocation*, | 703 void uniformMatrix3fv(const WebGLUniformLocation*, |
| 704 GLboolean, | 704 GLboolean, |
| 705 NotShared<DOMFloat32Array>, | 705 MaybeShared<DOMFloat32Array>, |
| 706 GLuint, | 706 GLuint, |
| 707 GLuint); | 707 GLuint); |
| 708 void uniformMatrix3fv(const WebGLUniformLocation*, | 708 void uniformMatrix3fv(const WebGLUniformLocation*, |
| 709 GLboolean, | 709 GLboolean, |
| 710 Vector<GLfloat>&, | 710 Vector<GLfloat>&, |
| 711 GLuint, | 711 GLuint, |
| 712 GLuint); | 712 GLuint); |
| 713 void uniformMatrix4fv(const WebGLUniformLocation*, | 713 void uniformMatrix4fv(const WebGLUniformLocation*, |
| 714 GLboolean, | 714 GLboolean, |
| 715 NotShared<DOMFloat32Array>, | 715 MaybeShared<DOMFloat32Array>, |
| 716 GLuint, | 716 GLuint, |
| 717 GLuint); | 717 GLuint); |
| 718 void uniformMatrix4fv(const WebGLUniformLocation*, | 718 void uniformMatrix4fv(const WebGLUniformLocation*, |
| 719 GLboolean, | 719 GLboolean, |
| 720 Vector<GLfloat>&, | 720 Vector<GLfloat>&, |
| 721 GLuint, | 721 GLuint, |
| 722 GLuint); | 722 GLuint); |
| 723 void uniformMatrix2x3fv(const WebGLUniformLocation*, | 723 void uniformMatrix2x3fv(const WebGLUniformLocation*, |
| 724 GLboolean, | 724 GLboolean, |
| 725 NotShared<DOMFloat32Array>, | 725 MaybeShared<DOMFloat32Array>, |
| 726 GLuint, | 726 GLuint, |
| 727 GLuint); | 727 GLuint); |
| 728 void uniformMatrix2x3fv(const WebGLUniformLocation*, | 728 void uniformMatrix2x3fv(const WebGLUniformLocation*, |
| 729 GLboolean, | 729 GLboolean, |
| 730 Vector<GLfloat>&, | 730 Vector<GLfloat>&, |
| 731 GLuint, | 731 GLuint, |
| 732 GLuint); | 732 GLuint); |
| 733 void uniformMatrix3x2fv(const WebGLUniformLocation*, | 733 void uniformMatrix3x2fv(const WebGLUniformLocation*, |
| 734 GLboolean, | 734 GLboolean, |
| 735 NotShared<DOMFloat32Array>, | 735 MaybeShared<DOMFloat32Array>, |
| 736 GLuint, | 736 GLuint, |
| 737 GLuint); | 737 GLuint); |
| 738 void uniformMatrix3x2fv(const WebGLUniformLocation*, | 738 void uniformMatrix3x2fv(const WebGLUniformLocation*, |
| 739 GLboolean, | 739 GLboolean, |
| 740 Vector<GLfloat>&, | 740 Vector<GLfloat>&, |
| 741 GLuint, | 741 GLuint, |
| 742 GLuint); | 742 GLuint); |
| 743 void uniformMatrix2x4fv(const WebGLUniformLocation*, | 743 void uniformMatrix2x4fv(const WebGLUniformLocation*, |
| 744 GLboolean, | 744 GLboolean, |
| 745 NotShared<DOMFloat32Array>, | 745 MaybeShared<DOMFloat32Array>, |
| 746 GLuint, | 746 GLuint, |
| 747 GLuint); | 747 GLuint); |
| 748 void uniformMatrix2x4fv(const WebGLUniformLocation*, | 748 void uniformMatrix2x4fv(const WebGLUniformLocation*, |
| 749 GLboolean, | 749 GLboolean, |
| 750 Vector<GLfloat>&, | 750 Vector<GLfloat>&, |
| 751 GLuint, | 751 GLuint, |
| 752 GLuint); | 752 GLuint); |
| 753 void uniformMatrix4x2fv(const WebGLUniformLocation*, | 753 void uniformMatrix4x2fv(const WebGLUniformLocation*, |
| 754 GLboolean, | 754 GLboolean, |
| 755 NotShared<DOMFloat32Array>, | 755 MaybeShared<DOMFloat32Array>, |
| 756 GLuint, | 756 GLuint, |
| 757 GLuint); | 757 GLuint); |
| 758 void uniformMatrix4x2fv(const WebGLUniformLocation*, | 758 void uniformMatrix4x2fv(const WebGLUniformLocation*, |
| 759 GLboolean, | 759 GLboolean, |
| 760 Vector<GLfloat>&, | 760 Vector<GLfloat>&, |
| 761 GLuint, | 761 GLuint, |
| 762 GLuint); | 762 GLuint); |
| 763 void uniformMatrix3x4fv(const WebGLUniformLocation*, | 763 void uniformMatrix3x4fv(const WebGLUniformLocation*, |
| 764 GLboolean, | 764 GLboolean, |
| 765 NotShared<DOMFloat32Array>, | 765 MaybeShared<DOMFloat32Array>, |
| 766 GLuint, | 766 GLuint, |
| 767 GLuint); | 767 GLuint); |
| 768 void uniformMatrix3x4fv(const WebGLUniformLocation*, | 768 void uniformMatrix3x4fv(const WebGLUniformLocation*, |
| 769 GLboolean, | 769 GLboolean, |
| 770 Vector<GLfloat>&, | 770 Vector<GLfloat>&, |
| 771 GLuint, | 771 GLuint, |
| 772 GLuint); | 772 GLuint); |
| 773 void uniformMatrix4x3fv(const WebGLUniformLocation*, | 773 void uniformMatrix4x3fv(const WebGLUniformLocation*, |
| 774 GLboolean, | 774 GLboolean, |
| 775 NotShared<DOMFloat32Array>, | 775 MaybeShared<DOMFloat32Array>, |
| 776 GLuint, | 776 GLuint, |
| 777 GLuint); | 777 GLuint); |
| 778 void uniformMatrix4x3fv(const WebGLUniformLocation*, | 778 void uniformMatrix4x3fv(const WebGLUniformLocation*, |
| 779 GLboolean, | 779 GLboolean, |
| 780 Vector<GLfloat>&, | 780 Vector<GLfloat>&, |
| 781 GLuint, | 781 GLuint, |
| 782 GLuint); | 782 GLuint); |
| 783 // Have to re-declare/re-define the following uniform*() | 783 // Have to re-declare/re-define the following uniform*() |
| 784 // functions from the base class. This is because the above | 784 // functions from the base class. This is because the above |
| 785 // uniform*() hide the name from base class. | 785 // uniform*() hide the name from base class. |
| 786 void uniform1fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); | 786 void uniform1fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); |
| 787 void uniform1fv(const WebGLUniformLocation*, Vector<GLfloat>&); | 787 void uniform1fv(const WebGLUniformLocation*, Vector<GLfloat>&); |
| 788 void uniform2fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); | 788 void uniform2fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); |
| 789 void uniform2fv(const WebGLUniformLocation*, Vector<GLfloat>&); | 789 void uniform2fv(const WebGLUniformLocation*, Vector<GLfloat>&); |
| 790 void uniform3fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); | 790 void uniform3fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); |
| 791 void uniform3fv(const WebGLUniformLocation*, Vector<GLfloat>&); | 791 void uniform3fv(const WebGLUniformLocation*, Vector<GLfloat>&); |
| 792 void uniform4fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); | 792 void uniform4fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); |
| 793 void uniform4fv(const WebGLUniformLocation*, Vector<GLfloat>&); | 793 void uniform4fv(const WebGLUniformLocation*, Vector<GLfloat>&); |
| 794 void uniform1iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); | 794 void uniform1iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); |
| 795 void uniform1iv(const WebGLUniformLocation*, Vector<GLint>&); | 795 void uniform1iv(const WebGLUniformLocation*, Vector<GLint>&); |
| 796 void uniform2iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); | 796 void uniform2iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); |
| 797 void uniform2iv(const WebGLUniformLocation*, Vector<GLint>&); | 797 void uniform2iv(const WebGLUniformLocation*, Vector<GLint>&); |
| 798 void uniform3iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); | 798 void uniform3iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); |
| 799 void uniform3iv(const WebGLUniformLocation*, Vector<GLint>&); | 799 void uniform3iv(const WebGLUniformLocation*, Vector<GLint>&); |
| 800 void uniform4iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); | 800 void uniform4iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); |
| 801 void uniform4iv(const WebGLUniformLocation*, Vector<GLint>&); | 801 void uniform4iv(const WebGLUniformLocation*, Vector<GLint>&); |
| 802 void uniformMatrix2fv(const WebGLUniformLocation*, | 802 void uniformMatrix2fv(const WebGLUniformLocation*, |
| 803 GLboolean transpose, | 803 GLboolean transpose, |
| 804 NotShared<DOMFloat32Array> value); | 804 MaybeShared<DOMFloat32Array> value); |
| 805 void uniformMatrix2fv(const WebGLUniformLocation*, | 805 void uniformMatrix2fv(const WebGLUniformLocation*, |
| 806 GLboolean transpose, | 806 GLboolean transpose, |
| 807 Vector<GLfloat>& value); | 807 Vector<GLfloat>& value); |
| 808 void uniformMatrix3fv(const WebGLUniformLocation*, | 808 void uniformMatrix3fv(const WebGLUniformLocation*, |
| 809 GLboolean transpose, | 809 GLboolean transpose, |
| 810 NotShared<DOMFloat32Array> value); | 810 MaybeShared<DOMFloat32Array> value); |
| 811 void uniformMatrix3fv(const WebGLUniformLocation*, | 811 void uniformMatrix3fv(const WebGLUniformLocation*, |
| 812 GLboolean transpose, | 812 GLboolean transpose, |
| 813 Vector<GLfloat>& value); | 813 Vector<GLfloat>& value); |
| 814 void uniformMatrix4fv(const WebGLUniformLocation*, | 814 void uniformMatrix4fv(const WebGLUniformLocation*, |
| 815 GLboolean transpose, | 815 GLboolean transpose, |
| 816 NotShared<DOMFloat32Array> value); | 816 MaybeShared<DOMFloat32Array> value); |
| 817 void uniformMatrix4fv(const WebGLUniformLocation*, | 817 void uniformMatrix4fv(const WebGLUniformLocation*, |
| 818 GLboolean transpose, | 818 GLboolean transpose, |
| 819 Vector<GLfloat>& value); | 819 Vector<GLfloat>& value); |
| 820 | 820 |
| 821 void vertexAttribI4i(GLuint, GLint, GLint, GLint, GLint); | 821 void vertexAttribI4i(GLuint, GLint, GLint, GLint, GLint); |
| 822 void vertexAttribI4iv(GLuint, NotShared<const DOMInt32Array>); | 822 void vertexAttribI4iv(GLuint, MaybeShared<const DOMInt32Array>); |
| 823 void vertexAttribI4iv(GLuint, const Vector<GLint>&); | 823 void vertexAttribI4iv(GLuint, const Vector<GLint>&); |
| 824 void vertexAttribI4ui(GLuint, GLuint, GLuint, GLuint, GLuint); | 824 void vertexAttribI4ui(GLuint, GLuint, GLuint, GLuint, GLuint); |
| 825 void vertexAttribI4uiv(GLuint, NotShared<const DOMUint32Array>); | 825 void vertexAttribI4uiv(GLuint, MaybeShared<const DOMUint32Array>); |
| 826 void vertexAttribI4uiv(GLuint, const Vector<GLuint>&); | 826 void vertexAttribI4uiv(GLuint, const Vector<GLuint>&); |
| 827 void vertexAttribIPointer(GLuint index, | 827 void vertexAttribIPointer(GLuint index, |
| 828 GLint size, | 828 GLint size, |
| 829 GLenum type, | 829 GLenum type, |
| 830 GLsizei stride, | 830 GLsizei stride, |
| 831 long long offset); | 831 long long offset); |
| 832 | 832 |
| 833 /* Writing to the drawing buffer */ | 833 /* Writing to the drawing buffer */ |
| 834 void vertexAttribDivisor(GLuint, GLuint); | 834 void vertexAttribDivisor(GLuint, GLuint); |
| 835 void drawArraysInstanced(GLenum, GLint, GLsizei, GLsizei); | 835 void drawArraysInstanced(GLenum, GLint, GLsizei, GLsizei); |
| 836 void drawElementsInstanced(GLenum, GLsizei, GLenum, long long, GLsizei); | 836 void drawElementsInstanced(GLenum, GLsizei, GLenum, long long, GLsizei); |
| 837 void drawRangeElements(GLenum mode, | 837 void drawRangeElements(GLenum mode, |
| 838 GLuint start, | 838 GLuint start, |
| 839 GLuint end, | 839 GLuint end, |
| 840 GLsizei count, | 840 GLsizei count, |
| 841 GLenum type, | 841 GLenum type, |
| 842 long long offset); | 842 long long offset); |
| 843 | 843 |
| 844 /* Multiple Render Targets */ | 844 /* Multiple Render Targets */ |
| 845 void drawBuffers(const Vector<GLenum>&); | 845 void drawBuffers(const Vector<GLenum>&); |
| 846 void clearBufferiv(GLenum, GLint, NotShared<DOMInt32Array>); | 846 void clearBufferiv(GLenum, GLint, MaybeShared<DOMInt32Array>); |
| 847 void clearBufferiv(GLenum, GLint, const Vector<GLint>&); | 847 void clearBufferiv(GLenum, GLint, const Vector<GLint>&); |
| 848 void clearBufferuiv(GLenum, GLint, NotShared<DOMUint32Array>); | 848 void clearBufferuiv(GLenum, GLint, MaybeShared<DOMUint32Array>); |
| 849 void clearBufferuiv(GLenum, GLint, const Vector<GLuint>&); | 849 void clearBufferuiv(GLenum, GLint, const Vector<GLuint>&); |
| 850 void clearBufferfv(GLenum, GLint, NotShared<DOMFloat32Array>); | 850 void clearBufferfv(GLenum, GLint, MaybeShared<DOMFloat32Array>); |
| 851 void clearBufferfv(GLenum, GLint, const Vector<GLfloat>&); | 851 void clearBufferfv(GLenum, GLint, const Vector<GLfloat>&); |
| 852 void clearBufferfi(GLenum, GLint, GLfloat, GLint); | 852 void clearBufferfi(GLenum, GLint, GLfloat, GLint); |
| 853 | 853 |
| 854 /* Query Objects */ | 854 /* Query Objects */ |
| 855 WebGLQuery* createQuery(); | 855 WebGLQuery* createQuery(); |
| 856 void deleteQuery(WebGLQuery*); | 856 void deleteQuery(WebGLQuery*); |
| 857 GLboolean isQuery(WebGLQuery*); | 857 GLboolean isQuery(WebGLQuery*); |
| 858 void beginQuery(GLenum, WebGLQuery*); | 858 void beginQuery(GLenum, WebGLQuery*); |
| 859 void endQuery(GLenum); | 859 void endQuery(GLenum); |
| 860 ScriptValue getQuery(ScriptState*, GLenum, GLenum); | 860 ScriptValue getQuery(ScriptState*, GLenum, GLenum); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 GLboolean isVertexArray(WebGLVertexArrayObject*); | 915 GLboolean isVertexArray(WebGLVertexArrayObject*); |
| 916 void bindVertexArray(WebGLVertexArrayObject*); | 916 void bindVertexArray(WebGLVertexArrayObject*); |
| 917 | 917 |
| 918 /* Reading */ | 918 /* Reading */ |
| 919 void readPixels(GLint x, | 919 void readPixels(GLint x, |
| 920 GLint y, | 920 GLint y, |
| 921 GLsizei width, | 921 GLsizei width, |
| 922 GLsizei height, | 922 GLsizei height, |
| 923 GLenum format, | 923 GLenum format, |
| 924 GLenum type, | 924 GLenum type, |
| 925 NotShared<DOMArrayBufferView> pixels, | 925 MaybeShared<DOMArrayBufferView> pixels, |
| 926 GLuint offset); | 926 GLuint offset); |
| 927 void readPixels(GLint x, | 927 void readPixels(GLint x, |
| 928 GLint y, | 928 GLint y, |
| 929 GLsizei width, | 929 GLsizei width, |
| 930 GLsizei height, | 930 GLsizei height, |
| 931 GLenum format, | 931 GLenum format, |
| 932 GLenum type, | 932 GLenum type, |
| 933 long long offset); | 933 long long offset); |
| 934 | 934 |
| 935 /* WebGLRenderingContextBase overrides */ | 935 /* WebGLRenderingContextBase overrides */ |
| 936 void InitializeNewContext() override; | 936 void InitializeNewContext() override; |
| 937 void bindFramebuffer(GLenum target, WebGLFramebuffer*) override; | 937 void bindFramebuffer(GLenum target, WebGLFramebuffer*) override; |
| 938 void deleteFramebuffer(WebGLFramebuffer*) override; | 938 void deleteFramebuffer(WebGLFramebuffer*) override; |
| 939 ScriptValue getParameter(ScriptState*, GLenum pname) override; | 939 ScriptValue getParameter(ScriptState*, GLenum pname) override; |
| 940 ScriptValue getTexParameter(ScriptState*, | 940 ScriptValue getTexParameter(ScriptState*, |
| 941 GLenum target, | 941 GLenum target, |
| 942 GLenum pname) override; | 942 GLenum pname) override; |
| 943 ScriptValue getFramebufferAttachmentParameter(ScriptState*, | 943 ScriptValue getFramebufferAttachmentParameter(ScriptState*, |
| 944 GLenum target, | 944 GLenum target, |
| 945 GLenum attachment, | 945 GLenum attachment, |
| 946 GLenum pname) override; | 946 GLenum pname) override; |
| 947 void pixelStorei(GLenum pname, GLint param) override; | 947 void pixelStorei(GLenum pname, GLint param) override; |
| 948 void readPixels(GLint x, | 948 void readPixels(GLint x, |
| 949 GLint y, | 949 GLint y, |
| 950 GLsizei width, | 950 GLsizei width, |
| 951 GLsizei height, | 951 GLsizei height, |
| 952 GLenum format, | 952 GLenum format, |
| 953 GLenum type, | 953 GLenum type, |
| 954 NotShared<DOMArrayBufferView> pixels) override; | 954 MaybeShared<DOMArrayBufferView> pixels) override; |
| 955 void RestoreCurrentFramebuffer() override; | 955 void RestoreCurrentFramebuffer() override; |
| 956 | 956 |
| 957 DECLARE_VIRTUAL_TRACE(); | 957 DECLARE_VIRTUAL_TRACE(); |
| 958 DECLARE_VIRTUAL_TRACE_WRAPPERS(); | 958 DECLARE_VIRTUAL_TRACE_WRAPPERS(); |
| 959 | 959 |
| 960 protected: | 960 protected: |
| 961 friend class V8WebGL2RenderingContext; | 961 friend class V8WebGL2RenderingContext; |
| 962 friend class WebGLGetBufferSubDataAsync; | 962 friend class WebGLGetBufferSubDataAsync; |
| 963 | 963 |
| 964 WebGL2RenderingContextBase( | 964 WebGL2RenderingContextBase( |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1128 context, | 1128 context, |
| 1129 context->Is3d() && | 1129 context->Is3d() && |
| 1130 WebGLRenderingContextBase::GetWebGLVersion(context) >= 2, | 1130 WebGLRenderingContextBase::GetWebGLVersion(context) >= 2, |
| 1131 context.Is3d() && | 1131 context.Is3d() && |
| 1132 WebGLRenderingContextBase::GetWebGLVersion(&context) >= | 1132 WebGLRenderingContextBase::GetWebGLVersion(&context) >= |
| 1133 2); | 1133 2); |
| 1134 | 1134 |
| 1135 } // namespace blink | 1135 } // namespace blink |
| 1136 | 1136 |
| 1137 #endif | 1137 #endif |
| OLD | NEW |