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

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

Issue 1173703002: Move image loading out of C++ into Dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rename fetchMojo to fetchUrl Created 5 years, 6 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/scripts/dart_methods.py ('k') | sky/engine/core/core.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings/scripts/dart_types.py
diff --git a/sky/engine/bindings/scripts/dart_types.py b/sky/engine/bindings/scripts/dart_types.py
index 85f194261c37aa5ebc281051e8b55b19d8bf88dc..72558db91548f03e7bf81eb752786dc11e349bd4 100644
--- a/sky/engine/bindings/scripts/dart_types.py
+++ b/sky/engine/bindings/scripts/dart_types.py
@@ -116,9 +116,13 @@ CPP_SPECIAL_CONVERSION_RULES = {
'unrestricted float': 'float',
# Pass these by value, not pointer.
'Color': 'SkColor',
+ # These direct conversions appear to be working around
+ # dart_value_to_cpp_value using CPP_SPECIAL_CONVERSION_RULES directly
+ # instead of calling cpp_type.
'Float32List': 'Float32List',
'Point': 'Point',
'Rect': 'Rect',
+ 'MojoDataPipeConsumer': 'mojo::ScopedDataPipeConsumerHandle',
'TransferMode': 'SkXfermode::Mode',
'PaintingStyle': 'SkPaint::Style',
}
@@ -256,6 +260,7 @@ INCLUDES_FOR_TYPE = {
'NodeList': set(['sky/engine/core/dom/NodeList.h',
'sky/engine/core/dom/StaticNodeList.h']),
'DartValue': set(['sky/engine/tonic/dart_value.h']),
+ 'MojoDataPipeConsumer': set(['sky/engine/tonic/mojo_converter.h']),
}
@@ -370,6 +375,7 @@ DART_TO_CPP_VALUE = {
'Rect': pass_by_value_format('Rect'),
'TransferMode': pass_by_value_format('TransferMode'),
'PaintingStyle': pass_by_value_format('PaintingStyle'),
+ 'MojoDataPipeConsumer': pass_by_value_format('mojo::ScopedDataPipeConsumerHandle'),
}
def dart_value_to_cpp_value(idl_type, extended_attributes, variable_name,
@@ -512,6 +518,7 @@ IDL_TO_DART_TYPE = {
'boolean': 'bool',
'void': 'void',
'unsigned long': 'int',
+ 'MojoDataPipeConsumer': 'int',
}
def idl_type_to_dart_type(idl_type):
« no previous file with comments | « sky/engine/bindings/scripts/dart_methods.py ('k') | sky/engine/core/core.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698