| Index: tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate
|
| diff --git a/tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate b/tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate
|
| index a78940e4372dda8baaf60a186c82ff72aabcddf2..029a38bc06107b8e8a3c91a6526f429ba90d4dac 100644
|
| --- a/tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate
|
| @@ -11,85 +11,68 @@ $!MEMBERS
|
| * 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].
|
| + * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object.
|
| *
|
| + * This is deprecated in favor of [texImage2D].
|
| */
|
| -$if DART2JS
|
| - @JSName('texImage2D')
|
| - void texImage2DUntyped(int targetTexture, int levelOfDetail,
|
| - int internalFormat, int format, int type, data) native;
|
| -$else
|
| - void texImage2DUntyped(int targetTexture, int levelOfDetail,
|
| + @Deprecated("Use texImage2D")
|
| + void texImage2DUntyped(int targetTexture, int levelOfDetail,
|
| int internalFormat, int format, int type, data) {
|
| - if (data is ImageElement) {
|
| - texImage2DImage(targetTexture, levelOfDetail, internalFormat, format,
|
| - type, data);
|
| - } else if (data is ImageData) {
|
| - texImage2DImageData(targetTexture, levelOfDetail, internalFormat, format,
|
| - type, data);
|
| - } else if (data is CanvasElement) {
|
| - texImage2DCanvas(targetTexture, levelOfDetail, internalFormat, format,
|
| - type, data);
|
| - } else {
|
| - texImage2DVideo(targetTexture, levelOfDetail, internalFormat, format,
|
| - type, data);
|
| - }
|
| + texImage2D(targetText, levelOfDetail, internalFormat, format, type, data);
|
| }
|
| -$endif
|
|
|
| /**
|
| * Sets the currently bound texture to [data].
|
| + *
|
| + * This is deprecated in favour of [texImage2D].
|
| */
|
| -$if DART2JS
|
| - @JSName('texImage2D')
|
| - void texImage2DTyped(int targetTexture, int levelOfDetail,
|
| - int internalFormat, int width, int height, int border, int format,
|
| - int type, TypedData data) native;
|
| -$else
|
| + @Deprecated("Use texImage2D")
|
| void texImage2DTyped(int targetTexture, int levelOfDetail, int internalFormat,
|
| int width, int height, int border, int format, int type, TypedData data) {
|
| texImage2D(targetTexture, levelOfDetail, internalFormat,
|
| width, height, border, format, type, data);
|
| }
|
| -$endif
|
|
|
| /**
|
| * 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].
|
| + * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object.
|
| *
|
| */
|
| -$if DART2JS
|
| - @JSName('texSubImage2D')
|
| + @Deprecated("Use texSubImage2D")
|
| void texSubImage2DUntyped(int targetTexture, int levelOfDetail,
|
| - int xOffset, int yOffset, int format, int type, data) native;
|
| -$else
|
| - void texSubImage2DUntyped(int targetTexture, int levelOfDetail,
|
| int xOffset, int yOffset, int format, int type, data) {
|
| texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset,
|
| format, type, data);
|
| }
|
| -$endif
|
|
|
| /**
|
| * Updates a sub-rectangle of the currently bound texture to [data].
|
| */
|
| -$if DART2JS
|
| - @JSName('texSubImage2D')
|
| + @Deprecated("Use texSubImage2D")
|
| void texSubImage2DTyped(int targetTexture, int levelOfDetail,
|
| int xOffset, int yOffset, int width, int height, int border, int format,
|
| - int type, TypedData data) native;
|
| -$else
|
| - void texSubImage2DTyped(int targetTexture, int levelOfDetail,
|
| - int xOffset, int yOffset, int width, int height, int format,
|
| int type, TypedData data) {
|
| texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset,
|
| width, height, format, type, data);
|
| }
|
| -$endif
|
| +
|
| + /**
|
| + * Set the bufferData to [data].
|
| + */
|
| + @Deprecated("Use bufferData")
|
| + void bufferDataTyped(int target, TypedData data, int usage) {
|
| + bufferData2D(targetTexture, levelOfDetail, xOffset, yOffset,
|
| + format, type, data);
|
| + }
|
| +
|
| + /**
|
| + * Set the bufferSubData to [data].
|
| + */
|
| + @Deprecated("Use bufferSubData")
|
| + void bufferSubDataTyped(int target, TypedData data, int usage) {
|
| + bufferSubData2D(targetTexture, levelOfDetail, xOffset, yOffset,
|
| + format, type, data);
|
| + }
|
| }
|
|
|