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

Side by Side Diff: sdk/lib/web_gl/dartium/web_gl_dartium.dart

Issue 1831033002: Fix WebGL tex[Sub]Image2D/buffer[Sub]Data, restored Typed/Untyped aliases (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « sdk/lib/web_gl/dart2js/web_gl_dart2js.dart ('k') | tools/dom/docs/docs.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:async'; 6 import 'dart:async';
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:_internal'; 8 import 'dart:_internal';
9 import 'dart:html'; 9 import 'dart:html';
10 import 'dart:html_common'; 10 import 'dart:html_common';
(...skipping 3646 matching lines...) Expand 10 before | Expand all | Expand 10 after
3657 3657
3658 @DomName('WebGLRenderingContext.viewport') 3658 @DomName('WebGLRenderingContext.viewport')
3659 @DocsEditable() 3659 @DocsEditable()
3660 void viewport(int x, int y, int width, int height) => _blink.BlinkWebGLRenderi ngContext.instance.viewport_Callback_4_(unwrap_jso(this), x, y, width, height); 3660 void viewport(int x, int y, int width, int height) => _blink.BlinkWebGLRenderi ngContext.instance.viewport_Callback_4_(unwrap_jso(this), x, y, width, height);
3661 3661
3662 3662
3663 /** 3663 /**
3664 * Sets the currently bound texture to [data]. 3664 * Sets the currently bound texture to [data].
3665 * 3665 *
3666 * [data] can be either an [ImageElement], a 3666 * [data] can be either an [ImageElement], a
3667 * [CanvasElement], a [VideoElement], or an [ImageData] object. 3667 * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object.
3668 * 3668 *
3669 * To use [texImage2d] with a TypedData object, use [texImage2dTyped]. 3669 * This is deprecated in favor of [texImage2D].
3670 *
3671 */ 3670 */
3672 void texImage2DUntyped(int targetTexture, int levelOfDetail, 3671 @Deprecated("Use texImage2D")
3672 void texImage2DUntyped(int targetTexture, int levelOfDetail,
3673 int internalFormat, int format, int type, data) { 3673 int internalFormat, int format, int type, data) {
3674 if (data is ImageElement) { 3674 texImage2D(targetText, levelOfDetail, internalFormat, format, type, data);
3675 texImage2DImage(targetTexture, levelOfDetail, internalFormat, format,
3676 type, data);
3677 } else if (data is ImageData) {
3678 texImage2DImageData(targetTexture, levelOfDetail, internalFormat, format,
3679 type, data);
3680 } else if (data is CanvasElement) {
3681 texImage2DCanvas(targetTexture, levelOfDetail, internalFormat, format,
3682 type, data);
3683 } else {
3684 texImage2DVideo(targetTexture, levelOfDetail, internalFormat, format,
3685 type, data);
3686 }
3687 } 3675 }
3688 3676
3689 /** 3677 /**
3690 * Sets the currently bound texture to [data]. 3678 * Sets the currently bound texture to [data].
3679 *
3680 * This is deprecated in favour of [texImage2D].
3691 */ 3681 */
3682 @Deprecated("Use texImage2D")
3692 void texImage2DTyped(int targetTexture, int levelOfDetail, int internalFormat, 3683 void texImage2DTyped(int targetTexture, int levelOfDetail, int internalFormat,
3693 int width, int height, int border, int format, int type, TypedData data) { 3684 int width, int height, int border, int format, int type, TypedData data) {
3694 texImage2D(targetTexture, levelOfDetail, internalFormat, 3685 texImage2D(targetTexture, levelOfDetail, internalFormat,
3695 width, height, border, format, type, data); 3686 width, height, border, format, type, data);
3696 } 3687 }
3697 3688
3698 /** 3689 /**
3699 * Updates a sub-rectangle of the currently bound texture to [data]. 3690 * Updates a sub-rectangle of the currently bound texture to [data].
3700 * 3691 *
3701 * [data] can be either an [ImageElement], a 3692 * [data] can be either an [ImageElement], a
3702 * [CanvasElement], a [VideoElement], or an [ImageData] object. 3693 * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object.
3703 *
3704 * To use [texSubImage2d] with a TypedData object, use [texSubImage2dTyped].
3705 * 3694 *
3706 */ 3695 */
3707 void texSubImage2DUntyped(int targetTexture, int levelOfDetail, 3696 @Deprecated("Use texSubImage2D")
3697 void texSubImage2DUntyped(int targetTexture, int levelOfDetail,
3708 int xOffset, int yOffset, int format, int type, data) { 3698 int xOffset, int yOffset, int format, int type, data) {
3709 texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset, 3699 texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset,
3710 format, type, data); 3700 format, type, data);
3711 } 3701 }
3712 3702
3713 /** 3703 /**
3714 * Updates a sub-rectangle of the currently bound texture to [data]. 3704 * Updates a sub-rectangle of the currently bound texture to [data].
3715 */ 3705 */
3706 @Deprecated("Use texSubImage2D")
3716 void texSubImage2DTyped(int targetTexture, int levelOfDetail, 3707 void texSubImage2DTyped(int targetTexture, int levelOfDetail,
3717 int xOffset, int yOffset, int width, int height, int format, 3708 int xOffset, int yOffset, int width, int height, int border, int format,
3718 int type, TypedData data) { 3709 int type, TypedData data) {
3719 texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset, 3710 texSubImage2D(targetTexture, levelOfDetail, xOffset, yOffset,
3720 width, height, format, type, data); 3711 width, height, format, type, data);
3721 } 3712 }
3713
3714 /**
3715 * Set the bufferData to [data].
3716 */
3717 @Deprecated("Use bufferData")
3718 void bufferDataTyped(int target, TypedData data, int usage) {
3719 bufferData2D(targetTexture, levelOfDetail, xOffset, yOffset,
3720 format, type, data);
3721 }
3722
3723 /**
3724 * Set the bufferSubData to [data].
3725 */
3726 @Deprecated("Use bufferSubData")
3727 void bufferSubDataTyped(int target, TypedData data, int usage) {
3728 bufferSubData2D(targetTexture, levelOfDetail, xOffset, yOffset,
3729 format, type, data);
3730 }
3722 } 3731 }
3723 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3732 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3724 // for details. All rights reserved. Use of this source code is governed by a 3733 // for details. All rights reserved. Use of this source code is governed by a
3725 // BSD-style license that can be found in the LICENSE file. 3734 // BSD-style license that can be found in the LICENSE file.
3726 3735
3727 // WARNING: Do not edit - generated code. 3736 // WARNING: Do not edit - generated code.
3728 3737
3729 3738
3730 @DocsEditable() 3739 @DocsEditable()
3731 @DomName('WebGL2RenderingContext') 3740 @DomName('WebGL2RenderingContext')
(...skipping 3198 matching lines...) Expand 10 before | Expand all | Expand 10 after
6930 6939
6931 6940
6932 @DocsEditable() 6941 @DocsEditable()
6933 @DomName('WebGLRenderingContextBase') 6942 @DomName('WebGLRenderingContextBase')
6934 @Experimental() // untriaged 6943 @Experimental() // untriaged
6935 class _WebGLRenderingContextBase extends DartHtmlDomObject { 6944 class _WebGLRenderingContextBase extends DartHtmlDomObject {
6936 // To suppress missing implicit constructor warnings. 6945 // To suppress missing implicit constructor warnings.
6937 factory _WebGLRenderingContextBase._() { throw new UnsupportedError("Not suppo rted"); } 6946 factory _WebGLRenderingContextBase._() { throw new UnsupportedError("Not suppo rted"); }
6938 6947
6939 } 6948 }
OLDNEW
« no previous file with comments | « sdk/lib/web_gl/dart2js/web_gl_dart2js.dart ('k') | tools/dom/docs/docs.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698