2011-10-31 14:18:20 +00:00
|
|
|
# include this gypi to include all the golden master slides.
|
|
|
|
{
|
2014-02-03 14:48:17 +00:00
|
|
|
'include_dirs': [
|
|
|
|
'../gm',
|
|
|
|
# include dirs needed by particular GMs
|
|
|
|
'../src/utils/debugger',
|
|
|
|
'../src/images',
|
|
|
|
'../src/lazy',
|
|
|
|
],
|
2014-03-23 23:08:18 +00:00
|
|
|
'conditions': [
|
2014-08-06 17:08:42 +00:00
|
|
|
# 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',
|
2014-08-07 19:58:38 +00:00
|
|
|
'../gm/astcbitmap.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/beziereffects.cpp',
|
Draw more accurate thick-stroked Beziers (disabled)
Draw thick-stroked Beziers by computing the outset quadratic, measuring the error, and subdividing until the error is within a predetermined limit.
To try this CL out, change src/core/SkStroke.h:18 to
#define QUAD_STROKE_APPROXIMATION 1
or from the command line: CPPFLAGS="-D QUAD_STROKE_APPROXIMATION=1" ./gyp_skia
Here's what's in this CL:
bench/BezierBench.cpp : a microbench for examining where the time is going
gm/beziers.cpp : random Beziers with various thicknesses
gm/smallarc.cpp : a distillation of bug skia:2769
samplecode/SampleRotateCircles.cpp : controls added for error, limit, width
src/core/SkStroke.cpp : the new stroke implementation (disabled)
tests/StrokerTest.cpp : a stroke torture test that checks normal and extreme values
The new stroke algorithm has a tweakable parameter:
stroker.setError(1); (SkStrokeRec.cpp:112)
The stroke error is the allowable gap between the midpoint of the stroke quadratic and the center Bezier. As the projection from the quadratic approaches the endpoints, the error is decreased proportionally so that it is always inside the quadratic curve.
An overview of how this works:
- For a given T range of a Bezier, compute the perpendiculars and find the points outset and inset for some radius.
- Construct tangents for the quadratic stroke.
- If the tangent don't intersect between them (may happen with cubics), subdivide.
- If the quadratic stroke end points are close (again, may happen with cubics), draw a line between them.
- Compute the quadratic formed by the intersecting tangents.
- If the midpoint of the quadratic is close to the midpoint of the Bezier perpendicular, return the quadratic.
- If the end of the stroke at the Bezier midpoint doesn't intersect the quad's bounds, subdivide.
- Find where the Bezier midpoint ray intersects the quadratic.
- If the intersection is too close to the quad's endpoints, subdivide.
- If the error is large proportional to the intersection's distance to the quad's endpoints, subdivide.
BUG=skia:723,skia:2769
Review URL: https://codereview.chromium.org/558163005
2014-10-09 12:36:03 +00:00
|
|
|
'../gm/beziers.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/bigblurs.cpp',
|
|
|
|
'../gm/bigmatrix.cpp',
|
|
|
|
'../gm/bigtext.cpp',
|
|
|
|
'../gm/bitmapcopy.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',
|
2014-09-09 18:33:57 +00:00
|
|
|
'../gm/clip_strokerect.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/clippedbitmapshaders.cpp',
|
2014-11-25 03:11:48 +00:00
|
|
|
'../gm/cgms.cpp',
|
|
|
|
'../gm/cgm.c',
|
2014-10-09 12:27:23 +00:00
|
|
|
'../gm/colorcube.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/coloremoji.cpp',
|
|
|
|
'../gm/colorfilterimagefilter.cpp',
|
|
|
|
'../gm/colorfilters.cpp',
|
|
|
|
'../gm/colormatrix.cpp',
|
|
|
|
'../gm/colortype.cpp',
|
2014-10-31 13:55:45 +00:00
|
|
|
'../gm/colortypexfermode.cpp',
|
2014-10-26 12:23:53 +00:00
|
|
|
'../gm/colorwheel.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/complexclip.cpp',
|
|
|
|
'../gm/complexclip2.cpp',
|
2014-12-17 19:22:37 +00:00
|
|
|
'../gm/complexclip3.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/composeshader.cpp',
|
2015-01-05 04:52:15 +00:00
|
|
|
#'../gm/conicpaths.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/convexpaths.cpp',
|
|
|
|
'../gm/convexpolyclip.cpp',
|
|
|
|
'../gm/convexpolyeffect.cpp',
|
|
|
|
'../gm/copyTo4444.cpp',
|
|
|
|
'../gm/cubicpaths.cpp',
|
|
|
|
'../gm/cmykjpeg.cpp',
|
|
|
|
'../gm/degeneratesegments.cpp',
|
2014-12-29 15:05:27 +00:00
|
|
|
'../gm/dcshader.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/discard.cpp',
|
|
|
|
'../gm/dashcubics.cpp',
|
|
|
|
'../gm/dashing.cpp',
|
|
|
|
'../gm/distantclip.cpp',
|
2014-09-16 12:45:19 +00:00
|
|
|
'../gm/dftext.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/displacement.cpp',
|
|
|
|
'../gm/downsamplebitmap.cpp',
|
|
|
|
'../gm/drawbitmaprect.cpp',
|
|
|
|
'../gm/drawlooper.cpp',
|
|
|
|
'../gm/dropshadowimagefilter.cpp',
|
|
|
|
'../gm/drrect.cpp',
|
|
|
|
'../gm/etc1bitmap.cpp',
|
|
|
|
'../gm/extractbitmap.cpp',
|
2014-09-10 17:20:24 +00:00
|
|
|
'../gm/emboss.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/emptypath.cpp',
|
|
|
|
'../gm/fatpathfill.cpp',
|
|
|
|
'../gm/factory.cpp',
|
|
|
|
'../gm/filltypes.cpp',
|
|
|
|
'../gm/filltypespersp.cpp',
|
|
|
|
'../gm/filterbitmap.cpp',
|
2014-12-08 17:18:58 +00:00
|
|
|
'../gm/filterfastbounds.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../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',
|
2014-12-02 14:37:21 +00:00
|
|
|
'../gm/grayscalejpg.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/hairlines.cpp',
|
|
|
|
'../gm/hairmodes.cpp',
|
|
|
|
'../gm/hittestpath.cpp',
|
|
|
|
'../gm/imagealphathreshold.cpp',
|
|
|
|
'../gm/imageblur.cpp',
|
2014-08-11 20:55:34 +00:00
|
|
|
'../gm/imageblur2.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../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',
|
2014-08-21 20:12:42 +00:00
|
|
|
'../gm/multipicturedraw.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/nested.cpp',
|
|
|
|
'../gm/ninepatchstretch.cpp',
|
|
|
|
'../gm/nonclosedpaths.cpp',
|
|
|
|
'../gm/offsetimagefilter.cpp',
|
|
|
|
'../gm/ovals.cpp',
|
|
|
|
'../gm/patch.cpp',
|
2014-08-13 00:14:57 +00:00
|
|
|
'../gm/patchgrid.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/patheffects.cpp',
|
|
|
|
'../gm/pathfill.cpp',
|
|
|
|
'../gm/pathinterior.cpp',
|
|
|
|
'../gm/pathopsinverse.cpp',
|
|
|
|
'../gm/pathopsskpclip.cpp',
|
|
|
|
'../gm/pathreverse.cpp',
|
|
|
|
'../gm/peekpixels.cpp',
|
|
|
|
'../gm/perlinnoise.cpp',
|
2014-08-09 18:08:05 +00:00
|
|
|
'../gm/picture.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/pictureimagefilter.cpp',
|
|
|
|
'../gm/pictureshader.cpp',
|
2014-08-06 20:07:15 +00:00
|
|
|
'../gm/pictureshadertile.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../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',
|
2014-08-12 13:53:09 +00:00
|
|
|
'../gm/samplerstress.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
# '../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',
|
Draw more accurate thick-stroked Beziers (disabled)
Draw thick-stroked Beziers by computing the outset quadratic, measuring the error, and subdividing until the error is within a predetermined limit.
To try this CL out, change src/core/SkStroke.h:18 to
#define QUAD_STROKE_APPROXIMATION 1
or from the command line: CPPFLAGS="-D QUAD_STROKE_APPROXIMATION=1" ./gyp_skia
Here's what's in this CL:
bench/BezierBench.cpp : a microbench for examining where the time is going
gm/beziers.cpp : random Beziers with various thicknesses
gm/smallarc.cpp : a distillation of bug skia:2769
samplecode/SampleRotateCircles.cpp : controls added for error, limit, width
src/core/SkStroke.cpp : the new stroke implementation (disabled)
tests/StrokerTest.cpp : a stroke torture test that checks normal and extreme values
The new stroke algorithm has a tweakable parameter:
stroker.setError(1); (SkStrokeRec.cpp:112)
The stroke error is the allowable gap between the midpoint of the stroke quadratic and the center Bezier. As the projection from the quadratic approaches the endpoints, the error is decreased proportionally so that it is always inside the quadratic curve.
An overview of how this works:
- For a given T range of a Bezier, compute the perpendiculars and find the points outset and inset for some radius.
- Construct tangents for the quadratic stroke.
- If the tangent don't intersect between them (may happen with cubics), subdivide.
- If the quadratic stroke end points are close (again, may happen with cubics), draw a line between them.
- Compute the quadratic formed by the intersecting tangents.
- If the midpoint of the quadratic is close to the midpoint of the Bezier perpendicular, return the quadratic.
- If the end of the stroke at the Bezier midpoint doesn't intersect the quad's bounds, subdivide.
- Find where the Bezier midpoint ray intersects the quadratic.
- If the intersection is too close to the quad's endpoints, subdivide.
- If the error is large proportional to the intersection's distance to the quad's endpoints, subdivide.
BUG=skia:723,skia:2769
Review URL: https://codereview.chromium.org/558163005
2014-10-09 12:36:03 +00:00
|
|
|
'../gm/smallarc.cpp',
|
2014-12-02 22:01:46 +00:00
|
|
|
'../gm/smallimage.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/stringart.cpp',
|
|
|
|
'../gm/spritebitmap.cpp',
|
|
|
|
'../gm/srcmode.cpp',
|
|
|
|
'../gm/strokefill.cpp',
|
|
|
|
'../gm/strokerect.cpp',
|
|
|
|
'../gm/strokerects.cpp',
|
|
|
|
'../gm/strokes.cpp',
|
|
|
|
'../gm/stroketext.cpp',
|
2014-09-22 14:29:03 +00:00
|
|
|
'../gm/surface.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/tablecolorfilter.cpp',
|
|
|
|
'../gm/texteffects.cpp',
|
|
|
|
'../gm/testimagefilters.cpp',
|
|
|
|
'../gm/texdata.cpp',
|
|
|
|
'../gm/variedtext.cpp',
|
2014-12-09 17:00:49 +00:00
|
|
|
'../gm/tallstretchedbitmaps.cpp',
|
2014-08-21 15:53:26 +00:00
|
|
|
'../gm/textblob.cpp',
|
2014-09-19 18:40:51 +00:00
|
|
|
'../gm/textblobshader.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../gm/texturedomaineffect.cpp',
|
|
|
|
'../gm/thinrects.cpp',
|
|
|
|
'../gm/thinstrokedrects.cpp',
|
2014-10-27 17:32:06 +00:00
|
|
|
'../gm/tiledscaledbitmap.cpp',
|
2014-08-06 17:08:42 +00:00
|
|
|
'../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',
|
|
|
|
],
|
|
|
|
}],
|
2014-03-24 20:07:44 +00:00
|
|
|
# TODO: Several GMs are known to cause particular problems on Android, so
|
|
|
|
# we disable them on Android. See http://skbug.com/2326
|
2014-03-23 23:08:18 +00:00
|
|
|
[ 'skia_os == "android"', {
|
|
|
|
'sources!': [
|
2014-03-24 20:07:44 +00:00
|
|
|
# TODO(borenet): Causes assertion failure on Nexus S.
|
|
|
|
# See http://skbug.com/705
|
|
|
|
'../gm/bitmapcopy.cpp',
|
|
|
|
|
|
|
|
# SOME of the bitmaprect tests are disabled on Android; see
|
|
|
|
# ../gm/bitmaprect.cpp
|
|
|
|
|
|
|
|
# We skip GPU tests in this GM; see
|
|
|
|
# ../gm/deviceproperties.cpp
|
|
|
|
|
|
|
|
# TODO(bsalomon): Hangs on Xoom and Nexus S. See http://skbug.com/637
|
|
|
|
'../gm/drawbitmaprect.cpp',
|
|
|
|
|
|
|
|
# TODO(epoger): Crashes on Nexus 10. See http://skbug.com/2313
|
2014-03-23 23:08:18 +00:00
|
|
|
'../gm/imagefilterscropexpand.cpp',
|
2014-03-24 20:07:44 +00:00
|
|
|
|
|
|
|
# TODO(borenet): Causes Nexus S to reboot. See http://skbug.com/665
|
|
|
|
'../gm/shadertext.cpp',
|
|
|
|
'../gm/shadertext2.cpp',
|
|
|
|
'../gm/shadertext3.cpp',
|
|
|
|
|
|
|
|
# TODO(reed): Allocates more memory than Android devices are capable of
|
|
|
|
# fulfilling. See http://skbug.com/1978
|
|
|
|
'../gm/verylargebitmap.cpp',
|
|
|
|
],
|
2014-03-23 23:08:18 +00:00
|
|
|
}],
|
|
|
|
],
|
2011-10-31 14:18:20 +00:00
|
|
|
}
|