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