skia2/gm
senorblanco ce6a354e12 Fix tiled perlin noise.
It turns out that the perlin implementation we inherited from WebKit
does not actually generate tileable noise (see Chromium bug
http://crbug.com/383495).

The main problem is that when generating coordinates for gradient
interpolation, it was attempting to wrap both x and (x + 1)
simultaneously at the tile boundary (that is, either both or neither
are wrapped). This obviously won't work, since along the tile seams,
(x + 1) should be wrapped, but x should not. The same is true in y.

This patch fixes both the CPU and GPU paths, renames some variables to
more closely match the spec, and modifies the perlin noise GM to
actually test tiling. (Note that the clipping the GM was doing was
removed, since it's superfluous: it used to be necessary for image
filters, but isn't anymore, and this isn't an image filter GM anyway.)

R=sugoi@google.com, sugoi
TBR=senorblanco

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/332523006
2014-06-12 11:24:20 -07:00
..
rebaseline_server rebaseline_server: delete no-longer-used weightedDiffMeasure 2014-06-11 20:35:59 -07:00
tests add some .gitignores related to gm and tools 2014-04-11 14:49:50 +00:00
__init__.py rebaseline.py: if --tests is not specified, get test list from actual-results.json 2013-06-05 15:43:37 +00:00
aaclip.cpp Disable cgimage GM 2014-04-23 18:05:36 +00:00
aarectmodes.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
alphagradients.cpp Remove unused (by clients) SkUnitMapper 2014-05-22 12:27:41 +00:00
androidfallback.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
arcofzorro.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
arithmode.cpp add legacy/helper allocN32Pixels, and convert gm to use it 2014-01-25 16:46:20 +00:00
beziereffects.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
bicubicfilter.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
bigblurs.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
bigmatrix.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
bigtext.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
bitmapcopy.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
bitmapfilters.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
bitmapmatrix.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
bitmappremul.cpp Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/) 2014-04-11 17:15:40 +00:00
bitmaprect.cpp using real tiles when simulating tiling 2014-05-30 15:06:24 +00:00
bitmaprecttest.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
bitmapscroll.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
bitmapshader.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
bitmapsource.cpp Factory methods for heap-allocated SkImageFilter objects. 2014-03-10 10:51:58 +00:00
bleed.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
blurcircles.cpp New GM for testing circle blur optimization 2014-05-07 17:50:03 +00:00
blurquickreject.cpp move common blur types into central header 2014-04-28 16:25:35 +00:00
blurrect.cpp Shut up windows build errors on new GM 2014-05-28 22:42:31 +00:00
blurroundrect.cpp Remove brackets from gm names. 2014-06-03 06:50:26 -07:00
blurs.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
canvasstate.cpp flag to make kClipToLayer_SaveFlag the default behavior 2014-03-10 19:47:58 +00:00
circles.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
circularclips.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
clippedbitmapshaders.cpp Move SkShader::fLocalMatrix into SkShader constructor. 2014-04-28 14:55:39 +00:00
cmykjpeg.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
coloremoji.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
colorfilterimagefilter.cpp Factory methods for heap-allocated SkImageFilter objects. 2014-03-10 10:51:58 +00:00
colorfilters.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
colormatrix.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
colortype.cpp Remove unused (by clients) SkUnitMapper 2014-05-22 12:27:41 +00:00
complexclip2.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
complexclip.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
composeshader.cpp Sanitizing source files in Housekeeper-Nightly 2014-05-06 03:06:53 +00:00
conicpaths.cpp Sanitizing source files in Housekeeper-Nightly 2013-06-21 07:00:53 +00:00
convexpaths.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
convexpolyclip.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
convexpolyeffect.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
copyTo4444.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
cubicpaths.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
dashcubics.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
dashing.cpp Use vertex attributes for dash effect in gpu 2014-06-12 10:24:21 -07:00
degeneratesegments.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
deviceproperties.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
discard.cpp Fix int->scalar warning on windows 2014-04-24 21:23:37 +00:00
displacement.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
display_json_results.py gm_json.py: add ability to load JSON file from a string, not just a local file 2013-06-04 17:50:36 +00:00
distantclip.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
downsamplebitmap.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
drawbitmaprect.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
drawlooper.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
dropshadowimagefilter.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
drrect.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
emptypath.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
etc1bitmap.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
extractbitmap.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
factory.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
fatpathfill.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
filltypes.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
filltypespersp.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
filterbitmap.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
filterindiabox.cpp Make image scaling have floating point scales. Third attempt to land this 2014-05-28 17:30:02 +00:00
fontcache.cpp Sanitizing source files in Housekeeper-Nightly 2013-10-10 07:01:40 +00:00
fontmgr.cpp Pass the IDWriteFactory instead of relying on a global creator. 2014-03-31 19:18:07 +00:00
fontscaler.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
gammatext.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
getpostextpath.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
giantbitmap.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
gm_error.h Add SkPDFDeviceFlatenner which extends SkPDFDevice to add support to flatten the path and the text when we have perspective. 2013-10-14 13:42:12 +00:00
gm_expectations.cpp Generate gm/Android.mk, minus JSON. 2014-05-16 17:56:43 +00:00
gm_expectations.h replace config() with colorType() 2014-05-29 15:57:47 +00:00
gm_json.py make compare_rendered_pictures process render_pictures's new JSON output format 2014-05-06 15:31:31 +00:00
gm.cpp Reland "Clean up Test's resourcePath code." 2014-06-09 12:05:34 -07:00
gm.h Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
gmmain.cpp Remove SkPicture::kUsePathBoundsForClip_RecordingFlag 2014-06-09 06:25:34 -07:00
gradient_matrix.cpp Remove unused (by clients) SkUnitMapper 2014-05-22 12:27:41 +00:00
gradientDirtyLaundry.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
gradients_2pt_conical.cpp Fix Assert for gpu ConicalTwoPointGradient edgecase to be correct bounds. 2014-06-09 11:57:28 -07:00
gradients_no_texture.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
gradients.cpp Remove unused (by clients) SkUnitMapper 2014-05-22 12:27:41 +00:00
gradtext.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
hairlines.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
hairmodes.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
hittestpath.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
image.cpp remove picture-backed surfaces 2014-04-11 18:34:35 +00:00
image.h check-point for image/surface work 2012-07-29 20:38:16 +00:00
imagealphathreshold.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
imageblur.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
imageblurtiled.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
imagefiltersbase.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
imagefiltersclipped.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
imagefilterscropexpand.cpp Sanitizing source files in Housekeeper-Nightly 2014-03-15 03:02:32 +00:00
imagefilterscropped.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
imagefiltersgraph.cpp Remove some unnecessary uses of SkOnce. 2014-05-27 16:28:43 +00:00
imagefiltersscaled.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
imagemagnifier.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
imageresizetiled.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
internal_links.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
inversepaths.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
lcdtext.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
lerpmode.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
lighting.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
linepaths.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
lumafilter.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
matrixconvolution.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
matriximagefilter.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
megalooper.cpp move common blur types into central header 2014-04-28 16:25:35 +00:00
mixedxfermodes.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
modecolorfilters.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
morphology.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
nested.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
ninepatchstretch.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
nonclosedpaths.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
offsetimagefilter.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
optimizations.cpp Staging for cleanup of SkPicture-related headers 2014-04-18 18:04:41 +00:00
ovals.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
patheffects.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
pathfill.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
pathinterior.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
pathopsinverse.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
pathopsskpclip.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
pathreverse.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
peekpixels.cpp Revert "Revert of add colortable support to imagegenerator (https://codereview.chromium.org/304443003/)" 2014-05-29 15:57:20 +00:00
perlinnoise.cpp Fix tiled perlin noise. 2014-06-12 11:24:20 -07:00
pictureimagefilter.cpp Staging for cleanup of SkPicture-related headers 2014-04-18 18:04:41 +00:00
pictureshader.cpp Remove setLocalMatrix calls from picture shader GM. 2014-05-02 21:23:52 +00:00
points.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
poly2poly.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
polygons.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
quadpaths.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
rects.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
resizeimagefilter.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
roundrects.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
rrect.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
rrects.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
samplerstress.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
selftest.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
shaderbounds.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
shadertext2.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
shadertext3.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
shadertext.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
shadows.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
shallowgradient.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
simpleaaclip.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
skbug1719.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
spritebitmap.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
srcmode.cpp use some helper Make functions to initialize SkImageInfo 2014-01-15 02:38:22 +00:00
stringart.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
strokefill.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
strokerect.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
strokerects.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
strokes.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
stroketext.cpp hide SkBitmap::setConfig 2014-06-09 19:52:07 -07:00
system_preferences_default.cpp Set LCD font smoothing to "medium" for gm on Mac, regardless of system settings 2012-02-14 14:53:59 +00:00
system_preferences_mac.mm gm: Include system_preferences.h in mac file. 2012-09-26 15:41:42 +00:00
system_preferences.h Set LCD font smoothing to "medium" for gm on Mac, regardless of system settings 2012-02-14 14:53:59 +00:00
tablecolorfilter.cpp add legacy/helper allocN32Pixels, and convert gm to use it 2014-01-25 16:46:20 +00:00
techtalk1.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
testimagefilters.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
texdata.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
texteffects.cpp move common blur types into central header 2014-04-28 16:25:35 +00:00
texturedomaineffect.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
thinrects.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
thinstrokedrects.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
tileimagefilter.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
tilemodes_scaled.cpp Remove unused (by clients) SkUnitMapper 2014-05-22 12:27:41 +00:00
tilemodes.cpp Remove unused (by clients) SkUnitMapper 2014-05-22 12:27:41 +00:00
tinybitmap.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
twopointradial.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
typeface.cpp fix more 64bit warnings 2014-01-27 13:42:58 +00:00
variedtext.cpp GM/bench for text draws with various parameters and clip rects. 2014-06-09 15:11:30 -07:00
vertices.cpp new vertices gm to test alpha 2014-05-05 20:41:21 +00:00
verttext2.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
verttext.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
verylargebitmap.cpp Turn on quilt mode in DM. 2014-04-30 13:20:45 +00:00
xfermodeimagefilter.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
xfermodes2.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
xfermodes3.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00
xfermodes.cpp Cleanup: Get rid of make_isize() function from gm.h. 2014-06-09 23:59:03 -07:00