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

Unified Diff: sky/engine/bindings/scripts/code_generator_dart.py

Issue 1151673002: Sky: different tack for custom Rect type in the Canvas API. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: Float32List Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/bindings/BUILD.gn ('k') | sky/engine/bindings/scripts/dart_types.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings/scripts/code_generator_dart.py
diff --git a/sky/engine/bindings/scripts/code_generator_dart.py b/sky/engine/bindings/scripts/code_generator_dart.py
index fd7da98e73a4fdba10b72389fb88d3057521f194..a8b01c505b4411c0291df073a614c951a84053b3 100644
--- a/sky/engine/bindings/scripts/code_generator_dart.py
+++ b/sky/engine/bindings/scripts/code_generator_dart.py
@@ -149,15 +149,6 @@ class CodeGeneratorDart(object):
template_contents['cpp_includes'] = sorted(includes)
- # If CustomDart is set, read the custom dart file and add it to our
- # template parameters.
- if 'CustomDart' in interface.extended_attributes:
- dart_filename = os.path.join(os.path.dirname(idl_filename),
- interface.name + ".dart")
- with open(dart_filename) as dart_file:
- custom_dartcode = dart_file.read()
- template_contents['custom_dartcode'] = custom_dartcode
-
idl_world = {'interface': None, 'callback': None}
# Load the pickle file for this IDL.
@@ -196,8 +187,14 @@ class CodeGeneratorDart(object):
# Load all pickled data for each interface.
for (directory, file_list) in global_entries:
- for idl_filename in file_list:
- interface_name = idl_filename_to_interface_name(idl_filename)
+ for filename in file_list:
+ if os.path.splitext(filename)[1] == '.dart':
+ # Special case: any .dart files in the list should be added
+ # to dart_sky.dart directly, but don't need to be processed.
+ interface_name = os.path.splitext(os.path.basename(filename))[0]
+ world['interfaces'].append({'name': interface_name})
+ continue
+ interface_name = idl_filename_to_interface_name(filename)
idl_pickle_filename = interface_name + "_globals.pickle"
idl_pickle_filename = os.path.join(directory, idl_pickle_filename)
if not os.path.exists(idl_pickle_filename):
« no previous file with comments | « sky/engine/bindings/BUILD.gn ('k') | sky/engine/bindings/scripts/dart_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698