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

Unified Diff: tools/dom/templates/html/impl/impl_WebGL2RenderingContext.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
Index: tools/dom/templates/html/impl/impl_WebGL2RenderingContext.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_WebGL2RenderingContext.darttemplate b/tools/dom/templates/html/impl/impl_WebGL2RenderingContext.darttemplate
new file mode 100644
index 0000000000000000000000000000000000000000..512fad9d6d4532e15983af1170a1ce295876aa74
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_WebGL2RenderingContext.darttemplate
@@ -0,0 +1,26 @@
+// 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.
+
+part of $LIBRARYNAME;
+
+@DocsEditable()
+$(ANNOTATIONS)$(NATIVESPEC)class $CLASSNAME$EXTENDS implements _WebGL2RenderingContextBase, _WebGLRenderingContextBase {
+$!MEMBERS
+
+ @DomName('WebGLRenderingContext2.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
+ }
+}
+
« no previous file with comments | « tools/dom/scripts/htmlrenamer.py ('k') | tools/dom/templates/html/impl/impl_WebGLRenderingContext.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698