skia2/gm
senorblanco@chromium.org fbaea53366 In image filters, apply the CTM and offset to the crop rect. This is necessary to compensate for both clipping applied by the compositor (communicated via the CTM) and for cropping applied in upstream image filters (communicated via the offset). This requires a few ugly conversions, since the crop rect is an SkIRect, and the ctm is an SkMatrix.
I also had to offset the matrix passed to filter evaluation by drawSprite() and internalDrawBitmap() by the primitive position. This is the same offset that is applied when drawing the primitive, to compensate for the internal saveLayer().

Also apply the total matrix to the filter params in asNewEffect(), so that (for example) lighting params are offset by both the compositor clipping and upstream crop rects.

R=reed@google.com

Review URL: https://codereview.chromium.org/23295017

git-svn-id: http://skia.googlecode.com/svn/trunk@10961 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-27 21:37:01 +00:00
..
tests Update expectations for Mac PDF 2013-08-21 18:04:09 +00:00
viewer Create AJAX live-viewer of expected-vs-actual GM results 2013-08-02 19:08:52 +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 Sanitizing source files in Housekeeper-Nightly 2013-08-16 07:01:49 +00:00
aarectmodes.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
alphagradients.cpp Sanitizing source files in Housekeeper-Nightly 2013-05-25 07:01:12 +00:00
arcofzorro.cpp Sanitizing source files in Housekeeper-Nightly 2013-07-10 07:00:58 +00:00
arithmode.cpp Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect exposed via asNewEffectOrCoeff(). 2013-05-29 20:55:09 +00:00
beziereffects.cpp Add GMs for gpu Bezier shaders 2013-08-23 18:05:01 +00:00
bicubicfilter.cpp (Relanding r7275 with assert fix, plus fixes from r7276, r7280, r7283.) 2013-01-18 20:48:20 +00:00
bigmatrix.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
bigtext.cpp Sanitizing source files in Housekeeper-Nightly 2013-06-06 07:01:37 +00:00
bitmapcopy.cpp Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready. 2013-08-20 20:06:40 +00:00
bitmapfilters.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
bitmapmatrix.cpp Added additional case to GM:drawbitmapmatrix 2012-09-28 17:24:44 +00:00
bitmaprect.cpp Fixed remaining clang compiler warnings 2012-12-03 17:35:19 +00:00
bitmaprecttest.cpp augmenting fix in 8700 and 8701, be careful NOT to "sort" the result of mapRect 2013-04-18 15:37:14 +00:00
bitmapscroll.cpp fix warning from scalar --> int32 conversion 2013-01-07 19:54:40 +00:00
bleed.cpp Create new target to hold gpu test code, enable direct testing of GrEffects in GM. 2013-08-21 19:27:48 +00:00
blurquickreject.cpp Fix compiler warning/error in r10428 2013-07-30 12:29:20 +00:00
blurrect.cpp Blur refactoring 2013-08-27 16:14:03 +00:00
blurs.cpp Blur refactoring 2013-08-27 16:14:03 +00:00
canvasstate.cpp Add a GM to test the clipping of canvas layers. 2013-08-20 17:54:33 +00:00
circles.cpp Blur refactoring 2013-08-27 16:14:03 +00:00
circularclips.cpp Use Path Ops to generate PDF clips 2013-08-08 02:52:05 +00:00
clippedbitmapshaders.cpp Restyle SkPDFImageShader and support tiling bitmaps outside clip bounds 2013-08-21 23:10:45 +00:00
cmykjpeg.cpp Sanitizing source files in Housekeeper-Nightly 2013-05-30 07:01:29 +00:00
colorfilterimagefilter.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
colormatrix.cpp Add transparent source bitmap to colormatrix GM. 2012-10-16 17:50:48 +00:00
colortype.cpp if we can't load Times, use default font 2013-06-03 17:45:29 +00:00
complexclip2.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:19:56 +00:00
complexclip.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
composeshader.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
conicpaths.cpp Sanitizing source files in Housekeeper-Nightly 2013-06-21 07:00:53 +00:00
convexpaths.cpp temporarily disable assert in convexpaths GM while it is debugged 2013-08-15 20:34:45 +00:00
copyTo4444.cpp Fix build. 2013-08-07 19:39:56 +00:00
cubicpaths.cpp Sanitizing source files in Housekeeper-Nightly 2013-05-24 07:01:26 +00:00
dashcubics.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
dashing.cpp Fix minor memory leaks 2013-03-27 21:31:21 +00:00
degeneratesegments.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
deviceproperties.cpp Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready. 2013-08-20 20:06:40 +00:00
displacement.cpp Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready. 2013-08-20 20:06:40 +00: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 Sanitizing source files in Skia_Periodic_House_Keeping 2012-09-18 02:01:09 +00:00
downsamplebitmap.cpp clean up printf usage in gm 2013-07-25 19:14:37 +00:00
drawbitmaprect.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
drawlooper.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
emptypath.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:19:56 +00:00
extractbitmap.cpp Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready. 2013-08-20 20:06:40 +00:00
factory.cpp Fixes for factory GM. 2013-08-16 19:18:12 +00:00
fatpathfill.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
filltypes.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
filltypespersp.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
filterbitmap.cpp clean up printf usage in gm 2013-07-25 19:14:37 +00:00
fontmgr.cpp allow both GDI and DW fontmgrs at the same time 2013-08-21 15:20:43 +00:00
fontscaler.cpp Re-enable fontscaler GM for Android 2013-08-20 15:24:27 +00:00
gammatext.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
getpostextpath.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
giantbitmap.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
gm_error.h GM: allow caller to specify which result types trigger an error 2013-04-12 14:11:21 +00:00
gm_expectations.cpp The two leaks are: 2013-07-11 22:29:29 +00:00
gm_expectations.h The two leaks are: 2013-07-11 22:29:29 +00:00
gm_json.py svndiff.py: add ability to compare before-and-after JSON files, not just raw images 2013-07-16 18:56:32 +00:00
gm.cpp add onOnceBeforeDraw() virtual, so gm's can easily perform lazy initialization 2012-11-27 15:15:58 +00:00
gm.h Create new target to hold gpu test code, enable direct testing of GrEffects in GM. 2013-08-21 19:27:48 +00:00
gmmain.cpp Create new target to hold gpu test code, enable direct testing of GrEffects in GM. 2013-08-21 19:27:48 +00:00
gradient_matrix.cpp add SkIntToScalar and SkFloatToScalar to stop build errors on Mac10.6 2013-06-12 23:36:50 +00:00
gradientDirtyLaundry.cpp Sanitizing source files in Housekeeper-Nightly 2013-07-10 07:00:58 +00:00
gradients.cpp add new GM to try to reproduce a bug 2013-08-19 18:43:34 +00:00
gradtext.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
hairlines.cpp Fix degenerate and near-degenerate hairlines on the gpu 2013-05-24 18:51:55 +00:00
hairmodes.cpp add onOnceBeforeDraw() virtual, so gm's can easily perform lazy initialization 2012-11-27 15:15:58 +00:00
hittestpath.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
image.cpp Sanitizing source files in Housekeeper-Nightly 2013-07-24 07:01:12 +00:00
image.h check-point for image/surface work 2012-07-29 20:38:16 +00:00
imageblur.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
imagefiltersbase.cpp Upstreaming DropShadowImageFilter into skia, from Blink 2013-08-07 20:00:55 +00:00
imagefilterscropped.cpp Transpose the samples in imagefilterscropped, and add a 1x1 blur. The latter 2013-07-25 18:08:13 +00:00
imagefiltersgraph.cpp Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready. 2013-08-20 20:06:40 +00:00
imagemagnifier.cpp Skip tiled drawing in GM for magnifier image filter. 2012-08-15 16:32:19 +00:00
internal_links.cpp PDF: add support for named destinations. 2013-03-08 09:09:10 +00:00
inversepaths.cpp Inverse fill support in PDF 2013-07-31 22:54:31 +00:00
lcdtext.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
lerpmode.cpp Sanitizing source files in Housekeeper-Nightly 2013-05-22 07:01:13 +00:00
lighting.cpp In image filters, apply the CTM and offset to the crop rect. This is necessary to compensate for both clipping applied by the compositor (communicated via the CTM) and for cropping applied in upstream image filters (communicated via the offset). This requires a few ugly conversions, since the crop rect is an SkIRect, and the ctm is an SkMatrix. 2013-08-27 21:37:01 +00:00
linepaths.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
lumamode.cpp Updated SkLumaXfermode GM (take two). 2013-08-23 19:55:15 +00:00
matrixconvolution.cpp Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready. 2013-08-20 20:06:40 +00:00
megalooper.cpp The two leaks are: 2013-07-11 22:29:29 +00:00
mixedxfermodes.cpp Support multiple PDF rendering backends in the GM 2013-08-20 23:08:40 +00:00
modecolorfilters.cpp Work around stack overflow 2013-03-14 17:24:16 +00:00
morphology.cpp Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready. 2013-08-20 20:06:40 +00:00
nested.cpp Sanitizing source files in Housekeeper-Nightly 2013-08-21 07:01:29 +00:00
ninepatchstretch.cpp Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready. 2013-08-20 20:06:40 +00:00
optimizations.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-04-13 07:01:15 +00:00
ovals.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-04-19 07:01:00 +00:00
patheffects.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:19:56 +00:00
pathfill.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
pathinterior.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
pathopsinverse.cpp path ops -- crap, I checked in the wrong file 2013-04-22 20:12:47 +00:00
pathopsskpclip.cpp path ops : make it real 2013-04-25 13:34:40 +00:00
pathreverse.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
perlinnoise.cpp *** Perlin noise GM needs to be rebaselined *** 2013-06-17 14:19:01 +00:00
points.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
poly2poly.cpp Sanitizing source files in Housekeeper-Nightly 2013-06-22 07:00:58 +00:00
quadpaths.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
rects.cpp Blur refactoring 2013-08-27 16:14:03 +00:00
roundrects.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-04-23 07:01:29 +00:00
rrect.cpp GM : Unused parameters cleanup 2013-02-27 15:41:12 +00:00
rrects.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
samplerstress.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:19:56 +00:00
scalebitmap.cpp Sanitizing source files in Housekeeper-Nightly 2013-07-10 07:00:58 +00:00
selftest.cpp gm: record IntentionallySkipped tests 2013-04-10 12:17:34 +00:00
shaderbounds.cpp Fix some fixed-point bugs. 2012-04-17 21:46:18 +00:00
shadertext2.cpp Defining new color constat for transparent color 2012-12-06 21:47:40 +00:00
shadertext3.cpp Minor cleanup 2012-12-12 15:58:25 +00:00
shadertext.cpp GM : Unused parameters cleanup 2013-02-27 15:41:12 +00:00
shadows.cpp Blur refactoring 2013-08-27 16:14:03 +00:00
shallowgradient.cpp Fix minor memory leaks 2013-03-27 21:31:21 +00:00
simpleaaclip.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2012-12-15 02:03:10 +00:00
spritebitmap.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-17 07:06:06 +00:00
srcmode.cpp Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready. 2013-08-20 20:06:40 +00:00
strokefill.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:19:56 +00:00
strokerect.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
strokerects.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
strokes.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00: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 Defining new color constat for transparent color 2012-12-06 21:47:40 +00:00
techtalk1.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
testimagefilters.cpp Move SkComposeImageFilter into its own {.h, .cpp} files 2013-08-07 00:07:51 +00:00
texdata.cpp Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready. 2013-08-20 20:06:40 +00:00
texteffects.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
thinrects.cpp Sanitizing source files in Housekeeper-Nightly 2013-05-15 07:01:09 +00:00
thinstrokedrects.cpp Add a new GM for very thin stroke widths 2013-06-26 17:06:45 +00:00
tilemodes.cpp Regenerate bitmaps before each draw in tilemodes_npot GM 2013-08-06 20:47:52 +00:00
tinybitmap.cpp add onOnceBeforeDraw() virtual, so gm's can easily perform lazy initialization 2012-11-27 15:15:58 +00:00
twopointradial.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
typeface.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-02-27 07:10:10 +00:00
valgrind.supp More valgrind suppressions 2013-07-13 19:50:40 +00:00
verttext2.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:19:56 +00:00
verttext.cpp Fix _GDI::generateCharToGlyph to properly handle missing glyphs. 2013-08-27 19:05:32 +00:00
verylargebitmap.cpp Reduce verylargebitmap GM's memory footprint 2013-07-15 15:48:48 +00:00
xfermodeimagefilter.cpp Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready. 2013-08-20 20:06:40 +00:00
xfermodes2.cpp Fix for segmentation fault in xfermodes2 GM. 2013-04-19 13:59:52 +00:00
xfermodes3.cpp Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready. 2013-08-20 20:06:40 +00:00
xfermodes.cpp Added support for non-separable blending modes. 2013-03-05 16:23:59 +00:00