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

Side by Side Diff: runtime/embedders/openglui/common/extension.cc

Issue 14485002: Get the OpenGLUI emulator building again on the desktop. Mostly this is applying the changes here: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/embedders/openglui/common/vm_glue.h » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include "embedders/openglui/common/extension.h" 5 #include "embedders/openglui/common/extension.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 Dart_CObject* param1 = message->value.as_array.values[1]; 868 Dart_CObject* param1 = message->value.as_array.values[1];
869 if (param0->type == Dart_CObject::kInt32 && 869 if (param0->type == Dart_CObject::kInt32 &&
870 param1->type == Dart_CObject::kInt32) { 870 param1->type == Dart_CObject::kInt32) {
871 int length = param0->value.as_int32; 871 int length = param0->value.as_int32;
872 int seed = param1->value.as_int32; 872 int seed = param1->value.as_int32;
873 873
874 uint8_t* values = RandomArray(seed, length); 874 uint8_t* values = RandomArray(seed, length);
875 875
876 if (values != NULL) { 876 if (values != NULL) {
877 Dart_CObject result; 877 Dart_CObject result;
878 result.type = Dart_CObject::kUint8Array; 878 result.type = Dart_CObject::kTypedData;
879 result.value.as_byte_array.values = values; 879 result.value.as_typed_data.type = Dart_CObject::kUint8Array;
880 result.value.as_byte_array.length = length; 880 result.value.as_typed_data.values = values;
881 result.value.as_typed_data.length = length;
881 Dart_PostCObject(reply_port_id, &result); 882 Dart_PostCObject(reply_port_id, &result);
882 free(values); 883 free(values);
883 // It is OK that result is destroyed when function exits. 884 // It is OK that result is destroyed when function exits.
884 // Dart_PostCObject has copied its data. 885 // Dart_PostCObject has copied its data.
885 return; 886 return;
886 } 887 }
887 } 888 }
888 } 889 }
889 Dart_CObject result; 890 Dart_CObject result;
890 result.type = Dart_CObject::kNull; 891 result.type = Dart_CObject::kNull;
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 HandleError(Dart_StringToCString(name, &cname)); 1727 HandleError(Dart_StringToCString(name, &cname));
1727 for (int i = 0; function_list[i].name != NULL; ++i) { 1728 for (int i = 0; function_list[i].name != NULL; ++i) {
1728 if (strcmp(function_list[i].name, cname) == 0) { 1729 if (strcmp(function_list[i].name, cname) == 0) {
1729 result = function_list[i].function; 1730 result = function_list[i].function;
1730 break; 1731 break;
1731 } 1732 }
1732 } 1733 }
1733 Dart_ExitScope(); 1734 Dart_ExitScope();
1734 return result; 1735 return result;
1735 } 1736 }
OLDNEW
« no previous file with comments | « no previous file | runtime/embedders/openglui/common/vm_glue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698