aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp
diff options
context:
space:
mode:
authorGravatar djsollen <djsollen@google.com>2014-11-13 12:52:35 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-13 12:52:35 -0800
commit0b17d6cb343cb71a3f548a02f0952c3592fc8c87 (patch)
tree0a5577be50cfbd238db7008c7d73f7cc7b9e58a6 /gyp
parent04f7e14b385118b8caa3ad7fcb30d64f4c32e677 (diff)
Cleanup public includes directory.
This CL updates various files in the includes directory to ensure that (1) they do not depend on headers in /src and (2) that they minimize their dependence on external headers. To ensure that we don't regress this behavior a new build target has been added to build a single cpp file that contains all* public includes and is compiled with only those directories in the include path. * The exception is those includes that depend on OS specific headers BUG=skia:2941 NOTRY=true Review URL: https://codereview.chromium.org/721903002
Diffstat (limited to 'gyp')
-rw-r--r--gyp/gpu.gypi4
-rw-r--r--gyp/tools.gyp70
2 files changed, 72 insertions, 2 deletions
diff --git a/gyp/gpu.gypi b/gyp/gpu.gypi
index ac56f4447b..8eca40c3d3 100644
--- a/gyp/gpu.gypi
+++ b/gyp/gpu.gypi
@@ -15,9 +15,7 @@
'<(skia_include_path)/gpu/GrConfig.h',
'<(skia_include_path)/gpu/GrContext.h',
'<(skia_include_path)/gpu/GrCoordTransform.h',
- '<(skia_include_path)/gpu/GrFontScaler.h',
'<(skia_include_path)/gpu/GrFragmentProcessor.h',
- '<(skia_include_path)/gpu/GrGlyph.h',
'<(skia_include_path)/gpu/GrGpuResource.h',
'<(skia_include_path)/gpu/GrInvariantOutput.h',
'<(skia_include_path)/gpu/GrPaint.h',
@@ -84,7 +82,9 @@
'<(skia_src_path)/gpu/GrDrawTarget.h',
'<(skia_src_path)/gpu/GrDrawTargetCaps.h',
'<(skia_src_path)/gpu/GrFontScaler.cpp',
+ '<(skia_src_path)/gpu/GrFontScaler.h',
'<(skia_src_path)/gpu/GrGeometryBuffer.h',
+ '<(skia_src_path)/gpu/GrGlyph.h',
'<(skia_src_path)/gpu/GrGpu.cpp',
'<(skia_src_path)/gpu/GrGpu.h',
'<(skia_src_path)/gpu/GrGpuResourceCacheAccess.h',
diff --git a/gyp/tools.gyp b/gyp/tools.gyp
index c1419dd195..93ad0df389 100644
--- a/gyp/tools.gyp
+++ b/gyp/tools.gyp
@@ -30,6 +30,7 @@
'skpmaker',
'skimage',
'test_image_decoder',
+ 'test_public_includes',
],
'conditions': [
['skia_shared_lib',
@@ -624,6 +625,75 @@
'include_dirs': [ '../tools', ],
},
},
+ {
+ 'target_name': 'test_public_includes',
+ 'type': 'static_library',
+ #'cflags!': [ '-Wno-unused-parameter' ],
+ 'variables': {
+ 'includes_to_test': [
+ '<(skia_include_path)/animator',
+ '<(skia_include_path)/c',
+ '<(skia_include_path)/config',
+ '<(skia_include_path)/core',
+ '<(skia_include_path)/effects',
+ '<(skia_include_path)/gpu',
+ '<(skia_include_path)/images',
+ '<(skia_include_path)/pathops',
+ '<(skia_include_path)/pdf',
+ '<(skia_include_path)/pipe',
+ '<(skia_include_path)/ports',
+ '<(skia_include_path)/svg',
+ '<(skia_include_path)/utils',
+ '<(skia_include_path)/views',
+ '<(skia_include_path)/xml',
+ ],
+ 'paths_to_ignore': [
+ '<(skia_include_path)/gpu/gl/GrGLConfig_chrome.h',
+ '<(skia_include_path)/ports/SkTypeface_mac.h',
+ '<(skia_include_path)/ports/SkTypeface_win.h',
+ '<(skia_include_path)/utils/ios',
+ '<(skia_include_path)/utils/mac',
+ '<(skia_include_path)/utils/win',
+ '<(skia_include_path)/utils/SkDebugUtils.h',
+ '<(skia_include_path)/utils/SkJSONCPP.h',
+ '<(skia_include_path)/utils/SkWGL.h',
+ '<(skia_include_path)/views/animated',
+ '<(skia_include_path)/views/SkOSWindow_Android.h',
+ '<(skia_include_path)/views/SkOSWindow_iOS.h',
+ '<(skia_include_path)/views/SkOSWindow_Mac.h',
+ '<(skia_include_path)/views/SkOSWindow_NaCl.h',
+ '<(skia_include_path)/views/SkOSWindow_SDL.h',
+ '<(skia_include_path)/views/SkOSWindow_Unix.h',
+ '<(skia_include_path)/views/SkOSWindow_Win.h',
+ '<(skia_include_path)/views/SkWindow.h',
+ '<(skia_include_path)/xml/SkJS.h',
+ ],
+ },
+ 'include_dirs': [
+ '<@(includes_to_test)',
+ ],
+ 'sources': [
+ # unused_param_test.cpp is generated by the action below.
+ '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'generate_includes_cpp',
+ 'inputs': [
+ '../tools/generate_includes_cpp.py',
+ '<@(includes_to_test)',
+ # This causes the gyp generator on mac to fail
+ #'<@(paths_to_ignore)',
+ ],
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/test_public_includes.cpp',
+ ],
+ 'action': ['python', '../tools/generate_includes_cpp.py',
+ '--ignore', '<(paths_to_ignore)',
+ '<@(_outputs)', '<@(includes_to_test)'],
+ },
+ ],
+ },
],
'conditions': [
['skia_shared_lib',