OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 library surfaces_mojom; | 5 library surfaces_mojom; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:mojo/bindings.dart' as bindings; | 7 import 'package:mojo/bindings.dart' as bindings; |
8 import 'package:mojo/core.dart' as core; | 8 import 'package:mojo/core.dart' as core; |
9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
10 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; | 10 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 default: | 93 default: |
94 return null; | 94 return null; |
95 } | 95 } |
96 } | 96 } |
97 | 97 |
98 int toJson() => mojoEnumValue; | 98 int toJson() => mojoEnumValue; |
99 } | 99 } |
100 | 100 |
101 | 101 |
102 | 102 |
103 | |
104 | |
105 class Mailbox extends bindings.Struct { | 103 class Mailbox extends bindings.Struct { |
106 static const List<bindings.StructDataHeader> kVersions = const [ | 104 static const List<bindings.StructDataHeader> kVersions = const [ |
107 const bindings.StructDataHeader(16, 0) | 105 const bindings.StructDataHeader(16, 0) |
108 ]; | 106 ]; |
109 List<int> name = null; | 107 List<int> name = null; |
110 | 108 |
111 Mailbox() : super(kVersions.last.size); | 109 Mailbox() : super(kVersions.last.size); |
112 | 110 |
113 static Mailbox deserialize(bindings.Message message) { | 111 static Mailbox deserialize(bindings.Message message) { |
114 var decoder = new bindings.Decoder(message); | 112 var decoder = new bindings.Decoder(message); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 165 } |
168 | 166 |
169 Map toJson() { | 167 Map toJson() { |
170 Map map = new Map(); | 168 Map map = new Map(); |
171 map["name"] = name; | 169 map["name"] = name; |
172 return map; | 170 return map; |
173 } | 171 } |
174 } | 172 } |
175 | 173 |
176 | 174 |
177 | |
178 | |
179 class MailboxHolder extends bindings.Struct { | 175 class MailboxHolder extends bindings.Struct { |
180 static const List<bindings.StructDataHeader> kVersions = const [ | 176 static const List<bindings.StructDataHeader> kVersions = const [ |
181 const bindings.StructDataHeader(24, 0) | 177 const bindings.StructDataHeader(24, 0) |
182 ]; | 178 ]; |
183 Mailbox mailbox = null; | 179 Mailbox mailbox = null; |
184 int textureTarget = 0; | 180 int textureTarget = 0; |
185 int syncPoint = 0; | 181 int syncPoint = 0; |
186 | 182 |
187 MailboxHolder() : super(kVersions.last.size); | 183 MailboxHolder() : super(kVersions.last.size); |
188 | 184 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 Map toJson() { | 266 Map toJson() { |
271 Map map = new Map(); | 267 Map map = new Map(); |
272 map["mailbox"] = mailbox; | 268 map["mailbox"] = mailbox; |
273 map["textureTarget"] = textureTarget; | 269 map["textureTarget"] = textureTarget; |
274 map["syncPoint"] = syncPoint; | 270 map["syncPoint"] = syncPoint; |
275 return map; | 271 return map; |
276 } | 272 } |
277 } | 273 } |
278 | 274 |
279 | 275 |
280 | |
281 | |
282 class TransferableResource extends bindings.Struct { | 276 class TransferableResource extends bindings.Struct { |
283 static const List<bindings.StructDataHeader> kVersions = const [ | 277 static const List<bindings.StructDataHeader> kVersions = const [ |
284 const bindings.StructDataHeader(40, 0) | 278 const bindings.StructDataHeader(40, 0) |
285 ]; | 279 ]; |
286 int id = 0; | 280 int id = 0; |
287 ResourceFormat format = null; | 281 ResourceFormat format = null; |
288 int filter = 0; | 282 int filter = 0; |
289 bool isRepeated = false; | 283 bool isRepeated = false; |
290 bool isSoftware = false; | 284 bool isSoftware = false; |
291 geometry_mojom.Size size = null; | 285 geometry_mojom.Size size = null; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 map["filter"] = filter; | 428 map["filter"] = filter; |
435 map["isRepeated"] = isRepeated; | 429 map["isRepeated"] = isRepeated; |
436 map["isSoftware"] = isSoftware; | 430 map["isSoftware"] = isSoftware; |
437 map["size"] = size; | 431 map["size"] = size; |
438 map["mailboxHolder"] = mailboxHolder; | 432 map["mailboxHolder"] = mailboxHolder; |
439 return map; | 433 return map; |
440 } | 434 } |
441 } | 435 } |
442 | 436 |
443 | 437 |
444 | |
445 | |
446 class ReturnedResource extends bindings.Struct { | 438 class ReturnedResource extends bindings.Struct { |
447 static const List<bindings.StructDataHeader> kVersions = const [ | 439 static const List<bindings.StructDataHeader> kVersions = const [ |
448 const bindings.StructDataHeader(24, 0) | 440 const bindings.StructDataHeader(24, 0) |
449 ]; | 441 ]; |
450 int id = 0; | 442 int id = 0; |
451 int syncPoint = 0; | 443 int syncPoint = 0; |
452 int count = 0; | 444 int count = 0; |
453 bool lost = false; | 445 bool lost = false; |
454 | 446 |
455 ReturnedResource() : super(kVersions.last.size); | 447 ReturnedResource() : super(kVersions.last.size); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 Map map = new Map(); | 542 Map map = new Map(); |
551 map["id"] = id; | 543 map["id"] = id; |
552 map["syncPoint"] = syncPoint; | 544 map["syncPoint"] = syncPoint; |
553 map["count"] = count; | 545 map["count"] = count; |
554 map["lost"] = lost; | 546 map["lost"] = lost; |
555 return map; | 547 return map; |
556 } | 548 } |
557 } | 549 } |
558 | 550 |
559 | 551 |
560 | |
561 | |
562 class Frame extends bindings.Struct { | 552 class Frame extends bindings.Struct { |
563 static const List<bindings.StructDataHeader> kVersions = const [ | 553 static const List<bindings.StructDataHeader> kVersions = const [ |
564 const bindings.StructDataHeader(24, 0) | 554 const bindings.StructDataHeader(24, 0) |
565 ]; | 555 ]; |
566 List<TransferableResource> resources = null; | 556 List<TransferableResource> resources = null; |
567 List<quads_mojom.Pass> passes = null; | 557 List<quads_mojom.Pass> passes = null; |
568 | 558 |
569 Frame() : super(kVersions.last.size); | 559 Frame() : super(kVersions.last.size); |
570 | 560 |
571 static Frame deserialize(bindings.Message message) { | 561 static Frame deserialize(bindings.Message message) { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 | 660 |
671 Map toJson() { | 661 Map toJson() { |
672 Map map = new Map(); | 662 Map map = new Map(); |
673 map["resources"] = resources; | 663 map["resources"] = resources; |
674 map["passes"] = passes; | 664 map["passes"] = passes; |
675 return map; | 665 return map; |
676 } | 666 } |
677 } | 667 } |
678 | 668 |
679 | 669 |
680 | |
681 | |
682 class _ResourceReturnerReturnResourcesParams extends bindings.Struct { | 670 class _ResourceReturnerReturnResourcesParams extends bindings.Struct { |
683 static const List<bindings.StructDataHeader> kVersions = const [ | 671 static const List<bindings.StructDataHeader> kVersions = const [ |
684 const bindings.StructDataHeader(16, 0) | 672 const bindings.StructDataHeader(16, 0) |
685 ]; | 673 ]; |
686 List<ReturnedResource> resources = null; | 674 List<ReturnedResource> resources = null; |
687 | 675 |
688 _ResourceReturnerReturnResourcesParams() : super(kVersions.last.size); | 676 _ResourceReturnerReturnResourcesParams() : super(kVersions.last.size); |
689 | 677 |
690 static _ResourceReturnerReturnResourcesParams deserialize(bindings.Message mes
sage) { | 678 static _ResourceReturnerReturnResourcesParams deserialize(bindings.Message mes
sage) { |
691 var decoder = new bindings.Decoder(message); | 679 var decoder = new bindings.Decoder(message); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 } | 748 } |
761 | 749 |
762 Map toJson() { | 750 Map toJson() { |
763 Map map = new Map(); | 751 Map map = new Map(); |
764 map["resources"] = resources; | 752 map["resources"] = resources; |
765 return map; | 753 return map; |
766 } | 754 } |
767 } | 755 } |
768 | 756 |
769 | 757 |
770 | |
771 | |
772 class _SurfaceGetIdNamespaceParams extends bindings.Struct { | 758 class _SurfaceGetIdNamespaceParams extends bindings.Struct { |
773 static const List<bindings.StructDataHeader> kVersions = const [ | 759 static const List<bindings.StructDataHeader> kVersions = const [ |
774 const bindings.StructDataHeader(8, 0) | 760 const bindings.StructDataHeader(8, 0) |
775 ]; | 761 ]; |
776 | 762 |
777 _SurfaceGetIdNamespaceParams() : super(kVersions.last.size); | 763 _SurfaceGetIdNamespaceParams() : super(kVersions.last.size); |
778 | 764 |
779 static _SurfaceGetIdNamespaceParams deserialize(bindings.Message message) { | 765 static _SurfaceGetIdNamespaceParams deserialize(bindings.Message message) { |
780 var decoder = new bindings.Decoder(message); | 766 var decoder = new bindings.Decoder(message); |
781 var result = decode(decoder); | 767 var result = decode(decoder); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 return "_SurfaceGetIdNamespaceParams("")"; | 806 return "_SurfaceGetIdNamespaceParams("")"; |
821 } | 807 } |
822 | 808 |
823 Map toJson() { | 809 Map toJson() { |
824 Map map = new Map(); | 810 Map map = new Map(); |
825 return map; | 811 return map; |
826 } | 812 } |
827 } | 813 } |
828 | 814 |
829 | 815 |
830 | |
831 | |
832 class SurfaceGetIdNamespaceResponseParams extends bindings.Struct { | 816 class SurfaceGetIdNamespaceResponseParams extends bindings.Struct { |
833 static const List<bindings.StructDataHeader> kVersions = const [ | 817 static const List<bindings.StructDataHeader> kVersions = const [ |
834 const bindings.StructDataHeader(16, 0) | 818 const bindings.StructDataHeader(16, 0) |
835 ]; | 819 ]; |
836 int idNamespace = 0; | 820 int idNamespace = 0; |
837 | 821 |
838 SurfaceGetIdNamespaceResponseParams() : super(kVersions.last.size); | 822 SurfaceGetIdNamespaceResponseParams() : super(kVersions.last.size); |
839 | 823 |
840 static SurfaceGetIdNamespaceResponseParams deserialize(bindings.Message messag
e) { | 824 static SurfaceGetIdNamespaceResponseParams deserialize(bindings.Message messag
e) { |
841 var decoder = new bindings.Decoder(message); | 825 var decoder = new bindings.Decoder(message); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 } | 878 } |
895 | 879 |
896 Map toJson() { | 880 Map toJson() { |
897 Map map = new Map(); | 881 Map map = new Map(); |
898 map["idNamespace"] = idNamespace; | 882 map["idNamespace"] = idNamespace; |
899 return map; | 883 return map; |
900 } | 884 } |
901 } | 885 } |
902 | 886 |
903 | 887 |
904 | |
905 | |
906 class _SurfaceSetResourceReturnerParams extends bindings.Struct { | 888 class _SurfaceSetResourceReturnerParams extends bindings.Struct { |
907 static const List<bindings.StructDataHeader> kVersions = const [ | 889 static const List<bindings.StructDataHeader> kVersions = const [ |
908 const bindings.StructDataHeader(16, 0) | 890 const bindings.StructDataHeader(16, 0) |
909 ]; | 891 ]; |
910 Object returner = null; | 892 Object returner = null; |
911 | 893 |
912 _SurfaceSetResourceReturnerParams() : super(kVersions.last.size); | 894 _SurfaceSetResourceReturnerParams() : super(kVersions.last.size); |
913 | 895 |
914 static _SurfaceSetResourceReturnerParams deserialize(bindings.Message message)
{ | 896 static _SurfaceSetResourceReturnerParams deserialize(bindings.Message message)
{ |
915 var decoder = new bindings.Decoder(message); | 897 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 "returner: $returner" ")"; | 949 "returner: $returner" ")"; |
968 } | 950 } |
969 | 951 |
970 Map toJson() { | 952 Map toJson() { |
971 throw new bindings.MojoCodecError( | 953 throw new bindings.MojoCodecError( |
972 'Object containing handles cannot be encoded to JSON.'); | 954 'Object containing handles cannot be encoded to JSON.'); |
973 } | 955 } |
974 } | 956 } |
975 | 957 |
976 | 958 |
977 | |
978 | |
979 class _SurfaceCreateSurfaceParams extends bindings.Struct { | 959 class _SurfaceCreateSurfaceParams extends bindings.Struct { |
980 static const List<bindings.StructDataHeader> kVersions = const [ | 960 static const List<bindings.StructDataHeader> kVersions = const [ |
981 const bindings.StructDataHeader(16, 0) | 961 const bindings.StructDataHeader(16, 0) |
982 ]; | 962 ]; |
983 int idLocal = 0; | 963 int idLocal = 0; |
984 | 964 |
985 _SurfaceCreateSurfaceParams() : super(kVersions.last.size); | 965 _SurfaceCreateSurfaceParams() : super(kVersions.last.size); |
986 | 966 |
987 static _SurfaceCreateSurfaceParams deserialize(bindings.Message message) { | 967 static _SurfaceCreateSurfaceParams deserialize(bindings.Message message) { |
988 var decoder = new bindings.Decoder(message); | 968 var decoder = new bindings.Decoder(message); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 } | 1021 } |
1042 | 1022 |
1043 Map toJson() { | 1023 Map toJson() { |
1044 Map map = new Map(); | 1024 Map map = new Map(); |
1045 map["idLocal"] = idLocal; | 1025 map["idLocal"] = idLocal; |
1046 return map; | 1026 return map; |
1047 } | 1027 } |
1048 } | 1028 } |
1049 | 1029 |
1050 | 1030 |
1051 | |
1052 | |
1053 class _SurfaceSubmitFrameParams extends bindings.Struct { | 1031 class _SurfaceSubmitFrameParams extends bindings.Struct { |
1054 static const List<bindings.StructDataHeader> kVersions = const [ | 1032 static const List<bindings.StructDataHeader> kVersions = const [ |
1055 const bindings.StructDataHeader(24, 0) | 1033 const bindings.StructDataHeader(24, 0) |
1056 ]; | 1034 ]; |
1057 int idLocal = 0; | 1035 int idLocal = 0; |
1058 Frame frame = null; | 1036 Frame frame = null; |
1059 | 1037 |
1060 _SurfaceSubmitFrameParams() : super(kVersions.last.size); | 1038 _SurfaceSubmitFrameParams() : super(kVersions.last.size); |
1061 | 1039 |
1062 static _SurfaceSubmitFrameParams deserialize(bindings.Message message) { | 1040 static _SurfaceSubmitFrameParams deserialize(bindings.Message message) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 | 1108 |
1131 Map toJson() { | 1109 Map toJson() { |
1132 Map map = new Map(); | 1110 Map map = new Map(); |
1133 map["idLocal"] = idLocal; | 1111 map["idLocal"] = idLocal; |
1134 map["frame"] = frame; | 1112 map["frame"] = frame; |
1135 return map; | 1113 return map; |
1136 } | 1114 } |
1137 } | 1115 } |
1138 | 1116 |
1139 | 1117 |
1140 | |
1141 | |
1142 class SurfaceSubmitFrameResponseParams extends bindings.Struct { | 1118 class SurfaceSubmitFrameResponseParams extends bindings.Struct { |
1143 static const List<bindings.StructDataHeader> kVersions = const [ | 1119 static const List<bindings.StructDataHeader> kVersions = const [ |
1144 const bindings.StructDataHeader(8, 0) | 1120 const bindings.StructDataHeader(8, 0) |
1145 ]; | 1121 ]; |
1146 | 1122 |
1147 SurfaceSubmitFrameResponseParams() : super(kVersions.last.size); | 1123 SurfaceSubmitFrameResponseParams() : super(kVersions.last.size); |
1148 | 1124 |
1149 static SurfaceSubmitFrameResponseParams deserialize(bindings.Message message)
{ | 1125 static SurfaceSubmitFrameResponseParams deserialize(bindings.Message message)
{ |
1150 var decoder = new bindings.Decoder(message); | 1126 var decoder = new bindings.Decoder(message); |
1151 var result = decode(decoder); | 1127 var result = decode(decoder); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 return "SurfaceSubmitFrameResponseParams("")"; | 1166 return "SurfaceSubmitFrameResponseParams("")"; |
1191 } | 1167 } |
1192 | 1168 |
1193 Map toJson() { | 1169 Map toJson() { |
1194 Map map = new Map(); | 1170 Map map = new Map(); |
1195 return map; | 1171 return map; |
1196 } | 1172 } |
1197 } | 1173 } |
1198 | 1174 |
1199 | 1175 |
1200 | |
1201 | |
1202 class _SurfaceDestroySurfaceParams extends bindings.Struct { | 1176 class _SurfaceDestroySurfaceParams extends bindings.Struct { |
1203 static const List<bindings.StructDataHeader> kVersions = const [ | 1177 static const List<bindings.StructDataHeader> kVersions = const [ |
1204 const bindings.StructDataHeader(16, 0) | 1178 const bindings.StructDataHeader(16, 0) |
1205 ]; | 1179 ]; |
1206 int idLocal = 0; | 1180 int idLocal = 0; |
1207 | 1181 |
1208 _SurfaceDestroySurfaceParams() : super(kVersions.last.size); | 1182 _SurfaceDestroySurfaceParams() : super(kVersions.last.size); |
1209 | 1183 |
1210 static _SurfaceDestroySurfaceParams deserialize(bindings.Message message) { | 1184 static _SurfaceDestroySurfaceParams deserialize(bindings.Message message) { |
1211 var decoder = new bindings.Decoder(message); | 1185 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1263 "idLocal: $idLocal" ")"; | 1237 "idLocal: $idLocal" ")"; |
1264 } | 1238 } |
1265 | 1239 |
1266 Map toJson() { | 1240 Map toJson() { |
1267 Map map = new Map(); | 1241 Map map = new Map(); |
1268 map["idLocal"] = idLocal; | 1242 map["idLocal"] = idLocal; |
1269 return map; | 1243 return map; |
1270 } | 1244 } |
1271 } | 1245 } |
1272 | 1246 |
1273 | |
1274 | |
1275 | |
1276 const int _ResourceReturner_returnResourcesName = 0; | 1247 const int _ResourceReturner_returnResourcesName = 0; |
1277 | 1248 |
1278 | |
1279 | |
1280 class _ResourceReturnerServiceDescription implements service_describer.ServiceDe
scription { | 1249 class _ResourceReturnerServiceDescription implements service_describer.ServiceDe
scription { |
1281 dynamic getTopLevelInterface([Function responseFactory]) => | 1250 dynamic getTopLevelInterface([Function responseFactory]) => |
1282 responseFactory(null); | 1251 responseFactory(null); |
1283 | 1252 |
1284 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 1253 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
1285 responseFactory(null); | 1254 responseFactory(null); |
1286 | 1255 |
1287 dynamic getAllTypeDefinitions([Function responseFactory]) => | 1256 dynamic getAllTypeDefinitions([Function responseFactory]) => |
1288 responseFactory(null); | 1257 responseFactory(null); |
1289 } | 1258 } |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1464 return _cachedServiceDescription; | 1433 return _cachedServiceDescription; |
1465 } | 1434 } |
1466 } | 1435 } |
1467 | 1436 |
1468 const int _Surface_getIdNamespaceName = 0; | 1437 const int _Surface_getIdNamespaceName = 0; |
1469 const int _Surface_setResourceReturnerName = 1; | 1438 const int _Surface_setResourceReturnerName = 1; |
1470 const int _Surface_createSurfaceName = 2; | 1439 const int _Surface_createSurfaceName = 2; |
1471 const int _Surface_submitFrameName = 3; | 1440 const int _Surface_submitFrameName = 3; |
1472 const int _Surface_destroySurfaceName = 4; | 1441 const int _Surface_destroySurfaceName = 4; |
1473 | 1442 |
1474 | |
1475 | |
1476 class _SurfaceServiceDescription implements service_describer.ServiceDescription
{ | 1443 class _SurfaceServiceDescription implements service_describer.ServiceDescription
{ |
1477 dynamic getTopLevelInterface([Function responseFactory]) => | 1444 dynamic getTopLevelInterface([Function responseFactory]) => |
1478 responseFactory(null); | 1445 responseFactory(null); |
1479 | 1446 |
1480 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 1447 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
1481 responseFactory(null); | 1448 responseFactory(null); |
1482 | 1449 |
1483 dynamic getAllTypeDefinitions([Function responseFactory]) => | 1450 dynamic getAllTypeDefinitions([Function responseFactory]) => |
1484 responseFactory(null); | 1451 responseFactory(null); |
1485 } | 1452 } |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1797 static service_describer.ServiceDescription get serviceDescription { | 1764 static service_describer.ServiceDescription get serviceDescription { |
1798 if (_cachedServiceDescription == null) { | 1765 if (_cachedServiceDescription == null) { |
1799 _cachedServiceDescription = new _SurfaceServiceDescription(); | 1766 _cachedServiceDescription = new _SurfaceServiceDescription(); |
1800 } | 1767 } |
1801 return _cachedServiceDescription; | 1768 return _cachedServiceDescription; |
1802 } | 1769 } |
1803 } | 1770 } |
1804 | 1771 |
1805 | 1772 |
1806 | 1773 |
OLD | NEW |