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

Side by Side Diff: tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate

Issue 2975953002: Fixed readPixels not working in Dartium. (Closed)
Patch Set: Updated to latest WebKit (exposed Dart_TypedArray_ArrayBufferView). Created 3 years, 5 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 | « tools/dom/templates/html/impl/impl_WebGL2RenderingContext.darttemplate ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 $(ANNOTATIONS)$(NATIVESPEC)class $CLASSNAME$EXTENDS implements CanvasRenderingCo ntext { 7 $(ANNOTATIONS)$(NATIVESPEC)class $CLASSNAME$EXTENDS implements CanvasRenderingCo ntext {
8 $!MEMBERS 8 $!MEMBERS
9 9
10 @DomName('WebGLRenderingContext.readPixels')
11 @DocsEditable()
12 void readPixels(int x, int y, int width, int height, int format, int type,
13 TypedData pixels) {
14 $if DART2JS
15 _readPixels(x, y, width, height, format, type, pixels);
16 $else
17 var data = js.toArrayBufferView(pixels);
18 _readPixels(x, y, width, height, format, type, data);
19 for (var i = 0; i < data.length; i++) {
20 pixels[i] = data[i];
21 }
22 $endif
23 }
24
10 /** 25 /**
11 * Sets the currently bound texture to [data]. 26 * Sets the currently bound texture to [data].
12 * 27 *
13 * [data] can be either an [ImageElement], a 28 * [data] can be either an [ImageElement], a
14 * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object. 29 * [CanvasElement], a [VideoElement], [TypedData] or an [ImageData] object.
15 * 30 *
16 * This is deprecated in favor of [texImage2D]. 31 * This is deprecated in favor of [texImage2D].
17 */ 32 */
18 @Deprecated("Use texImage2D") 33 @Deprecated("Use texImage2D")
19 void texImage2DUntyped(int targetTexture, int levelOfDetail, 34 void texImage2DUntyped(int targetTexture, int levelOfDetail,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 82 }
68 83
69 /** 84 /**
70 * Set the bufferSubData to [data]. 85 * Set the bufferSubData to [data].
71 */ 86 */
72 @Deprecated("Use bufferSubData") 87 @Deprecated("Use bufferSubData")
73 void bufferSubDataTyped(int target, int offset, TypedData data) { 88 void bufferSubDataTyped(int target, int offset, TypedData data) {
74 bufferSubData(target, offset, data); 89 bufferSubData(target, offset, data);
75 } 90 }
76 } 91 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/impl/impl_WebGL2RenderingContext.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698