summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 00:47:23 +0000
committergspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 00:47:23 +0000
commitf4c5685a77b9bbe552ad55eaeaf168ce374119d4 (patch)
treeb6203b3cb15646380bbc8eb75b097e382c772616
parentbb9d6efee27fa5a74a7c697a43ab1ff8e55eba9f (diff)
downloadchromium_src-f4c5685a77b9bbe552ad55eaeaf168ce374119d4.zip
chromium_src-f4c5685a77b9bbe552ad55eaeaf168ce374119d4.tar.gz
chromium_src-f4c5685a77b9bbe552ad55eaeaf168ce374119d4.tar.bz2
This changes how we do gyp targets that generate code because GYP isn't
yet consistent across platforms, and the old way won't work on the Mac. Also, updated to include bitmap.idl in the idl build, and fixed a signed/unsigned mismatch warning in bitmap.cc Review URL: http://codereview.chromium.org/155612 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20830 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--o3d/compiler/technique/technique.gyp48
-rw-r--r--o3d/core/cross/bitmap.cc2
-rw-r--r--o3d/plugin/idl/idl.gyp269
3 files changed, 86 insertions, 233 deletions
diff --git a/o3d/compiler/technique/technique.gyp b/o3d/compiler/technique/technique.gyp
index 3e222e3..cd2f865 100644
--- a/o3d/compiler/technique/technique.gyp
+++ b/o3d/compiler/technique/technique.gyp
@@ -12,8 +12,16 @@
],
'targets': [
{
- 'target_name': 'parser_generator',
- 'type': 'none',
+ 'target_name': 'technique',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../../../<(antlrdir)/antlr.gyp:antlr3c',
+ '../../../base/base.gyp:base',
+ '../../core/core.gyp:o3dCore',
+ ],
+ 'include_dirs': [
+ '<(technique_out_dir)',
+ ],
'rules': [
{
'rule_name': 'technique_parser',
@@ -27,6 +35,7 @@
'<(technique_out_dir)/<(RULE_INPUT_ROOT)Parser.c',
'<(technique_out_dir)/<(RULE_INPUT_ROOT)Parser.h',
],
+ 'process_outputs_as_sources': 1,
'action': [
'java',
'-cp', '../../../<(antlrdir)/lib/antlr-3.1.1.jar',
@@ -38,30 +47,6 @@
],
'sources': [
'Technique.g3pl',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(technique_out_dir)',
- ],
- },
- },
- {
- 'target_name': 'technique',
- 'type': 'static_library',
- 'dependencies': [
- 'parser_generator',
- '../../../<(antlrdir)/antlr.gyp:antlr3c',
- '../../../base/base.gyp:base',
- '../../core/core.gyp:o3dCore',
- ],
- 'include_dirs': [
- '<(technique_out_dir)',
- ],
- 'sources': [
- '<(technique_out_dir)/TechniqueLexer.c',
- '<(technique_out_dir)/TechniqueLexer.h',
- '<(technique_out_dir)/TechniqueParser.c',
- '<(technique_out_dir)/TechniqueParser.h',
'technique_error.cc',
'technique_error.h',
'technique_parser.cc',
@@ -69,16 +54,17 @@
'technique_structures.cc',
'technique_structures.h',
],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'CompileAs': '2',
- },
- },
+ 'hard_dependency': 1,
'direct_dependent_settings': {
'include_dirs': [
'<(technique_out_dir)',
],
},
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'CompileAs': '2',
+ },
+ },
},
],
}
diff --git a/o3d/core/cross/bitmap.cc b/o3d/core/cross/bitmap.cc
index d3d1499..61ac355 100644
--- a/o3d/core/cross/bitmap.cc
+++ b/o3d/core/cross/bitmap.cc
@@ -385,7 +385,7 @@ void Bitmap::BilinearInterpolateScale(const uint8* src_img_data,
base_y = -base_y;
int base_floor_y = static_cast<int>(std::floor(base_y));
- for (unsigned int c = 0; c < components; c++) {
+ for (int c = 0; c < components; c++) {
// if base_x and base_y are integers, which means this point
// exists in src_img, just copy the original values.
if (base_x - base_floor_x < kEpsilon &&
diff --git a/o3d/plugin/idl/idl.gyp b/o3d/plugin/idl/idl.gyp
index df5f206..4bf9e3a 100644
--- a/o3d/plugin/idl/idl.gyp
+++ b/o3d/plugin/idl/idl.gyp
@@ -9,74 +9,72 @@
'variables': {
'chromium_code': 1,
'idl_out_dir': '<(SHARED_INTERMEDIATE_DIR)/idl_glue',
+ 'static_glue_dir': '../../../third_party/nixysa/files/static_glue/npapi',
+ 'idl_files': [
+ 'archive_request.idl',
+ 'bitmap.idl',
+ 'bounding_box.idl',
+ 'buffer.idl',
+ 'canvas.idl',
+ 'canvas_paint.idl',
+ 'canvas_shader.idl',
+ 'clear_buffer.idl',
+ 'client.idl',
+ 'counter.idl',
+ 'cursor.idl',
+ 'curve.idl',
+ 'display_mode.idl',
+ 'draw_context.idl',
+ 'draw_element.idl',
+ 'draw_list.idl',
+ 'draw_pass.idl',
+ 'effect.idl',
+ 'element.idl',
+ 'event.idl',
+ 'field.idl',
+ 'file_request.idl',
+ 'function.idl',
+ 'material.idl',
+ 'matrix4_axis_rotation.idl',
+ 'matrix4_composition.idl',
+ 'matrix4_scale.idl',
+ 'matrix4_translation.idl',
+ 'named.idl',
+ 'pack.idl',
+ 'param.idl',
+ 'param_array.idl',
+ 'param_object.idl',
+ 'param_operation.idl',
+ 'plugin.idl',
+ 'primitive.idl',
+ 'raw_data.idl',
+ 'ray_intersection_info.idl',
+ 'render_event.idl',
+ 'render_node.idl',
+ 'render_surface.idl',
+ 'render_surface_set.idl',
+ 'sampler.idl',
+ 'shape.idl',
+ 'skin.idl',
+ 'standard_param.idl',
+ 'state.idl',
+ 'state_set.idl',
+ 'stream.idl',
+ 'stream_bank.idl',
+ 'texture.idl',
+ 'tick_event.idl',
+ 'transform.idl',
+ 'tree_traversal.idl',
+ 'types.idl',
+ 'vector.idl',
+ 'vertex_source.idl',
+ 'viewport.idl',
+ ],
},
'targets': [
{
- 'target_name': 'idl_generator',
- 'type': 'none',
- 'variables': {
- 'idl_files' : [
- # NOTE: Sadly, if you add/remove/rename an IDL file in this
- # list, you must also update the list of outputs below.
- 'archive_request.idl',
- 'bounding_box.idl',
- 'buffer.idl',
- 'canvas.idl',
- 'canvas_paint.idl',
- 'canvas_shader.idl',
- 'clear_buffer.idl',
- 'client.idl',
- 'counter.idl',
- 'cursor.idl',
- 'curve.idl',
- 'display_mode.idl',
- 'draw_context.idl',
- 'draw_element.idl',
- 'draw_list.idl',
- 'draw_pass.idl',
- 'effect.idl',
- 'element.idl',
- 'event.idl',
- 'field.idl',
- 'file_request.idl',
- 'function.idl',
- 'material.idl',
- 'matrix4_axis_rotation.idl',
- 'matrix4_composition.idl',
- 'matrix4_scale.idl',
- 'matrix4_translation.idl',
- 'named.idl',
- 'pack.idl',
- 'param.idl',
- 'param_array.idl',
- 'param_object.idl',
- 'param_operation.idl',
- 'plugin.idl',
- 'primitive.idl',
- 'raw_data.idl',
- 'ray_intersection_info.idl',
- 'render_event.idl',
- 'render_node.idl',
- 'render_surface.idl',
- 'render_surface_set.idl',
- 'sampler.idl',
- 'shape.idl',
- 'skin.idl',
- 'standard_param.idl',
- 'state.idl',
- 'state_set.idl',
- 'stream.idl',
- 'stream_bank.idl',
- 'texture.idl',
- 'tick_event.idl',
- 'transform.idl',
- 'tree_traversal.idl',
- 'types.idl',
- 'vector.idl',
- 'vertex_source.idl',
- 'viewport.idl',
- ],
- },
+ 'target_name': 'o3dPluginIdl',
+ 'type': 'static_library',
'rules': [
{
'rule_name': 'generate_idl',
@@ -106,163 +104,32 @@
'message': 'Generating IDL glue for <(RULE_INPUT_PATH)',
},
],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(idl_out_dir)',
- ],
- },
- 'sources': [
- '<@(idl_files)',
- ],
- },
- {
- 'target_name': 'o3dPluginIdl',
- 'type': 'static_library',
- 'variables': {
- 'static_glue_dir': '../../../<(nixysadir)/static_glue/npapi',
- },
'include_dirs': [
'../..',
'../../..',
'../../../<(npapidir)/include',
'../../plugin/cross',
'<(static_glue_dir)',
+ '<(idl_out_dir)',
],
'dependencies': [
'../../../<(zlibdir)/zlib.gyp:zlib',
'../../../base/base.gyp:base',
'../../../skia/skia.gyp:skia',
- 'idl_generator',
],
'sources': [
'../cross/archive_request_static_glue.cc',
'../cross/archive_request_static_glue.h',
'../cross/o3d_glue.cc',
'../cross/o3d_glue.h',
+ '<(idl_out_dir)/globals_glue.cc',
+ '<(idl_out_dir)/globals_glue.h',
'<(static_glue_dir)/common.cc',
'<(static_glue_dir)/npn_api.cc',
'<(static_glue_dir)/static_object.cc',
- '<(idl_out_dir)/globals_glue.cc',
- '<(idl_out_dir)/globals_glue.h',
-
- # Sadly, the files below here are just an expansion of the
- # list of IDL files in 'idl_files', above, so if you change on
- # above, you also need to change this list.
- '<(idl_out_dir)/archive_request_glue.cc',
- '<(idl_out_dir)/archive_request_glue.h',
- '<(idl_out_dir)/bounding_box_glue.cc',
- '<(idl_out_dir)/bounding_box_glue.h',
- '<(idl_out_dir)/buffer_glue.cc',
- '<(idl_out_dir)/buffer_glue.h',
- '<(idl_out_dir)/canvas_glue.cc',
- '<(idl_out_dir)/canvas_glue.h',
- '<(idl_out_dir)/canvas_paint_glue.cc',
- '<(idl_out_dir)/canvas_paint_glue.h',
- '<(idl_out_dir)/canvas_shader_glue.cc',
- '<(idl_out_dir)/canvas_shader_glue.h',
- '<(idl_out_dir)/clear_buffer_glue.cc',
- '<(idl_out_dir)/clear_buffer_glue.h',
- '<(idl_out_dir)/client_glue.cc',
- '<(idl_out_dir)/client_glue.h',
- '<(idl_out_dir)/counter_glue.cc',
- '<(idl_out_dir)/counter_glue.h',
- '<(idl_out_dir)/cursor_glue.cc',
- '<(idl_out_dir)/cursor_glue.h',
- '<(idl_out_dir)/curve_glue.cc',
- '<(idl_out_dir)/curve_glue.h',
- '<(idl_out_dir)/display_mode_glue.cc',
- '<(idl_out_dir)/display_mode_glue.h',
- '<(idl_out_dir)/draw_context_glue.cc',
- '<(idl_out_dir)/draw_context_glue.h',
- '<(idl_out_dir)/draw_element_glue.cc',
- '<(idl_out_dir)/draw_element_glue.h',
- '<(idl_out_dir)/draw_list_glue.cc',
- '<(idl_out_dir)/draw_list_glue.h',
- '<(idl_out_dir)/draw_pass_glue.cc',
- '<(idl_out_dir)/draw_pass_glue.h',
- '<(idl_out_dir)/effect_glue.cc',
- '<(idl_out_dir)/effect_glue.h',
- '<(idl_out_dir)/element_glue.cc',
- '<(idl_out_dir)/element_glue.h',
- '<(idl_out_dir)/event_glue.cc',
- '<(idl_out_dir)/event_glue.h',
- '<(idl_out_dir)/field_glue.cc',
- '<(idl_out_dir)/field_glue.h',
- '<(idl_out_dir)/file_request_glue.cc',
- '<(idl_out_dir)/file_request_glue.h',
- '<(idl_out_dir)/function_glue.cc',
- '<(idl_out_dir)/function_glue.h',
- '<(idl_out_dir)/material_glue.cc',
- '<(idl_out_dir)/material_glue.h',
- '<(idl_out_dir)/matrix4_axis_rotation_glue.cc',
- '<(idl_out_dir)/matrix4_axis_rotation_glue.h',
- '<(idl_out_dir)/matrix4_composition_glue.cc',
- '<(idl_out_dir)/matrix4_composition_glue.h',
- '<(idl_out_dir)/matrix4_scale_glue.cc',
- '<(idl_out_dir)/matrix4_scale_glue.h',
- '<(idl_out_dir)/matrix4_translation_glue.cc',
- '<(idl_out_dir)/matrix4_translation_glue.h',
- '<(idl_out_dir)/named_glue.cc',
- '<(idl_out_dir)/named_glue.h',
- '<(idl_out_dir)/pack_glue.cc',
- '<(idl_out_dir)/pack_glue.h',
- '<(idl_out_dir)/param_array_glue.cc',
- '<(idl_out_dir)/param_array_glue.h',
- '<(idl_out_dir)/param_glue.cc',
- '<(idl_out_dir)/param_glue.h',
- '<(idl_out_dir)/param_object_glue.cc',
- '<(idl_out_dir)/param_object_glue.h',
- '<(idl_out_dir)/param_operation_glue.cc',
- '<(idl_out_dir)/param_operation_glue.h',
- '<(idl_out_dir)/plugin_glue.cc',
- '<(idl_out_dir)/plugin_glue.h',
- '<(idl_out_dir)/primitive_glue.cc',
- '<(idl_out_dir)/primitive_glue.h',
- '<(idl_out_dir)/raw_data_glue.cc',
- '<(idl_out_dir)/raw_data_glue.h',
- '<(idl_out_dir)/ray_intersection_info_glue.cc',
- '<(idl_out_dir)/ray_intersection_info_glue.h',
- '<(idl_out_dir)/render_event_glue.cc',
- '<(idl_out_dir)/render_event_glue.h',
- '<(idl_out_dir)/render_node_glue.cc',
- '<(idl_out_dir)/render_node_glue.h',
- '<(idl_out_dir)/render_surface_glue.cc',
- '<(idl_out_dir)/render_surface_glue.h',
- '<(idl_out_dir)/render_surface_set_glue.cc',
- '<(idl_out_dir)/render_surface_set_glue.h',
- '<(idl_out_dir)/sampler_glue.cc',
- '<(idl_out_dir)/sampler_glue.h',
- '<(idl_out_dir)/shape_glue.cc',
- '<(idl_out_dir)/shape_glue.h',
- '<(idl_out_dir)/skin_glue.cc',
- '<(idl_out_dir)/skin_glue.h',
- '<(idl_out_dir)/standard_param_glue.cc',
- '<(idl_out_dir)/standard_param_glue.h',
- '<(idl_out_dir)/state_glue.cc',
- '<(idl_out_dir)/state_glue.h',
- '<(idl_out_dir)/state_set_glue.cc',
- '<(idl_out_dir)/state_set_glue.h',
- '<(idl_out_dir)/stream_bank_glue.cc',
- '<(idl_out_dir)/stream_bank_glue.h',
- '<(idl_out_dir)/stream_glue.cc',
- '<(idl_out_dir)/stream_glue.h',
- '<(idl_out_dir)/texture_glue.cc',
- '<(idl_out_dir)/texture_glue.h',
- '<(idl_out_dir)/tick_event_glue.cc',
- '<(idl_out_dir)/tick_event_glue.h',
- '<(idl_out_dir)/transform_glue.cc',
- '<(idl_out_dir)/transform_glue.h',
- '<(idl_out_dir)/tree_traversal_glue.cc',
- '<(idl_out_dir)/tree_traversal_glue.h',
- '<(idl_out_dir)/types_glue.cc',
- '<(idl_out_dir)/types_glue.h',
- '<(idl_out_dir)/vector_glue.cc',
- '<(idl_out_dir)/vector_glue.h',
- '<(idl_out_dir)/vertex_source_glue.cc',
- '<(idl_out_dir)/vertex_source_glue.h',
- '<(idl_out_dir)/viewport_glue.cc',
- '<(idl_out_dir)/viewport_glue.h',
+ '<@(idl_files)',
],
+ 'hard_dependency': 1,
'direct_dependent_settings': {
'include_dirs': [
'../../../<(npapidir)/include',