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

Unified Diff: runtime/lib/typed_data.dart

Issue 21145004: Add Float32x4List.fromList to runtime implementation and some tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « no previous file | sdk/lib/typed_data/typed_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/typed_data.dart
diff --git a/runtime/lib/typed_data.dart b/runtime/lib/typed_data.dart
index 437be6a80f6e4be65877129ee6e94ccdaf9b08a7..de61ae0b85df24acf0b7bc02c2adbd5bb03641c7 100644
--- a/runtime/lib/typed_data.dart
+++ b/runtime/lib/typed_data.dart
@@ -229,6 +229,14 @@ patch class Float32x4List {
return new _Float32x4Array(length);
}
+ /* patch */ factory Float32x4List.fromList(List<Float32x4> elements) {
+ var result = new _Float32x4Array(elements.length);
+ for (int i = 0; i < elements.length; i++) {
+ result[i] = elements[i];
+ }
+ return result;
+ }
+
/* patch */ factory Float32x4List.view(ByteBuffer buffer,
[int offsetInBytes = 0, int length]) {
return new _Float32x4ArrayView(buffer, offsetInBytes, length);
« no previous file with comments | « no previous file | sdk/lib/typed_data/typed_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698