| // 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 |
| } |
| } |
| |