On the bots, there's no need to link GMs into SampleApp.
We build SampleApp on the bots to make sure it's not broken, but we don't run it. So, there's no need to link in all the GMs as samples.
This reduces the number of copies of our GMs from 4 to 3 (gm, dm, and nanobench remain).
NOTREECHECKS=true
BUG=skia:2142
R=bsalomon@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/447803002
diff --git a/gyp/SampleApp.gyp b/gyp/SampleApp.gyp
index 9a6ca43..d5a3479 100644
--- a/gyp/SampleApp.gyp
+++ b/gyp/SampleApp.gyp
@@ -24,6 +24,7 @@
'gmslides.gypi',
],
'sources': [
+ '../gm/gm.cpp',
'../samplecode/GMSampleView.h',
'../samplecode/ClockFaceView.cpp',
'../samplecode/OverView.cpp',
diff --git a/gyp/bench.gyp b/gyp/bench.gyp
index 9147f40..398700f 100644
--- a/gyp/bench.gyp
+++ b/gyp/bench.gyp
@@ -9,6 +9,7 @@
'target_name': 'nanobench',
'type': 'executable',
'sources': [
+ '../gm/gm.cpp',
'../bench/GMBench.cpp',
'../bench/SKPBench.cpp',
'../bench/ResultsWriter.cpp',
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index 448860f..a54a6fd 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -676,7 +676,7 @@
],
}],
- [ 'skia_crash_handler', {
+ [ 'skia_is_bot', {
'defines': [ 'SK_CRASH_HANDLER' ],
}],
diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi
index bf2587f..6d791c9 100644
--- a/gyp/common_variables.gypi
+++ b/gyp/common_variables.gypi
@@ -232,8 +232,7 @@
'skia_run_pdfviewer_in_gm%': 0,
'skia_disable_inlining%': 0,
'skia_moz2d%': 0,
- 'skia_crash_handler%':
- '<!(python -c "import os; print os.environ.get(\'CHROME_HEADLESS\', 0)")',
+ 'skia_is_bot%': '<!(python -c "import os; print os.environ.get(\'CHROME_HEADLESS\', 0)")',
# These are referenced by our .gypi files that list files (e.g. core.gypi)
#
diff --git a/gyp/gm.gyp b/gyp/gm.gyp
index 3676b30..a11fde5 100644
--- a/gyp/gm.gyp
+++ b/gyp/gm.gyp
@@ -18,6 +18,7 @@
'gmslides.gypi',
],
'sources': [
+ '../gm/gm.cpp',
'../gm/gmmain.cpp',
'../gm/system_preferences_default.cpp',
diff --git a/gyp/gmslides.gypi b/gyp/gmslides.gypi
index 5a3c39b..cb01ff0 100644
--- a/gyp/gmslides.gypi
+++ b/gyp/gmslides.gypi
@@ -7,195 +7,195 @@
'../src/images',
'../src/lazy',
],
- 'sources': [
- # base class for GMs
- '../gm/gm.cpp',
- '../gm/gm.h',
-
- '../gm/aaclip.cpp',
- '../gm/aarectmodes.cpp',
- '../gm/alphagradients.cpp',
- '../gm/arcofzorro.cpp',
- '../gm/arithmode.cpp',
- '../gm/beziereffects.cpp',
- '../gm/bigblurs.cpp',
- '../gm/bigmatrix.cpp',
- '../gm/bigtext.cpp',
- '../gm/bitmapcopy.cpp',
- '../gm/bitmapmatrix.cpp',
- '../gm/bitmapfilters.cpp',
- '../gm/bitmappremul.cpp',
- '../gm/bitmaprect.cpp',
- '../gm/bitmaprecttest.cpp',
- '../gm/bitmapscroll.cpp',
- '../gm/bitmapshader.cpp',
- '../gm/bitmapsource.cpp',
- '../gm/bleed.cpp',
- '../gm/blurcircles.cpp',
- '../gm/blurs.cpp',
- '../gm/blurquickreject.cpp',
- '../gm/blurrect.cpp',
- '../gm/blurroundrect.cpp',
- '../gm/circles.cpp',
- '../gm/circularclips.cpp',
- '../gm/clippedbitmapshaders.cpp',
- '../gm/coloremoji.cpp',
- '../gm/colorfilterimagefilter.cpp',
- '../gm/colorfilters.cpp',
- '../gm/colormatrix.cpp',
- '../gm/colortype.cpp',
- '../gm/complexclip.cpp',
- '../gm/complexclip2.cpp',
- '../gm/composeshader.cpp',
- #'../gm/conicpaths.cpp',
- '../gm/convexpaths.cpp',
- '../gm/convexpolyclip.cpp',
- '../gm/convexpolyeffect.cpp',
- '../gm/copyTo4444.cpp',
- '../gm/cubicpaths.cpp',
- '../gm/cmykjpeg.cpp',
- '../gm/degeneratesegments.cpp',
- '../gm/discard.cpp',
- '../gm/dashcubics.cpp',
- '../gm/dashing.cpp',
- '../gm/deviceproperties.cpp',
- '../gm/distantclip.cpp',
- '../gm/displacement.cpp',
- '../gm/downsamplebitmap.cpp',
- '../gm/drawbitmaprect.cpp',
- '../gm/drawlooper.cpp',
- '../gm/dropshadowimagefilter.cpp',
- '../gm/drrect.cpp',
- '../gm/etc1bitmap.cpp',
- '../gm/extractbitmap.cpp',
- '../gm/emptypath.cpp',
- '../gm/fatpathfill.cpp',
- '../gm/factory.cpp',
- '../gm/filltypes.cpp',
- '../gm/filltypespersp.cpp',
- '../gm/filterbitmap.cpp',
- '../gm/filterindiabox.cpp',
- '../gm/fontcache.cpp',
- '../gm/fontmgr.cpp',
- '../gm/fontscaler.cpp',
- '../gm/gammatext.cpp',
- '../gm/getpostextpath.cpp',
- '../gm/giantbitmap.cpp',
- '../gm/glyph_pos.cpp',
- '../gm/glyph_pos_align.cpp',
- '../gm/gradients.cpp',
- '../gm/gradients_2pt_conical.cpp',
- '../gm/gradients_no_texture.cpp',
- '../gm/gradientDirtyLaundry.cpp',
- '../gm/gradient_matrix.cpp',
- '../gm/gradtext.cpp',
- '../gm/hairlines.cpp',
- '../gm/hairmodes.cpp',
- '../gm/hittestpath.cpp',
- '../gm/imagealphathreshold.cpp',
- '../gm/imageblur.cpp',
- '../gm/imageblurtiled.cpp',
- '../gm/imagemagnifier.cpp',
- '../gm/imageresizetiled.cpp',
- '../gm/inversepaths.cpp',
- '../gm/lerpmode.cpp',
- '../gm/lighting.cpp',
- '../gm/lumafilter.cpp',
- '../gm/image.cpp',
- '../gm/imagefiltersbase.cpp',
- '../gm/imagefiltersclipped.cpp',
- '../gm/imagefilterscropped.cpp',
- '../gm/imagefilterscropexpand.cpp',
- '../gm/imagefiltersgraph.cpp',
- '../gm/imagefiltersscaled.cpp',
- '../gm/internal_links.cpp',
- '../gm/lcdtext.cpp',
- '../gm/linepaths.cpp',
- '../gm/matrixconvolution.cpp',
- '../gm/matriximagefilter.cpp',
- '../gm/megalooper.cpp',
- '../gm/mixedxfermodes.cpp',
- '../gm/modecolorfilters.cpp',
- '../gm/morphology.cpp',
- '../gm/nested.cpp',
- '../gm/ninepatchstretch.cpp',
- '../gm/nonclosedpaths.cpp',
- '../gm/offsetimagefilter.cpp',
- '../gm/optimizations.cpp',
- '../gm/ovals.cpp',
- '../gm/patch.cpp',
- '../gm/patheffects.cpp',
- '../gm/pathfill.cpp',
- '../gm/pathinterior.cpp',
- '../gm/pathopsinverse.cpp',
- '../gm/pathopsskpclip.cpp',
- '../gm/pathreverse.cpp',
- '../gm/peekpixels.cpp',
- '../gm/perlinnoise.cpp',
- '../gm/pictureimagefilter.cpp',
- '../gm/pictureshader.cpp',
- '../gm/points.cpp',
- '../gm/poly2poly.cpp',
- '../gm/polygons.cpp',
- '../gm/quadpaths.cpp',
- '../gm/rects.cpp',
- '../gm/resizeimagefilter.cpp',
- '../gm/rrect.cpp',
- '../gm/rrects.cpp',
- '../gm/roundrects.cpp',
- '../gm/samplerstress.cpp',
- # '../gm/scalebitmap.cpp',
- '../gm/shaderbounds.cpp',
- '../gm/selftest.cpp',
- '../gm/shadertext.cpp',
- '../gm/shadertext2.cpp',
- '../gm/shadertext3.cpp',
- '../gm/shadows.cpp',
- '../gm/shallowgradient.cpp',
- '../gm/simpleaaclip.cpp',
- '../gm/skbug1719.cpp',
- '../gm/stringart.cpp',
- '../gm/spritebitmap.cpp',
- '../gm/srcmode.cpp',
- '../gm/strokefill.cpp',
- '../gm/strokerect.cpp',
- '../gm/strokerects.cpp',
- '../gm/strokes.cpp',
- '../gm/stroketext.cpp',
- '../gm/tablecolorfilter.cpp',
- '../gm/texteffects.cpp',
- '../gm/testimagefilters.cpp',
- '../gm/texdata.cpp',
- '../gm/variedtext.cpp',
- '../gm/texturedomaineffect.cpp',
- '../gm/thinrects.cpp',
- '../gm/thinstrokedrects.cpp',
- '../gm/tileimagefilter.cpp',
- '../gm/tilemodes.cpp',
- '../gm/tilemodes_scaled.cpp',
- '../gm/tinybitmap.cpp',
- '../gm/twopointradial.cpp',
- '../gm/typeface.cpp',
- '../gm/vertices.cpp',
- '../gm/verttext.cpp',
- '../gm/verttext2.cpp',
- '../gm/verylargebitmap.cpp',
- '../gm/xfermodeimagefilter.cpp',
- '../gm/xfermodes.cpp',
- '../gm/xfermodes2.cpp',
- '../gm/xfermodes3.cpp',
- '../gm/yuvtorgbeffect.cpp',
-
- # Files needed by particular GMs
- '../src/utils/debugger/SkDrawCommand.h',
- '../src/utils/debugger/SkDrawCommand.cpp',
- '../src/utils/debugger/SkDebugCanvas.h',
- '../src/utils/debugger/SkDebugCanvas.cpp',
- '../src/utils/debugger/SkObjectParser.h',
- '../src/utils/debugger/SkObjectParser.cpp',
-
- ],
'conditions': [
+ # If we're building SampleApp on the bots, no need to link in the GM slides.
+ # We're not going to run it; we're only making sure it still builds.
+ # It'd be nice to do this in SampleApp.gypi, but I can't find a way to make it work.
+ [ 'not ("<(_target_name)" == "SampleApp" and skia_is_bot)', {
+ 'sources': [
+ '../gm/aaclip.cpp',
+ '../gm/aarectmodes.cpp',
+ '../gm/alphagradients.cpp',
+ '../gm/arcofzorro.cpp',
+ '../gm/arithmode.cpp',
+ '../gm/beziereffects.cpp',
+ '../gm/bigblurs.cpp',
+ '../gm/bigmatrix.cpp',
+ '../gm/bigtext.cpp',
+ '../gm/bitmapcopy.cpp',
+ '../gm/bitmapmatrix.cpp',
+ '../gm/bitmapfilters.cpp',
+ '../gm/bitmappremul.cpp',
+ '../gm/bitmaprect.cpp',
+ '../gm/bitmaprecttest.cpp',
+ '../gm/bitmapscroll.cpp',
+ '../gm/bitmapshader.cpp',
+ '../gm/bitmapsource.cpp',
+ '../gm/bleed.cpp',
+ '../gm/blurcircles.cpp',
+ '../gm/blurs.cpp',
+ '../gm/blurquickreject.cpp',
+ '../gm/blurrect.cpp',
+ '../gm/blurroundrect.cpp',
+ '../gm/circles.cpp',
+ '../gm/circularclips.cpp',
+ '../gm/clippedbitmapshaders.cpp',
+ '../gm/coloremoji.cpp',
+ '../gm/colorfilterimagefilter.cpp',
+ '../gm/colorfilters.cpp',
+ '../gm/colormatrix.cpp',
+ '../gm/colortype.cpp',
+ '../gm/complexclip.cpp',
+ '../gm/complexclip2.cpp',
+ '../gm/composeshader.cpp',
+ #'../gm/conicpaths.cpp',
+ '../gm/convexpaths.cpp',
+ '../gm/convexpolyclip.cpp',
+ '../gm/convexpolyeffect.cpp',
+ '../gm/copyTo4444.cpp',
+ '../gm/cubicpaths.cpp',
+ '../gm/cmykjpeg.cpp',
+ '../gm/degeneratesegments.cpp',
+ '../gm/discard.cpp',
+ '../gm/dashcubics.cpp',
+ '../gm/dashing.cpp',
+ '../gm/deviceproperties.cpp',
+ '../gm/distantclip.cpp',
+ '../gm/displacement.cpp',
+ '../gm/downsamplebitmap.cpp',
+ '../gm/drawbitmaprect.cpp',
+ '../gm/drawlooper.cpp',
+ '../gm/dropshadowimagefilter.cpp',
+ '../gm/drrect.cpp',
+ '../gm/etc1bitmap.cpp',
+ '../gm/extractbitmap.cpp',
+ '../gm/emptypath.cpp',
+ '../gm/fatpathfill.cpp',
+ '../gm/factory.cpp',
+ '../gm/filltypes.cpp',
+ '../gm/filltypespersp.cpp',
+ '../gm/filterbitmap.cpp',
+ '../gm/filterindiabox.cpp',
+ '../gm/fontcache.cpp',
+ '../gm/fontmgr.cpp',
+ '../gm/fontscaler.cpp',
+ '../gm/gammatext.cpp',
+ '../gm/getpostextpath.cpp',
+ '../gm/giantbitmap.cpp',
+ '../gm/glyph_pos.cpp',
+ '../gm/glyph_pos_align.cpp',
+ '../gm/gradients.cpp',
+ '../gm/gradients_2pt_conical.cpp',
+ '../gm/gradients_no_texture.cpp',
+ '../gm/gradientDirtyLaundry.cpp',
+ '../gm/gradient_matrix.cpp',
+ '../gm/gradtext.cpp',
+ '../gm/hairlines.cpp',
+ '../gm/hairmodes.cpp',
+ '../gm/hittestpath.cpp',
+ '../gm/imagealphathreshold.cpp',
+ '../gm/imageblur.cpp',
+ '../gm/imageblurtiled.cpp',
+ '../gm/imagemagnifier.cpp',
+ '../gm/imageresizetiled.cpp',
+ '../gm/inversepaths.cpp',
+ '../gm/lerpmode.cpp',
+ '../gm/lighting.cpp',
+ '../gm/lumafilter.cpp',
+ '../gm/image.cpp',
+ '../gm/imagefiltersbase.cpp',
+ '../gm/imagefiltersclipped.cpp',
+ '../gm/imagefilterscropped.cpp',
+ '../gm/imagefilterscropexpand.cpp',
+ '../gm/imagefiltersgraph.cpp',
+ '../gm/imagefiltersscaled.cpp',
+ '../gm/internal_links.cpp',
+ '../gm/lcdtext.cpp',
+ '../gm/linepaths.cpp',
+ '../gm/matrixconvolution.cpp',
+ '../gm/matriximagefilter.cpp',
+ '../gm/megalooper.cpp',
+ '../gm/mixedxfermodes.cpp',
+ '../gm/modecolorfilters.cpp',
+ '../gm/morphology.cpp',
+ '../gm/nested.cpp',
+ '../gm/ninepatchstretch.cpp',
+ '../gm/nonclosedpaths.cpp',
+ '../gm/offsetimagefilter.cpp',
+ '../gm/optimizations.cpp',
+ '../gm/ovals.cpp',
+ '../gm/patch.cpp',
+ '../gm/patheffects.cpp',
+ '../gm/pathfill.cpp',
+ '../gm/pathinterior.cpp',
+ '../gm/pathopsinverse.cpp',
+ '../gm/pathopsskpclip.cpp',
+ '../gm/pathreverse.cpp',
+ '../gm/peekpixels.cpp',
+ '../gm/perlinnoise.cpp',
+ '../gm/pictureimagefilter.cpp',
+ '../gm/pictureshader.cpp',
+ '../gm/points.cpp',
+ '../gm/poly2poly.cpp',
+ '../gm/polygons.cpp',
+ '../gm/quadpaths.cpp',
+ '../gm/rects.cpp',
+ '../gm/resizeimagefilter.cpp',
+ '../gm/rrect.cpp',
+ '../gm/rrects.cpp',
+ '../gm/roundrects.cpp',
+ '../gm/samplerstress.cpp',
+ # '../gm/scalebitmap.cpp',
+ '../gm/shaderbounds.cpp',
+ '../gm/selftest.cpp',
+ '../gm/shadertext.cpp',
+ '../gm/shadertext2.cpp',
+ '../gm/shadertext3.cpp',
+ '../gm/shadows.cpp',
+ '../gm/shallowgradient.cpp',
+ '../gm/simpleaaclip.cpp',
+ '../gm/skbug1719.cpp',
+ '../gm/stringart.cpp',
+ '../gm/spritebitmap.cpp',
+ '../gm/srcmode.cpp',
+ '../gm/strokefill.cpp',
+ '../gm/strokerect.cpp',
+ '../gm/strokerects.cpp',
+ '../gm/strokes.cpp',
+ '../gm/stroketext.cpp',
+ '../gm/tablecolorfilter.cpp',
+ '../gm/texteffects.cpp',
+ '../gm/testimagefilters.cpp',
+ '../gm/texdata.cpp',
+ '../gm/variedtext.cpp',
+ '../gm/texturedomaineffect.cpp',
+ '../gm/thinrects.cpp',
+ '../gm/thinstrokedrects.cpp',
+ '../gm/tileimagefilter.cpp',
+ '../gm/tilemodes.cpp',
+ '../gm/tilemodes_scaled.cpp',
+ '../gm/tinybitmap.cpp',
+ '../gm/twopointradial.cpp',
+ '../gm/typeface.cpp',
+ '../gm/vertices.cpp',
+ '../gm/verttext.cpp',
+ '../gm/verttext2.cpp',
+ '../gm/verylargebitmap.cpp',
+ '../gm/xfermodeimagefilter.cpp',
+ '../gm/xfermodes.cpp',
+ '../gm/xfermodes2.cpp',
+ '../gm/xfermodes3.cpp',
+ '../gm/yuvtorgbeffect.cpp',
+
+ # Files needed by particular GMs
+ '../src/utils/debugger/SkDrawCommand.h',
+ '../src/utils/debugger/SkDrawCommand.cpp',
+ '../src/utils/debugger/SkDebugCanvas.h',
+ '../src/utils/debugger/SkDebugCanvas.cpp',
+ '../src/utils/debugger/SkObjectParser.h',
+ '../src/utils/debugger/SkObjectParser.cpp',
+ ],
+ }],
# TODO: Several GMs are known to cause particular problems on Android, so
# we disable them on Android. See http://skbug.com/2326
[ 'skia_os == "android"', {