| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 ImageBitmap*, | 159 ImageBitmap*, |
| 160 ExceptionState&); | 160 ExceptionState&); |
| 161 void texImage2D(GLenum, | 161 void texImage2D(GLenum, |
| 162 GLint, | 162 GLint, |
| 163 GLint, | 163 GLint, |
| 164 GLsizei, | 164 GLsizei, |
| 165 GLsizei, | 165 GLsizei, |
| 166 GLint, | 166 GLint, |
| 167 GLenum, | 167 GLenum, |
| 168 GLenum, | 168 GLenum, |
| 169 NotShared<DOMArrayBufferView>, | 169 MaybeShared<DOMArrayBufferView>, |
| 170 GLuint); | 170 GLuint); |
| 171 | 171 |
| 172 void texSubImage2D(GLenum, | 172 void texSubImage2D(GLenum, |
| 173 GLint, | 173 GLint, |
| 174 GLint, | 174 GLint, |
| 175 GLint, | 175 GLint, |
| 176 GLsizei, | 176 GLsizei, |
| 177 GLsizei, | 177 GLsizei, |
| 178 GLenum, | 178 GLenum, |
| 179 GLenum, | 179 GLenum, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 ImageBitmap*, | 231 ImageBitmap*, |
| 232 ExceptionState&); | 232 ExceptionState&); |
| 233 void texSubImage2D(GLenum, | 233 void texSubImage2D(GLenum, |
| 234 GLint, | 234 GLint, |
| 235 GLint, | 235 GLint, |
| 236 GLint, | 236 GLint, |
| 237 GLsizei, | 237 GLsizei, |
| 238 GLsizei, | 238 GLsizei, |
| 239 GLenum, | 239 GLenum, |
| 240 GLenum, | 240 GLenum, |
| 241 NotShared<DOMArrayBufferView>, | 241 MaybeShared<DOMArrayBufferView>, |
| 242 GLuint); | 242 GLuint); |
| 243 | 243 |
| 244 // Have to re-declare/re-define the following tex{Sub}Image2D functions from | 244 // Have to re-declare/re-define the following tex{Sub}Image2D functions from |
| 245 // base class. This is because the above tex{Sub}Image2D() hides the name | 245 // base class. This is because the above tex{Sub}Image2D() hides the name |
| 246 // from base class. | 246 // from base class. |
| 247 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, ImageData*); | 247 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, ImageData*); |
| 248 void texImage2D(ExecutionContext*, | 248 void texImage2D(ExecutionContext*, |
| 249 GLenum, | 249 GLenum, |
| 250 GLint, | 250 GLint, |
| 251 GLint, | 251 GLint, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 void texStorage3D(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei); | 317 void texStorage3D(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei); |
| 318 void texImage3D(GLenum, | 318 void texImage3D(GLenum, |
| 319 GLint, | 319 GLint, |
| 320 GLint, | 320 GLint, |
| 321 GLsizei, | 321 GLsizei, |
| 322 GLsizei, | 322 GLsizei, |
| 323 GLsizei, | 323 GLsizei, |
| 324 GLint, | 324 GLint, |
| 325 GLenum, | 325 GLenum, |
| 326 GLenum, | 326 GLenum, |
| 327 NotShared<DOMArrayBufferView>); | 327 MaybeShared<DOMArrayBufferView>); |
| 328 void texImage3D(GLenum, | 328 void texImage3D(GLenum, |
| 329 GLint, | 329 GLint, |
| 330 GLint, | 330 GLint, |
| 331 GLsizei, | 331 GLsizei, |
| 332 GLsizei, | 332 GLsizei, |
| 333 GLsizei, | 333 GLsizei, |
| 334 GLint, | 334 GLint, |
| 335 GLenum, | 335 GLenum, |
| 336 GLenum, | 336 GLenum, |
| 337 NotShared<DOMArrayBufferView>, | 337 MaybeShared<DOMArrayBufferView>, |
| 338 GLuint); | 338 GLuint); |
| 339 void texImage3D(GLenum, | 339 void texImage3D(GLenum, |
| 340 GLint, | 340 GLint, |
| 341 GLint, | 341 GLint, |
| 342 GLsizei, | 342 GLsizei, |
| 343 GLsizei, | 343 GLsizei, |
| 344 GLsizei, | 344 GLsizei, |
| 345 GLint, | 345 GLint, |
| 346 GLenum, | 346 GLenum, |
| 347 GLenum, | 347 GLenum, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 void texSubImage3D(GLenum, | 406 void texSubImage3D(GLenum, |
| 407 GLint, | 407 GLint, |
| 408 GLint, | 408 GLint, |
| 409 GLint, | 409 GLint, |
| 410 GLint, | 410 GLint, |
| 411 GLsizei, | 411 GLsizei, |
| 412 GLsizei, | 412 GLsizei, |
| 413 GLsizei, | 413 GLsizei, |
| 414 GLenum, | 414 GLenum, |
| 415 GLenum, | 415 GLenum, |
| 416 NotShared<DOMArrayBufferView>, | 416 MaybeShared<DOMArrayBufferView>, |
| 417 GLuint); | 417 GLuint); |
| 418 void texSubImage3D(GLenum, | 418 void texSubImage3D(GLenum, |
| 419 GLint, | 419 GLint, |
| 420 GLint, | 420 GLint, |
| 421 GLint, | 421 GLint, |
| 422 GLint, | 422 GLint, |
| 423 GLsizei, | 423 GLsizei, |
| 424 GLsizei, | 424 GLsizei, |
| 425 GLsizei, | 425 GLsizei, |
| 426 GLenum, | 426 GLenum, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 ExceptionState&); | 490 ExceptionState&); |
| 491 | 491 |
| 492 void texImage2D(GLenum, | 492 void texImage2D(GLenum, |
| 493 GLint, | 493 GLint, |
| 494 GLint, | 494 GLint, |
| 495 GLsizei, | 495 GLsizei, |
| 496 GLsizei, | 496 GLsizei, |
| 497 GLint, | 497 GLint, |
| 498 GLenum, | 498 GLenum, |
| 499 GLenum, | 499 GLenum, |
| 500 NotShared<DOMArrayBufferView>); | 500 MaybeShared<DOMArrayBufferView>); |
| 501 void texSubImage2D(GLenum, | 501 void texSubImage2D(GLenum, |
| 502 GLint, | 502 GLint, |
| 503 GLint, | 503 GLint, |
| 504 GLint, | 504 GLint, |
| 505 GLsizei, | 505 GLsizei, |
| 506 GLsizei, | 506 GLsizei, |
| 507 GLenum, | 507 GLenum, |
| 508 GLenum, | 508 GLenum, |
| 509 NotShared<DOMArrayBufferView>); | 509 MaybeShared<DOMArrayBufferView>); |
| 510 | 510 |
| 511 void copyTexSubImage3D(GLenum, | 511 void copyTexSubImage3D(GLenum, |
| 512 GLint, | 512 GLint, |
| 513 GLint, | 513 GLint, |
| 514 GLint, | 514 GLint, |
| 515 GLint, | 515 GLint, |
| 516 GLint, | 516 GLint, |
| 517 GLint, | 517 GLint, |
| 518 GLsizei, | 518 GLsizei, |
| 519 GLsizei); | 519 GLsizei); |
| 520 | 520 |
| 521 void compressedTexImage2D(GLenum target, | 521 void compressedTexImage2D(GLenum target, |
| 522 GLint level, | 522 GLint level, |
| 523 GLenum internalformat, | 523 GLenum internalformat, |
| 524 GLsizei width, | 524 GLsizei width, |
| 525 GLsizei height, | 525 GLsizei height, |
| 526 GLint border, | 526 GLint border, |
| 527 NotShared<DOMArrayBufferView> data, | 527 MaybeShared<DOMArrayBufferView> data, |
| 528 GLuint src_offset, | 528 GLuint src_offset, |
| 529 GLuint src_length_override); | 529 GLuint src_length_override); |
| 530 void compressedTexSubImage2D(GLenum target, | 530 void compressedTexSubImage2D(GLenum target, |
| 531 GLint level, | 531 GLint level, |
| 532 GLint xoffset, | 532 GLint xoffset, |
| 533 GLint yoffset, | 533 GLint yoffset, |
| 534 GLsizei width, | 534 GLsizei width, |
| 535 GLsizei height, | 535 GLsizei height, |
| 536 GLenum format, | 536 GLenum format, |
| 537 NotShared<DOMArrayBufferView> data, | 537 MaybeShared<DOMArrayBufferView> data, |
| 538 GLuint src_offset, | 538 GLuint src_offset, |
| 539 GLuint src_length_override); | 539 GLuint src_length_override); |
| 540 void compressedTexImage3D(GLenum, | 540 void compressedTexImage3D(GLenum, |
| 541 GLint, | 541 GLint, |
| 542 GLenum, | 542 GLenum, |
| 543 GLsizei, | 543 GLsizei, |
| 544 GLsizei, | 544 GLsizei, |
| 545 GLsizei, | 545 GLsizei, |
| 546 GLint, | 546 GLint, |
| 547 NotShared<DOMArrayBufferView>, | 547 MaybeShared<DOMArrayBufferView>, |
| 548 GLuint, | 548 GLuint, |
| 549 GLuint); | 549 GLuint); |
| 550 void compressedTexSubImage3D(GLenum, | 550 void compressedTexSubImage3D(GLenum, |
| 551 GLint, | 551 GLint, |
| 552 GLint, | 552 GLint, |
| 553 GLint, | 553 GLint, |
| 554 GLint, | 554 GLint, |
| 555 GLsizei, | 555 GLsizei, |
| 556 GLsizei, | 556 GLsizei, |
| 557 GLsizei, | 557 GLsizei, |
| 558 GLenum, | 558 GLenum, |
| 559 NotShared<DOMArrayBufferView>, | 559 MaybeShared<DOMArrayBufferView>, |
| 560 GLuint, | 560 GLuint, |
| 561 GLuint); | 561 GLuint); |
| 562 void compressedTexImage2D(GLenum target, | 562 void compressedTexImage2D(GLenum target, |
| 563 GLint level, | 563 GLint level, |
| 564 GLenum internalformat, | 564 GLenum internalformat, |
| 565 GLsizei width, | 565 GLsizei width, |
| 566 GLsizei height, | 566 GLsizei height, |
| 567 GLint border, | 567 GLint border, |
| 568 GLsizei image_size, | 568 GLsizei image_size, |
| 569 GLintptr offset); | 569 GLintptr offset); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 599 | 599 |
| 600 // Have to re-declare/re-define the following compressedTex{Sub}Image2D | 600 // Have to re-declare/re-define the following compressedTex{Sub}Image2D |
| 601 // functions from the base class. This is because the above | 601 // functions from the base class. This is because the above |
| 602 // compressedTex{Sub}Image2D() hide the name from base class. | 602 // compressedTex{Sub}Image2D() hide the name from base class. |
| 603 void compressedTexImage2D(GLenum target, | 603 void compressedTexImage2D(GLenum target, |
| 604 GLint level, | 604 GLint level, |
| 605 GLenum internalformat, | 605 GLenum internalformat, |
| 606 GLsizei width, | 606 GLsizei width, |
| 607 GLsizei height, | 607 GLsizei height, |
| 608 GLint border, | 608 GLint border, |
| 609 NotShared<DOMArrayBufferView> data); | 609 MaybeShared<DOMArrayBufferView> data); |
| 610 void compressedTexSubImage2D(GLenum target, | 610 void compressedTexSubImage2D(GLenum target, |
| 611 GLint level, | 611 GLint level, |
| 612 GLint xoffset, | 612 GLint xoffset, |
| 613 GLint yoffset, | 613 GLint yoffset, |
| 614 GLsizei width, | 614 GLsizei width, |
| 615 GLsizei height, | 615 GLsizei height, |
| 616 GLenum format, | 616 GLenum format, |
| 617 NotShared<DOMArrayBufferView> data); | 617 MaybeShared<DOMArrayBufferView> data); |
| 618 | 618 |
| 619 /* Programs and shaders */ | 619 /* Programs and shaders */ |
| 620 GLint getFragDataLocation(WebGLProgram*, const String&); | 620 GLint getFragDataLocation(WebGLProgram*, const String&); |
| 621 | 621 |
| 622 /* Uniforms and attributes */ | 622 /* Uniforms and attributes */ |
| 623 void uniform1ui(const WebGLUniformLocation*, GLuint); | 623 void uniform1ui(const WebGLUniformLocation*, GLuint); |
| 624 void uniform2ui(const WebGLUniformLocation*, GLuint, GLuint); | 624 void uniform2ui(const WebGLUniformLocation*, GLuint, GLuint); |
| 625 void uniform3ui(const WebGLUniformLocation*, GLuint, GLuint, GLuint); | 625 void uniform3ui(const WebGLUniformLocation*, GLuint, GLuint, GLuint); |
| 626 void uniform4ui(const WebGLUniformLocation*, GLuint, GLuint, GLuint, GLuint); | 626 void uniform4ui(const WebGLUniformLocation*, GLuint, GLuint, GLuint, GLuint); |
| 627 void uniform1fv(const WebGLUniformLocation*, | 627 void uniform1fv(const WebGLUniformLocation*, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 void uniform4uiv(const WebGLUniformLocation*, | 703 void uniform4uiv(const WebGLUniformLocation*, |
| 704 const FlexibleUint32ArrayView&, | 704 const FlexibleUint32ArrayView&, |
| 705 GLuint, | 705 GLuint, |
| 706 GLuint); | 706 GLuint); |
| 707 void uniform4uiv(const WebGLUniformLocation*, | 707 void uniform4uiv(const WebGLUniformLocation*, |
| 708 Vector<GLuint>&, | 708 Vector<GLuint>&, |
| 709 GLuint, | 709 GLuint, |
| 710 GLuint); | 710 GLuint); |
| 711 void uniformMatrix2fv(const WebGLUniformLocation*, | 711 void uniformMatrix2fv(const WebGLUniformLocation*, |
| 712 GLboolean, | 712 GLboolean, |
| 713 NotShared<DOMFloat32Array>, | 713 MaybeShared<DOMFloat32Array>, |
| 714 GLuint, | 714 GLuint, |
| 715 GLuint); | 715 GLuint); |
| 716 void uniformMatrix2fv(const WebGLUniformLocation*, | 716 void uniformMatrix2fv(const WebGLUniformLocation*, |
| 717 GLboolean, | 717 GLboolean, |
| 718 Vector<GLfloat>&, | 718 Vector<GLfloat>&, |
| 719 GLuint, | 719 GLuint, |
| 720 GLuint); | 720 GLuint); |
| 721 void uniformMatrix3fv(const WebGLUniformLocation*, | 721 void uniformMatrix3fv(const WebGLUniformLocation*, |
| 722 GLboolean, | 722 GLboolean, |
| 723 NotShared<DOMFloat32Array>, | 723 MaybeShared<DOMFloat32Array>, |
| 724 GLuint, | 724 GLuint, |
| 725 GLuint); | 725 GLuint); |
| 726 void uniformMatrix3fv(const WebGLUniformLocation*, | 726 void uniformMatrix3fv(const WebGLUniformLocation*, |
| 727 GLboolean, | 727 GLboolean, |
| 728 Vector<GLfloat>&, | 728 Vector<GLfloat>&, |
| 729 GLuint, | 729 GLuint, |
| 730 GLuint); | 730 GLuint); |
| 731 void uniformMatrix4fv(const WebGLUniformLocation*, | 731 void uniformMatrix4fv(const WebGLUniformLocation*, |
| 732 GLboolean, | 732 GLboolean, |
| 733 NotShared<DOMFloat32Array>, | 733 MaybeShared<DOMFloat32Array>, |
| 734 GLuint, | 734 GLuint, |
| 735 GLuint); | 735 GLuint); |
| 736 void uniformMatrix4fv(const WebGLUniformLocation*, | 736 void uniformMatrix4fv(const WebGLUniformLocation*, |
| 737 GLboolean, | 737 GLboolean, |
| 738 Vector<GLfloat>&, | 738 Vector<GLfloat>&, |
| 739 GLuint, | 739 GLuint, |
| 740 GLuint); | 740 GLuint); |
| 741 void uniformMatrix2x3fv(const WebGLUniformLocation*, | 741 void uniformMatrix2x3fv(const WebGLUniformLocation*, |
| 742 GLboolean, | 742 GLboolean, |
| 743 NotShared<DOMFloat32Array>, | 743 MaybeShared<DOMFloat32Array>, |
| 744 GLuint, | 744 GLuint, |
| 745 GLuint); | 745 GLuint); |
| 746 void uniformMatrix2x3fv(const WebGLUniformLocation*, | 746 void uniformMatrix2x3fv(const WebGLUniformLocation*, |
| 747 GLboolean, | 747 GLboolean, |
| 748 Vector<GLfloat>&, | 748 Vector<GLfloat>&, |
| 749 GLuint, | 749 GLuint, |
| 750 GLuint); | 750 GLuint); |
| 751 void uniformMatrix3x2fv(const WebGLUniformLocation*, | 751 void uniformMatrix3x2fv(const WebGLUniformLocation*, |
| 752 GLboolean, | 752 GLboolean, |
| 753 NotShared<DOMFloat32Array>, | 753 MaybeShared<DOMFloat32Array>, |
| 754 GLuint, | 754 GLuint, |
| 755 GLuint); | 755 GLuint); |
| 756 void uniformMatrix3x2fv(const WebGLUniformLocation*, | 756 void uniformMatrix3x2fv(const WebGLUniformLocation*, |
| 757 GLboolean, | 757 GLboolean, |
| 758 Vector<GLfloat>&, | 758 Vector<GLfloat>&, |
| 759 GLuint, | 759 GLuint, |
| 760 GLuint); | 760 GLuint); |
| 761 void uniformMatrix2x4fv(const WebGLUniformLocation*, | 761 void uniformMatrix2x4fv(const WebGLUniformLocation*, |
| 762 GLboolean, | 762 GLboolean, |
| 763 NotShared<DOMFloat32Array>, | 763 MaybeShared<DOMFloat32Array>, |
| 764 GLuint, | 764 GLuint, |
| 765 GLuint); | 765 GLuint); |
| 766 void uniformMatrix2x4fv(const WebGLUniformLocation*, | 766 void uniformMatrix2x4fv(const WebGLUniformLocation*, |
| 767 GLboolean, | 767 GLboolean, |
| 768 Vector<GLfloat>&, | 768 Vector<GLfloat>&, |
| 769 GLuint, | 769 GLuint, |
| 770 GLuint); | 770 GLuint); |
| 771 void uniformMatrix4x2fv(const WebGLUniformLocation*, | 771 void uniformMatrix4x2fv(const WebGLUniformLocation*, |
| 772 GLboolean, | 772 GLboolean, |
| 773 NotShared<DOMFloat32Array>, | 773 MaybeShared<DOMFloat32Array>, |
| 774 GLuint, | 774 GLuint, |
| 775 GLuint); | 775 GLuint); |
| 776 void uniformMatrix4x2fv(const WebGLUniformLocation*, | 776 void uniformMatrix4x2fv(const WebGLUniformLocation*, |
| 777 GLboolean, | 777 GLboolean, |
| 778 Vector<GLfloat>&, | 778 Vector<GLfloat>&, |
| 779 GLuint, | 779 GLuint, |
| 780 GLuint); | 780 GLuint); |
| 781 void uniformMatrix3x4fv(const WebGLUniformLocation*, | 781 void uniformMatrix3x4fv(const WebGLUniformLocation*, |
| 782 GLboolean, | 782 GLboolean, |
| 783 NotShared<DOMFloat32Array>, | 783 MaybeShared<DOMFloat32Array>, |
| 784 GLuint, | 784 GLuint, |
| 785 GLuint); | 785 GLuint); |
| 786 void uniformMatrix3x4fv(const WebGLUniformLocation*, | 786 void uniformMatrix3x4fv(const WebGLUniformLocation*, |
| 787 GLboolean, | 787 GLboolean, |
| 788 Vector<GLfloat>&, | 788 Vector<GLfloat>&, |
| 789 GLuint, | 789 GLuint, |
| 790 GLuint); | 790 GLuint); |
| 791 void uniformMatrix4x3fv(const WebGLUniformLocation*, | 791 void uniformMatrix4x3fv(const WebGLUniformLocation*, |
| 792 GLboolean, | 792 GLboolean, |
| 793 NotShared<DOMFloat32Array>, | 793 MaybeShared<DOMFloat32Array>, |
| 794 GLuint, | 794 GLuint, |
| 795 GLuint); | 795 GLuint); |
| 796 void uniformMatrix4x3fv(const WebGLUniformLocation*, | 796 void uniformMatrix4x3fv(const WebGLUniformLocation*, |
| 797 GLboolean, | 797 GLboolean, |
| 798 Vector<GLfloat>&, | 798 Vector<GLfloat>&, |
| 799 GLuint, | 799 GLuint, |
| 800 GLuint); | 800 GLuint); |
| 801 // Have to re-declare/re-define the following uniform*() | 801 // Have to re-declare/re-define the following uniform*() |
| 802 // functions from the base class. This is because the above | 802 // functions from the base class. This is because the above |
| 803 // uniform*() hide the name from base class. | 803 // uniform*() hide the name from base class. |
| 804 void uniform1fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); | 804 void uniform1fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); |
| 805 void uniform1fv(const WebGLUniformLocation*, Vector<GLfloat>&); | 805 void uniform1fv(const WebGLUniformLocation*, Vector<GLfloat>&); |
| 806 void uniform2fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); | 806 void uniform2fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); |
| 807 void uniform2fv(const WebGLUniformLocation*, Vector<GLfloat>&); | 807 void uniform2fv(const WebGLUniformLocation*, Vector<GLfloat>&); |
| 808 void uniform3fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); | 808 void uniform3fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); |
| 809 void uniform3fv(const WebGLUniformLocation*, Vector<GLfloat>&); | 809 void uniform3fv(const WebGLUniformLocation*, Vector<GLfloat>&); |
| 810 void uniform4fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); | 810 void uniform4fv(const WebGLUniformLocation*, const FlexibleFloat32ArrayView&); |
| 811 void uniform4fv(const WebGLUniformLocation*, Vector<GLfloat>&); | 811 void uniform4fv(const WebGLUniformLocation*, Vector<GLfloat>&); |
| 812 void uniform1iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); | 812 void uniform1iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); |
| 813 void uniform1iv(const WebGLUniformLocation*, Vector<GLint>&); | 813 void uniform1iv(const WebGLUniformLocation*, Vector<GLint>&); |
| 814 void uniform2iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); | 814 void uniform2iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); |
| 815 void uniform2iv(const WebGLUniformLocation*, Vector<GLint>&); | 815 void uniform2iv(const WebGLUniformLocation*, Vector<GLint>&); |
| 816 void uniform3iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); | 816 void uniform3iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); |
| 817 void uniform3iv(const WebGLUniformLocation*, Vector<GLint>&); | 817 void uniform3iv(const WebGLUniformLocation*, Vector<GLint>&); |
| 818 void uniform4iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); | 818 void uniform4iv(const WebGLUniformLocation*, const FlexibleInt32ArrayView&); |
| 819 void uniform4iv(const WebGLUniformLocation*, Vector<GLint>&); | 819 void uniform4iv(const WebGLUniformLocation*, Vector<GLint>&); |
| 820 void uniformMatrix2fv(const WebGLUniformLocation*, | 820 void uniformMatrix2fv(const WebGLUniformLocation*, |
| 821 GLboolean transpose, | 821 GLboolean transpose, |
| 822 NotShared<DOMFloat32Array> value); | 822 MaybeShared<DOMFloat32Array> value); |
| 823 void uniformMatrix2fv(const WebGLUniformLocation*, | 823 void uniformMatrix2fv(const WebGLUniformLocation*, |
| 824 GLboolean transpose, | 824 GLboolean transpose, |
| 825 Vector<GLfloat>& value); | 825 Vector<GLfloat>& value); |
| 826 void uniformMatrix3fv(const WebGLUniformLocation*, | 826 void uniformMatrix3fv(const WebGLUniformLocation*, |
| 827 GLboolean transpose, | 827 GLboolean transpose, |
| 828 NotShared<DOMFloat32Array> value); | 828 MaybeShared<DOMFloat32Array> value); |
| 829 void uniformMatrix3fv(const WebGLUniformLocation*, | 829 void uniformMatrix3fv(const WebGLUniformLocation*, |
| 830 GLboolean transpose, | 830 GLboolean transpose, |
| 831 Vector<GLfloat>& value); | 831 Vector<GLfloat>& value); |
| 832 void uniformMatrix4fv(const WebGLUniformLocation*, | 832 void uniformMatrix4fv(const WebGLUniformLocation*, |
| 833 GLboolean transpose, | 833 GLboolean transpose, |
| 834 NotShared<DOMFloat32Array> value); | 834 MaybeShared<DOMFloat32Array> value); |
| 835 void uniformMatrix4fv(const WebGLUniformLocation*, | 835 void uniformMatrix4fv(const WebGLUniformLocation*, |
| 836 GLboolean transpose, | 836 GLboolean transpose, |
| 837 Vector<GLfloat>& value); | 837 Vector<GLfloat>& value); |
| 838 | 838 |
| 839 void vertexAttribI4i(GLuint, GLint, GLint, GLint, GLint); | 839 void vertexAttribI4i(GLuint, GLint, GLint, GLint, GLint); |
| 840 void vertexAttribI4iv(GLuint, NotShared<const DOMInt32Array>); | 840 void vertexAttribI4iv(GLuint, MaybeShared<const DOMInt32Array>); |
| 841 void vertexAttribI4iv(GLuint, const Vector<GLint>&); | 841 void vertexAttribI4iv(GLuint, const Vector<GLint>&); |
| 842 void vertexAttribI4ui(GLuint, GLuint, GLuint, GLuint, GLuint); | 842 void vertexAttribI4ui(GLuint, GLuint, GLuint, GLuint, GLuint); |
| 843 void vertexAttribI4uiv(GLuint, NotShared<const DOMUint32Array>); | 843 void vertexAttribI4uiv(GLuint, MaybeShared<const DOMUint32Array>); |
| 844 void vertexAttribI4uiv(GLuint, const Vector<GLuint>&); | 844 void vertexAttribI4uiv(GLuint, const Vector<GLuint>&); |
| 845 void vertexAttribIPointer(GLuint index, | 845 void vertexAttribIPointer(GLuint index, |
| 846 GLint size, | 846 GLint size, |
| 847 GLenum type, | 847 GLenum type, |
| 848 GLsizei stride, | 848 GLsizei stride, |
| 849 long long offset); | 849 long long offset); |
| 850 | 850 |
| 851 /* Writing to the drawing buffer */ | 851 /* Writing to the drawing buffer */ |
| 852 void vertexAttribDivisor(GLuint, GLuint); | 852 void vertexAttribDivisor(GLuint, GLuint); |
| 853 void drawArraysInstanced(GLenum, GLint, GLsizei, GLsizei); | 853 void drawArraysInstanced(GLenum, GLint, GLsizei, GLsizei); |
| 854 void drawElementsInstanced(GLenum, GLsizei, GLenum, long long, GLsizei); | 854 void drawElementsInstanced(GLenum, GLsizei, GLenum, long long, GLsizei); |
| 855 void drawRangeElements(GLenum mode, | 855 void drawRangeElements(GLenum mode, |
| 856 GLuint start, | 856 GLuint start, |
| 857 GLuint end, | 857 GLuint end, |
| 858 GLsizei count, | 858 GLsizei count, |
| 859 GLenum type, | 859 GLenum type, |
| 860 long long offset); | 860 long long offset); |
| 861 | 861 |
| 862 /* Multiple Render Targets */ | 862 /* Multiple Render Targets */ |
| 863 void drawBuffers(const Vector<GLenum>&); | 863 void drawBuffers(const Vector<GLenum>&); |
| 864 void clearBufferiv(GLenum, GLint, NotShared<DOMInt32Array>, GLuint); | 864 void clearBufferiv(GLenum, GLint, MaybeShared<DOMInt32Array>, GLuint); |
| 865 void clearBufferiv(GLenum, GLint, const Vector<GLint>&, GLuint); | 865 void clearBufferiv(GLenum, GLint, const Vector<GLint>&, GLuint); |
| 866 void clearBufferuiv(GLenum, GLint, NotShared<DOMUint32Array>, GLuint); | 866 void clearBufferuiv(GLenum, GLint, MaybeShared<DOMUint32Array>, GLuint); |
| 867 void clearBufferuiv(GLenum, GLint, const Vector<GLuint>&, GLuint); | 867 void clearBufferuiv(GLenum, GLint, const Vector<GLuint>&, GLuint); |
| 868 void clearBufferfv(GLenum, GLint, NotShared<DOMFloat32Array>, GLuint); | 868 void clearBufferfv(GLenum, GLint, MaybeShared<DOMFloat32Array>, GLuint); |
| 869 void clearBufferfv(GLenum, GLint, const Vector<GLfloat>&, GLuint); | 869 void clearBufferfv(GLenum, GLint, const Vector<GLfloat>&, GLuint); |
| 870 void clearBufferfi(GLenum, GLint, GLfloat, GLint); | 870 void clearBufferfi(GLenum, GLint, GLfloat, GLint); |
| 871 | 871 |
| 872 /* Query Objects */ | 872 /* Query Objects */ |
| 873 WebGLQuery* createQuery(); | 873 WebGLQuery* createQuery(); |
| 874 void deleteQuery(WebGLQuery*); | 874 void deleteQuery(WebGLQuery*); |
| 875 GLboolean isQuery(WebGLQuery*); | 875 GLboolean isQuery(WebGLQuery*); |
| 876 void beginQuery(GLenum, WebGLQuery*); | 876 void beginQuery(GLenum, WebGLQuery*); |
| 877 void endQuery(GLenum); | 877 void endQuery(GLenum); |
| 878 ScriptValue getQuery(ScriptState*, GLenum, GLenum); | 878 ScriptValue getQuery(ScriptState*, GLenum, GLenum); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 GLboolean isVertexArray(WebGLVertexArrayObject*); | 933 GLboolean isVertexArray(WebGLVertexArrayObject*); |
| 934 void bindVertexArray(WebGLVertexArrayObject*); | 934 void bindVertexArray(WebGLVertexArrayObject*); |
| 935 | 935 |
| 936 /* Reading */ | 936 /* Reading */ |
| 937 void readPixels(GLint x, | 937 void readPixels(GLint x, |
| 938 GLint y, | 938 GLint y, |
| 939 GLsizei width, | 939 GLsizei width, |
| 940 GLsizei height, | 940 GLsizei height, |
| 941 GLenum format, | 941 GLenum format, |
| 942 GLenum type, | 942 GLenum type, |
| 943 NotShared<DOMArrayBufferView> pixels, | 943 MaybeShared<DOMArrayBufferView> pixels, |
| 944 GLuint offset); | 944 GLuint offset); |
| 945 void readPixels(GLint x, | 945 void readPixels(GLint x, |
| 946 GLint y, | 946 GLint y, |
| 947 GLsizei width, | 947 GLsizei width, |
| 948 GLsizei height, | 948 GLsizei height, |
| 949 GLenum format, | 949 GLenum format, |
| 950 GLenum type, | 950 GLenum type, |
| 951 long long offset); | 951 long long offset); |
| 952 | 952 |
| 953 /* WebGLRenderingContextBase overrides */ | 953 /* WebGLRenderingContextBase overrides */ |
| 954 void InitializeNewContext() override; | 954 void InitializeNewContext() override; |
| 955 void bindFramebuffer(GLenum target, WebGLFramebuffer*) override; | 955 void bindFramebuffer(GLenum target, WebGLFramebuffer*) override; |
| 956 void deleteFramebuffer(WebGLFramebuffer*) override; | 956 void deleteFramebuffer(WebGLFramebuffer*) override; |
| 957 ScriptValue getParameter(ScriptState*, GLenum pname) override; | 957 ScriptValue getParameter(ScriptState*, GLenum pname) override; |
| 958 ScriptValue getTexParameter(ScriptState*, | 958 ScriptValue getTexParameter(ScriptState*, |
| 959 GLenum target, | 959 GLenum target, |
| 960 GLenum pname) override; | 960 GLenum pname) override; |
| 961 ScriptValue getFramebufferAttachmentParameter(ScriptState*, | 961 ScriptValue getFramebufferAttachmentParameter(ScriptState*, |
| 962 GLenum target, | 962 GLenum target, |
| 963 GLenum attachment, | 963 GLenum attachment, |
| 964 GLenum pname) override; | 964 GLenum pname) override; |
| 965 void pixelStorei(GLenum pname, GLint param) override; | 965 void pixelStorei(GLenum pname, GLint param) override; |
| 966 void readPixels(GLint x, | 966 void readPixels(GLint x, |
| 967 GLint y, | 967 GLint y, |
| 968 GLsizei width, | 968 GLsizei width, |
| 969 GLsizei height, | 969 GLsizei height, |
| 970 GLenum format, | 970 GLenum format, |
| 971 GLenum type, | 971 GLenum type, |
| 972 NotShared<DOMArrayBufferView> pixels) override; | 972 MaybeShared<DOMArrayBufferView> pixels) override; |
| 973 void RestoreCurrentFramebuffer() override; | 973 void RestoreCurrentFramebuffer() override; |
| 974 | 974 |
| 975 DECLARE_VIRTUAL_TRACE(); | 975 DECLARE_VIRTUAL_TRACE(); |
| 976 DECLARE_VIRTUAL_TRACE_WRAPPERS(); | 976 DECLARE_VIRTUAL_TRACE_WRAPPERS(); |
| 977 | 977 |
| 978 protected: | 978 protected: |
| 979 friend class V8WebGL2RenderingContext; | 979 friend class V8WebGL2RenderingContext; |
| 980 friend class WebGLGetBufferSubDataAsync; | 980 friend class WebGLGetBufferSubDataAsync; |
| 981 | 981 |
| 982 WebGL2RenderingContextBase( | 982 WebGL2RenderingContextBase( |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 context, | 1147 context, |
| 1148 context->Is3d() && | 1148 context->Is3d() && |
| 1149 WebGLRenderingContextBase::GetWebGLVersion(context) >= 2, | 1149 WebGLRenderingContextBase::GetWebGLVersion(context) >= 2, |
| 1150 context.Is3d() && | 1150 context.Is3d() && |
| 1151 WebGLRenderingContextBase::GetWebGLVersion(&context) >= | 1151 WebGLRenderingContextBase::GetWebGLVersion(&context) >= |
| 1152 2); | 1152 2); |
| 1153 | 1153 |
| 1154 } // namespace blink | 1154 } // namespace blink |
| 1155 | 1155 |
| 1156 #endif | 1156 #endif |
| OLD | NEW |