| 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 ba700e1ef1a5f104f8293013b836f3692265f2b2..248b48c32430cec8aef3c32cf1836b340677d24f 100644
|
| --- a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
|
| +++ b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
|
| @@ -865,12 +865,11 @@ class Program extends Interceptor native "WebGLProgram" {
|
| @Unstable()
|
| class Renderbuffer extends Interceptor native "WebGLRenderbuffer" {
|
| }
|
| -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
|
|
| -@DocsEditable()
|
| @DomName('WebGLRenderingContext')
|
| @SupportedBrowser(SupportedBrowser.CHROME)
|
| @SupportedBrowser(SupportedBrowser.FIREFOX)
|
| @@ -2493,53 +2492,6 @@ class RenderingContext extends CanvasRenderingContext native "WebGLRenderingCont
|
| @DocsEditable()
|
| void stencilOpSeparate(int face, int fail, int zfail, int zpass) native;
|
|
|
| - @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");
|
| - }
|
| - @JSName('texImage2D')
|
| - @DomName('WebGLRenderingContext.texImage2D')
|
| - @DocsEditable()
|
| - void _texImage2D_1(target, level, internalformat, width, height, int border, format, type, TypedData pixels) native;
|
| - @JSName('texImage2D')
|
| - @DomName('WebGLRenderingContext.texImage2D')
|
| - @DocsEditable()
|
| - void _texImage2D_2(target, level, internalformat, format, type, pixels) native;
|
| - @JSName('texImage2D')
|
| - @DomName('WebGLRenderingContext.texImage2D')
|
| - @DocsEditable()
|
| - void _texImage2D_3(target, level, internalformat, format, type, ImageElement image) native;
|
| - @JSName('texImage2D')
|
| - @DomName('WebGLRenderingContext.texImage2D')
|
| - @DocsEditable()
|
| - void _texImage2D_4(target, level, internalformat, format, type, CanvasElement canvas) native;
|
| - @JSName('texImage2D')
|
| - @DomName('WebGLRenderingContext.texImage2D')
|
| - @DocsEditable()
|
| - void _texImage2D_5(target, level, internalformat, format, type, VideoElement video) native;
|
| -
|
| @DomName('WebGLRenderingContext.texParameterf')
|
| @DocsEditable()
|
| void texParameterf(int target, int pname, num param) native;
|
| @@ -2548,53 +2500,6 @@ class RenderingContext extends CanvasRenderingContext native "WebGLRenderingCont
|
| @DocsEditable()
|
| void texParameteri(int target, int pname, int param) native;
|
|
|
| - @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");
|
| - }
|
| - @JSName('texSubImage2D')
|
| - @DomName('WebGLRenderingContext.texSubImage2D')
|
| - @DocsEditable()
|
| - void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int format, type, TypedData pixels) native;
|
| - @JSName('texSubImage2D')
|
| - @DomName('WebGLRenderingContext.texSubImage2D')
|
| - @DocsEditable()
|
| - void _texSubImage2D_2(target, level, xoffset, yoffset, format, type, pixels) native;
|
| - @JSName('texSubImage2D')
|
| - @DomName('WebGLRenderingContext.texSubImage2D')
|
| - @DocsEditable()
|
| - void _texSubImage2D_3(target, level, xoffset, yoffset, format, type, ImageElement image) native;
|
| - @JSName('texSubImage2D')
|
| - @DomName('WebGLRenderingContext.texSubImage2D')
|
| - @DocsEditable()
|
| - void _texSubImage2D_4(target, level, xoffset, yoffset, format, type, CanvasElement canvas) native;
|
| - @JSName('texSubImage2D')
|
| - @DomName('WebGLRenderingContext.texSubImage2D')
|
| - @DocsEditable()
|
| - void _texSubImage2D_5(target, level, xoffset, yoffset, format, type, VideoElement video) native;
|
| -
|
| @DomName('WebGLRenderingContext.uniform1f')
|
| @DocsEditable()
|
| void uniform1f(UniformLocation location, num x) native;
|
| @@ -2718,6 +2623,51 @@ class RenderingContext extends CanvasRenderingContext native "WebGLRenderingCont
|
| @DomName('WebGLRenderingContext.viewport')
|
| @DocsEditable()
|
| void viewport(int x, int y, int width, int height) native;
|
| +
|
| +
|
| + /**
|
| + * Sets the currently bound texture to [data].
|
| + *
|
| + * [data] can be either an [ImageElement], a
|
| + * [CanvasElement], a [VideoElement], or an [ImageData] object.
|
| + *
|
| + * To use [texImage2d] with a TypedData object, use [texImage2dTyped].
|
| + *
|
| + */
|
| + @DomName('WebGLRenderingContext.texImage2D')
|
| + @JSName('texImage2D')
|
| + void texImage2D(int targetTexture, int levelOfDetail, int internalFormat,
|
| + int format, int type, data) native;
|
| +
|
| + /**
|
| + * Sets the currently bound texture to [data].
|
| + */
|
| + @JSName('texImage2D')
|
| + void texImage2DTyped(int targetTexture, int levelOfDetail,
|
| + int internalFormat, int width, int height, int border, int format,
|
| + int type, TypedData data) native;
|
| +
|
| + /**
|
| + * Updates a sub-rectangle of the currently bound texture to [data].
|
| + *
|
| + * [data] can be either an [ImageElement], a
|
| + * [CanvasElement], a [VideoElement], or an [ImageData] object.
|
| + *
|
| + * To use [texSubImage2d] with a TypedData object, use [texSubImage2dTyped].
|
| + *
|
| + */
|
| + @DomName('WebGLRenderingContext.texSubImage2D')
|
| + @JSName('texSubImage2D')
|
| + void texSubImage2D(int targetTexture, int levelOfDetail, int internalFormat,
|
| + int format, int type, data) native;
|
| +
|
| + /**
|
| + * Updates a sub-rectangle of the currently bound texture to [data].
|
| + */
|
| + @JSName('texSubImage2D')
|
| + void texSubImage2DTyped(int targetTexture, int levelOfDetail,
|
| + int internalFormat, int width, int height, int border, int format,
|
| + int type, TypedData data) native;
|
| }
|
| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
|
|