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

Unified Diff: sdk/lib/web_gl/dart2js/web_gl_dart2js.dart

Issue 16494002: Expand overloaded methods and optional parameters in the html library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/web_audio/dartium/web_audio_dartium.dart ('k') | sdk/lib/web_gl/dartium/web_gl_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
diff --git a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
index 1858391490b89fecf6843c76c4c8a7aab4fa4df8..18fe108d3e519d4fe98b32398dcce3cc343a181e 100644
--- a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
+++ b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
@@ -2115,13 +2115,29 @@ class RenderingContext extends CanvasRenderingContext native "WebGLRenderingCont
@DocsEditable
void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) native;
+ @JSName('bufferData')
@DomName('WebGLRenderingContext.bufferData')
@DocsEditable
- void bufferData(int target, data_OR_size, int usage) native;
+ void bufferByteData(int target, ByteBuffer data, int usage) native;
+ @DomName('WebGLRenderingContext.bufferData')
+ @DocsEditable
+ void bufferData(int target, int size, int usage) native;
+
+ @JSName('bufferSubData')
@DomName('WebGLRenderingContext.bufferSubData')
@DocsEditable
- void bufferSubData(int target, int offset, data) native;
+ void bufferSubByteData(int target, int offset, ByteBuffer data) native;
+
+ @JSName('bufferSubData')
+ @DomName('WebGLRenderingContext.bufferSubData')
+ @DocsEditable
+ void bufferSubTypedData(int target, int offset, TypedData data) native;
+
+ @JSName('bufferData')
+ @DomName('WebGLRenderingContext.bufferData')
+ @DocsEditable
+ void bufferTypedData(int target, TypedData data, int usage) native;
@DomName('WebGLRenderingContext.checkFramebufferStatus')
@DocsEditable
@@ -2491,50 +2507,35 @@ class RenderingContext extends CanvasRenderingContext native "WebGLRenderingCont
@DomName('WebGLRenderingContext.texImage2D')
@DocsEditable
- 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]) {
- 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)) {
- _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
- return;
- }
- 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) {
- var pixels_1 = convertDartToNative_ImageData(border_OR_canvas_OR_image_OR_pixels_OR_video);
- _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_type, pixels_1);
- return;
- }
- 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) {
- _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
- return;
- }
- 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 == null && pixels == null) {
- _texImage2D_4(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
- return;
- }
- 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) {
- _texImage2D_5(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
- return;
- }
- throw new ArgumentError("Incorrect number or type of arguments");
+ void texImage2D(int target, int level, int internalformat, int format, int type, ImageData pixels) {
+ var pixels_1 = convertDartToNative_ImageData(pixels);
+ _texImage2D_1(target, level, internalformat, format, type, pixels_1);
+ return;
}
@JSName('texImage2D')
@DomName('WebGLRenderingContext.texImage2D')
@DocsEditable
- void _texImage2D_1(target, level, internalformat, width, height, int border, format, type, TypedData pixels) native;
+ void _texImage2D_1(target, level, internalformat, format, type, pixels) native;
+
@JSName('texImage2D')
@DomName('WebGLRenderingContext.texImage2D')
@DocsEditable
- void _texImage2D_2(target, level, internalformat, format, type, pixels) native;
+ void texImage2DCanvas(int target, int level, int internalformat, int format, int type, CanvasElement canvas) native;
+
@JSName('texImage2D')
@DomName('WebGLRenderingContext.texImage2D')
@DocsEditable
- void _texImage2D_3(target, level, internalformat, format, type, ImageElement image) native;
+ void texImage2DImage(int target, int level, int internalformat, int format, int type, ImageElement image) native;
+
@JSName('texImage2D')
@DomName('WebGLRenderingContext.texImage2D')
@DocsEditable
- void _texImage2D_4(target, level, internalformat, format, type, CanvasElement canvas) native;
+ void texImage2DTypedData(int target, int level, int internalformat, int width, int height, int border, int format, int type, TypedData pixels) native;
+
@JSName('texImage2D')
@DomName('WebGLRenderingContext.texImage2D')
@DocsEditable
- void _texImage2D_5(target, level, internalformat, format, type, VideoElement video) native;
+ void texImage2DVideo(int target, int level, int internalformat, int format, int type, VideoElement video) native;
@DomName('WebGLRenderingContext.texParameterf')
@DocsEditable
@@ -2546,50 +2547,35 @@ class RenderingContext extends CanvasRenderingContext native "WebGLRenderingCont
@DomName('WebGLRenderingContext.texSubImage2D')
@DocsEditable
- 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, [int type, TypedData pixels]) {
- if (pixels != null && type != null && (canvas_OR_format_OR_image_OR_pixels_OR_video is int || canvas_OR_format_OR_image_OR_pixels_OR_video == null)) {
- _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
- return;
- }
- 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) {
- var pixels_1 = convertDartToNative_ImageData(canvas_OR_format_OR_image_OR_pixels_OR_video);
- _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_OR_type, pixels_1);
- return;
- }
- 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) {
- _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
- return;
- }
- 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 == null) {
- _texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
- return;
- }
- 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) {
- _texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
- return;
- }
- throw new ArgumentError("Incorrect number or type of arguments");
+ void texSubImage2D(int target, int level, int xoffset, int yoffset, int format, int type, ImageData pixels) {
+ var pixels_1 = convertDartToNative_ImageData(pixels);
+ _texSubImage2D_1(target, level, xoffset, yoffset, format, type, pixels_1);
+ return;
}
@JSName('texSubImage2D')
@DomName('WebGLRenderingContext.texSubImage2D')
@DocsEditable
- void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int format, type, TypedData pixels) native;
+ void _texSubImage2D_1(target, level, xoffset, yoffset, format, type, pixels) native;
+
@JSName('texSubImage2D')
@DomName('WebGLRenderingContext.texSubImage2D')
@DocsEditable
- void _texSubImage2D_2(target, level, xoffset, yoffset, format, type, pixels) native;
+ void texSubImage2DCanvas(int target, int level, int xoffset, int yoffset, int format, int type, CanvasElement canvas) native;
+
@JSName('texSubImage2D')
@DomName('WebGLRenderingContext.texSubImage2D')
@DocsEditable
- void _texSubImage2D_3(target, level, xoffset, yoffset, format, type, ImageElement image) native;
+ void texSubImage2DImage(int target, int level, int xoffset, int yoffset, int format, int type, ImageElement image) native;
+
@JSName('texSubImage2D')
@DomName('WebGLRenderingContext.texSubImage2D')
@DocsEditable
- void _texSubImage2D_4(target, level, xoffset, yoffset, format, type, CanvasElement canvas) native;
+ void texSubImage2DTypedData(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, TypedData pixels) native;
+
@JSName('texSubImage2D')
@DomName('WebGLRenderingContext.texSubImage2D')
@DocsEditable
- void _texSubImage2D_5(target, level, xoffset, yoffset, format, type, VideoElement video) native;
+ void texSubImage2DVideo(int target, int level, int xoffset, int yoffset, int format, int type, VideoElement video) native;
@DomName('WebGLRenderingContext.uniform1f')
@DocsEditable
« no previous file with comments | « sdk/lib/web_audio/dartium/web_audio_dartium.dart ('k') | sdk/lib/web_gl/dartium/web_gl_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698