Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Side by Side Diff: sdk/lib/web_gl/dart2js/web_gl_dart2js.dart

Issue 34733007: Add back unseparated out version of method overloads in dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /** 1 /**
2 * 3D programming in the browser. 2 * 3D programming in the browser.
3 */ 3 */
4 library dart.dom.web_gl; 4 library dart.dom.web_gl;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:_collection-dev' hide deprecated; 7 import 'dart:_collection-dev' hide deprecated;
8 import 'dart:html'; 8 import 'dart:html';
9 import 'dart:html_common'; 9 import 'dart:html_common';
10 import 'dart:typed_data'; 10 import 'dart:typed_data';
(...skipping 2191 matching lines...) Expand 10 before | Expand all | Expand 10 after
2202 @DocsEditable() 2202 @DocsEditable()
2203 void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) nat ive; 2203 void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) nat ive;
2204 2204
2205 @JSName('bufferData') 2205 @JSName('bufferData')
2206 @DomName('WebGLRenderingContext.bufferData') 2206 @DomName('WebGLRenderingContext.bufferData')
2207 @DocsEditable() 2207 @DocsEditable()
2208 void bufferByteData(int target, ByteBuffer data, int usage) native; 2208 void bufferByteData(int target, ByteBuffer data, int usage) native;
2209 2209
2210 @DomName('WebGLRenderingContext.bufferData') 2210 @DomName('WebGLRenderingContext.bufferData')
2211 @DocsEditable() 2211 @DocsEditable()
2212 void bufferData(int target, int size, int usage) native; 2212 /**
2213 * Buffers the specified data.
2214 *
2215 * This specific method is provided for WebGL API compatibility reasons, but
2216 * it is highly recommended that you use [bufferDataTyped] or [bufferByteData]
2217 * depending on your purposes.
2218 */
2219 void bufferData(int target, data_OR_size, int usage) native;
2213 2220
2214 @JSName('bufferData') 2221 @JSName('bufferData')
2215 @DomName('WebGLRenderingContext.bufferData') 2222 @DomName('WebGLRenderingContext.bufferData')
2216 @DocsEditable() 2223 @DocsEditable()
2217 void bufferDataTyped(int target, TypedData data, int usage) native; 2224 void bufferDataTyped(int target, TypedData data, int usage) native;
2218 2225
2219 @JSName('bufferSubData') 2226 @JSName('bufferSubData')
2220 @DomName('WebGLRenderingContext.bufferSubData') 2227 @DomName('WebGLRenderingContext.bufferSubData')
2221 @DocsEditable() 2228 @DocsEditable()
2222 void bufferSubByteData(int target, int offset, ByteBuffer data) native; 2229 void bufferSubByteData(int target, int offset, ByteBuffer data) native;
2223 2230
2231 @DomName('WebGLRenderingContext.bufferSubData')
2232 /**
2233 * Buffers the specified subset of data.
2234 *
2235 * This specific method is provided for WebGL API compatibility reasons, but
2236 * it is highly recommended that you use [bufferSubDataTyped] or [bufferSubByt eData]
2237 * depending on your purposes.
2238 */
2239 @DocsEditable()
2240 void bufferSubData(int target, int offset, data) native;
2241
2224 @JSName('bufferSubData') 2242 @JSName('bufferSubData')
2225 @DomName('WebGLRenderingContext.bufferSubData') 2243 @DomName('WebGLRenderingContext.bufferSubData')
2226 @DocsEditable() 2244 @DocsEditable()
2227 void bufferSubDataTyped(int target, int offset, TypedData data) native; 2245 void bufferSubDataTyped(int target, int offset, TypedData data) native;
2228 2246
2229 @DomName('WebGLRenderingContext.checkFramebufferStatus') 2247 @DomName('WebGLRenderingContext.checkFramebufferStatus')
2230 @DocsEditable() 2248 @DocsEditable()
2231 int checkFramebufferStatus(int target) native; 2249 int checkFramebufferStatus(int target) native;
2232 2250
2233 @DomName('WebGLRenderingContext.clear') 2251 @DomName('WebGLRenderingContext.clear')
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
2585 void stencilMaskSeparate(int face, int mask) native; 2603 void stencilMaskSeparate(int face, int mask) native;
2586 2604
2587 @DomName('WebGLRenderingContext.stencilOp') 2605 @DomName('WebGLRenderingContext.stencilOp')
2588 @DocsEditable() 2606 @DocsEditable()
2589 void stencilOp(int fail, int zfail, int zpass) native; 2607 void stencilOp(int fail, int zfail, int zpass) native;
2590 2608
2591 @DomName('WebGLRenderingContext.stencilOpSeparate') 2609 @DomName('WebGLRenderingContext.stencilOpSeparate')
2592 @DocsEditable() 2610 @DocsEditable()
2593 void stencilOpSeparate(int face, int fail, int zfail, int zpass) native; 2611 void stencilOpSeparate(int face, int fail, int zfail, int zpass) native;
2594 2612
2613 /**
2614 * Updates the currently bound texture to [data].
2615 *
2616 * This specific method is provided for WebGL API compatibility reasons, but i t
2617 * is highly recommended that you use [texImage2DUntyped] or [texImage2DTyped]
2618 * (or for more specificity, the more specialized [texImage2DImageData],
2619 * [texImage2DCanvas], [texImage2DVideo]).
2620 */
2621 @DomName('WebGLRenderingContext.texImage2D')
2622 @DocsEditable()
2623 void texImage2D(int target, int level, int internalformat, int format_OR_width , int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, TypedData pixels]) {
2624 if (pixels != null && type != null && format != null && (border_OR_canvas_OR _image_OR_pixels_OR_video is int || border_OR_canvas_OR_image_OR_pixels_OR_video == null)) {
2625 _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_ty pe, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
2626 return;
2627 }
2628 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_ canvas_OR_image_OR_pixels_OR_video == null) && format == null && type == null && pixels == null) {
2629 var pixels_1 = convertDartToNative_ImageData(border_OR_canvas_OR_image_OR_ pixels_OR_video);
2630 _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_ty pe, pixels_1);
2631 return;
2632 }
2633 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement || border_ OR_canvas_OR_image_OR_pixels_OR_video == null) && format == null && type == null && pixels == null) {
2634 _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_ty pe, border_OR_canvas_OR_image_OR_pixels_OR_video);
2635 return;
2636 }
2637 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement || border _OR_canvas_OR_image_OR_pixels_OR_video == null) && format == null && type == nul l && pixels == null) {
2638 _texImage2D_4(target, level, internalformat, format_OR_width, height_OR_ty pe, border_OR_canvas_OR_image_OR_pixels_OR_video);
2639 return;
2640 }
2641 if ((border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement || border_ OR_canvas_OR_image_OR_pixels_OR_video == null) && format == null && type == null && pixels == null) {
2642 _texImage2D_5(target, level, internalformat, format_OR_width, height_OR_ty pe, border_OR_canvas_OR_image_OR_pixels_OR_video);
2643 return;
2644 }
2645 throw new ArgumentError("Incorrect number or type of arguments");
2646 }
2647 @JSName('texImage2D')
2648 @DomName('WebGLRenderingContext.texImage2D')
2649 @DocsEditable()
2650 void _texImage2D_1(target, level, internalformat, width, height, int border, f ormat, type, TypedData pixels) native;
2651 @JSName('texImage2D')
2652 @DomName('WebGLRenderingContext.texImage2D')
2653 @DocsEditable()
2654 void _texImage2D_2(target, level, internalformat, format, type, pixels) native ;
2655 @JSName('texImage2D')
2656 @DomName('WebGLRenderingContext.texImage2D')
2657 @DocsEditable()
2658 void _texImage2D_3(target, level, internalformat, format, type, ImageElement i mage) native;
2659 @JSName('texImage2D')
2660 @DomName('WebGLRenderingContext.texImage2D')
2661 @DocsEditable()
2662 void _texImage2D_4(target, level, internalformat, format, type, CanvasElement canvas) native;
2663 @JSName('texImage2D')
2664 @DomName('WebGLRenderingContext.texImage2D')
2665 @DocsEditable()
2666 void _texImage2D_5(target, level, internalformat, format, type, VideoElement v ideo) native;
2667
2595 @JSName('texImage2D') 2668 @JSName('texImage2D')
2596 @DomName('WebGLRenderingContext.texImage2D') 2669 @DomName('WebGLRenderingContext.texImage2D')
2597 @DocsEditable() 2670 @DocsEditable()
2598 void texImage2DCanvas(int target, int level, int internalformat, int format, i nt type, CanvasElement canvas) native; 2671 void texImage2DCanvas(int target, int level, int internalformat, int format, i nt type, CanvasElement canvas) native;
2599 2672
2600 @JSName('texImage2D') 2673 @JSName('texImage2D')
2601 @DomName('WebGLRenderingContext.texImage2D') 2674 @DomName('WebGLRenderingContext.texImage2D')
2602 @DocsEditable() 2675 @DocsEditable()
2603 void texImage2DImage(int target, int level, int internalformat, int format, in t type, ImageElement image) native; 2676 void texImage2DImage(int target, int level, int internalformat, int format, in t type, ImageElement image) native;
2604 2677
(...skipping 15 matching lines...) Expand all
2620 void texImage2DVideo(int target, int level, int internalformat, int format, in t type, VideoElement video) native; 2693 void texImage2DVideo(int target, int level, int internalformat, int format, in t type, VideoElement video) native;
2621 2694
2622 @DomName('WebGLRenderingContext.texParameterf') 2695 @DomName('WebGLRenderingContext.texParameterf')
2623 @DocsEditable() 2696 @DocsEditable()
2624 void texParameterf(int target, int pname, num param) native; 2697 void texParameterf(int target, int pname, num param) native;
2625 2698
2626 @DomName('WebGLRenderingContext.texParameteri') 2699 @DomName('WebGLRenderingContext.texParameteri')
2627 @DocsEditable() 2700 @DocsEditable()
2628 void texParameteri(int target, int pname, int param) native; 2701 void texParameteri(int target, int pname, int param) native;
2629 2702
2703 /**
2704 * Updates a sub-rectangle of the currently bound texture to [data].
2705 *
2706 * This specific method is provided for WebGL API compatibility reasons, but i t
2707 * is highly recommended that you use [texSubImage2DUntyped] or [texSubImage2D Typed]
2708 * (or for more specificity, the more specialized [texSubImage2DImageData],
2709 * [texSubImage2DCanvas], [texSubImage2DVideo]).
2710 */
2711 @DomName('WebGLRenderingContext.texSubImage2D')
2712 @DocsEditable()
2713 void texSubImage2D(int target, int level, int xoffset, int yoffset, int format _OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [in t type, TypedData pixels]) {
2714 if (pixels != null && type != null && (canvas_OR_format_OR_image_OR_pixels_O R_video is int || canvas_OR_format_OR_image_OR_pixels_OR_video == null)) {
2715 _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_ OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
2716 return;
2717 }
2718 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_ format_OR_image_OR_pixels_OR_video == null) && type == null && pixels == null) {
2719 var pixels_1 = convertDartToNative_ImageData(canvas_OR_format_OR_image_OR_ pixels_OR_video);
2720 _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_ OR_type, pixels_1);
2721 return;
2722 }
2723 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement || canvas_ OR_format_OR_image_OR_pixels_OR_video == null) && type == null && pixels == null ) {
2724 _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_ OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
2725 return;
2726 }
2727 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement || canvas _OR_format_OR_image_OR_pixels_OR_video == null) && type == null && pixels == nul l) {
2728 _texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_ OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
2729 return;
2730 }
2731 if ((canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement || canvas_ OR_format_OR_image_OR_pixels_OR_video == null) && type == null && pixels == null ) {
2732 _texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_ OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
2733 return;
2734 }
2735 throw new ArgumentError("Incorrect number or type of arguments");
2736 }
2737 @JSName('texSubImage2D')
2738 @DomName('WebGLRenderingContext.texSubImage2D')
2739 @DocsEditable()
2740 void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int form at, type, TypedData pixels) native;
2741 @JSName('texSubImage2D')
2742 @DomName('WebGLRenderingContext.texSubImage2D')
2743 @DocsEditable()
2744 void _texSubImage2D_2(target, level, xoffset, yoffset, format, type, pixels) n ative;
2745 @JSName('texSubImage2D')
2746 @DomName('WebGLRenderingContext.texSubImage2D')
2747 @DocsEditable()
2748 void _texSubImage2D_3(target, level, xoffset, yoffset, format, type, ImageElem ent image) native;
2749 @JSName('texSubImage2D')
2750 @DomName('WebGLRenderingContext.texSubImage2D')
2751 @DocsEditable()
2752 void _texSubImage2D_4(target, level, xoffset, yoffset, format, type, CanvasEle ment canvas) native;
2753 @JSName('texSubImage2D')
2754 @DomName('WebGLRenderingContext.texSubImage2D')
2755 @DocsEditable()
2756 void _texSubImage2D_5(target, level, xoffset, yoffset, format, type, VideoElem ent video) native;
2757
2630 @JSName('texSubImage2D') 2758 @JSName('texSubImage2D')
2631 @DomName('WebGLRenderingContext.texSubImage2D') 2759 @DomName('WebGLRenderingContext.texSubImage2D')
2632 @DocsEditable() 2760 @DocsEditable()
2633 void texSubImage2DCanvas(int target, int level, int xoffset, int yoffset, int format, int type, CanvasElement canvas) native; 2761 void texSubImage2DCanvas(int target, int level, int xoffset, int yoffset, int format, int type, CanvasElement canvas) native;
2634 2762
2635 @JSName('texSubImage2D') 2763 @JSName('texSubImage2D')
2636 @DomName('WebGLRenderingContext.texSubImage2D') 2764 @DomName('WebGLRenderingContext.texSubImage2D')
2637 @DocsEditable() 2765 @DocsEditable()
2638 void texSubImage2DImage(int target, int level, int xoffset, int yoffset, int f ormat, int type, ImageElement image) native; 2766 void texSubImage2DImage(int target, int level, int xoffset, int yoffset, int f ormat, int type, ImageElement image) native;
2639 2767
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2781 2909
2782 /** 2910 /**
2783 * Sets the currently bound texture to [data]. 2911 * Sets the currently bound texture to [data].
2784 * 2912 *
2785 * [data] can be either an [ImageElement], a 2913 * [data] can be either an [ImageElement], a
2786 * [CanvasElement], a [VideoElement], or an [ImageData] object. 2914 * [CanvasElement], a [VideoElement], or an [ImageData] object.
2787 * 2915 *
2788 * To use [texImage2d] with a TypedData object, use [texImage2dTyped]. 2916 * To use [texImage2d] with a TypedData object, use [texImage2dTyped].
2789 * 2917 *
2790 */ 2918 */
2791 @DomName('WebGLRenderingContext.texImage2D')
2792 @JSName('texImage2D') 2919 @JSName('texImage2D')
2793 void texImage2D(int targetTexture, int levelOfDetail, int internalFormat, 2920 void texImage2DUntyped(int targetTexture, int levelOfDetail,
2794 int format, int type, data) native; 2921 int internalFormat, int format, int type, data) native;
2795 2922
2796 /** 2923 /**
2797 * Sets the currently bound texture to [data]. 2924 * Sets the currently bound texture to [data].
2798 */ 2925 */
2799 @JSName('texImage2D') 2926 @JSName('texImage2D')
2800 void texImage2DTyped(int targetTexture, int levelOfDetail, 2927 void texImage2DTyped(int targetTexture, int levelOfDetail,
2801 int internalFormat, int width, int height, int border, int format, 2928 int internalFormat, int width, int height, int border, int format,
2802 int type, TypedData data) native; 2929 int type, TypedData data) native;
2803 2930
2804 /** 2931 /**
2805 * Updates a sub-rectangle of the currently bound texture to [data]. 2932 * Updates a sub-rectangle of the currently bound texture to [data].
2806 * 2933 *
2807 * [data] can be either an [ImageElement], a 2934 * [data] can be either an [ImageElement], a
2808 * [CanvasElement], a [VideoElement], or an [ImageData] object. 2935 * [CanvasElement], a [VideoElement], or an [ImageData] object.
2809 * 2936 *
2810 * To use [texSubImage2d] with a TypedData object, use [texSubImage2dTyped]. 2937 * To use [texSubImage2d] with a TypedData object, use [texSubImage2dTyped].
2811 * 2938 *
2812 */ 2939 */
2813 @DomName('WebGLRenderingContext.texSubImage2D')
2814 @JSName('texSubImage2D') 2940 @JSName('texSubImage2D')
2815 void texSubImage2D(int targetTexture, int levelOfDetail, int internalFormat, 2941 void texSubImage2DUntyped(int targetTexture, int levelOfDetail,
2816 int format, int type, data) native; 2942 int internalFormat, int format, int type, data) native;
2817 2943
2818 /** 2944 /**
2819 * Updates a sub-rectangle of the currently bound texture to [data]. 2945 * Updates a sub-rectangle of the currently bound texture to [data].
2820 */ 2946 */
2821 @JSName('texSubImage2D') 2947 @JSName('texSubImage2D')
2822 void texSubImage2DTyped(int targetTexture, int levelOfDetail, 2948 void texSubImage2DTyped(int targetTexture, int levelOfDetail,
2823 int internalFormat, int width, int height, int border, int format, 2949 int internalFormat, int width, int height, int border, int format,
2824 int type, TypedData data) native; 2950 int type, TypedData data) native;
2825 } 2951 }
2826 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2952 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2885 3011
2886 3012
2887 @DocsEditable() 3013 @DocsEditable()
2888 @DomName('WebGLVertexArrayObjectOES') 3014 @DomName('WebGLVertexArrayObjectOES')
2889 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/ 3015 // http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/
2890 @Experimental() // experimental 3016 @Experimental() // experimental
2891 class VertexArrayObject extends Interceptor native "WebGLVertexArrayObjectOES" { 3017 class VertexArrayObject extends Interceptor native "WebGLVertexArrayObjectOES" {
2892 // To suppress missing implicit constructor warnings. 3018 // To suppress missing implicit constructor warnings.
2893 factory VertexArrayObject._() { throw new UnsupportedError("Not supported"); } 3019 factory VertexArrayObject._() { throw new UnsupportedError("Not supported"); }
2894 } 3020 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698