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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/templates/html/impl/impl_WebGL2RenderingContext.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cb6f865d2eea224eabd396f8e163661d1b52cd51..f419f2b3be3bab7f0c8db1e5f4313976d12484ac 100644
--- a/tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate
+++ b/tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate
@@ -7,6 +7,21 @@ part of $LIBRARYNAME;
$(ANNOTATIONS)$(NATIVESPEC)class $CLASSNAME$EXTENDS implements CanvasRenderingContext {
$!MEMBERS
+ @DomName('WebGLRenderingContext.readPixels')
+ @DocsEditable()
+ void readPixels(int x, int y, int width, int height, int format, int type,
+ TypedData pixels) {
+$if DART2JS
+ _readPixels(x, y, width, height, format, type, pixels);
+$else
+ var data = js.toArrayBufferView(pixels);
+ _readPixels(x, y, width, height, format, type, data);
+ for (var i = 0; i < data.length; i++) {
+ pixels[i] = data[i];
+ }
+$endif
+ }
+
/**
* Sets the currently bound texture to [data].
*
« 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