aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/tileimagefilter.cpp
Commit message (Collapse)AuthorAge
* Make SkImageFilter crop rects relative to the primitive origin, instead of ↵Gravatar senorblanco@chromium.org2014-01-03
| | | | | | | | | | | | | | | | | | relative to their parent's crop rect. This is required by SVG semantics, and is more sane anyway. To do this, this patch changes the "offset/loc" parameter in filterImage() / onFilterImage() from an inout-param to an out-param only, so that the calling filter can know how much the input filter wants its result offset (and doesn't include the original primitive position). This offset can then be applied to the current filter's crop rect. (I've renamed the parameter "offset" in all cases to make this clear.) This makes the call sites in SkCanvas/SkGpuDevice responsible for applying the resulting offset to the primitive's position, which is actually a fairly small change. This change also fixes SkTileImageFilter and SkOffsetImageFilter to correctly handle an input offset, which they weren't before. This required modifying the GM's, since they assumed the broken behaviour. NOTE: this will require rebaselining the imagefiltersgraph test, since it has a new test case. NOTE: this will "break" the Blink layout tests css3/filters/effect-reference-subregion-chained-hw.html and css3/filters/effect-reference-subregion-hw.html, but it actually makes them give correct results. It should be suppressed on the skia roll, and I'll rebaseline it. R=reed@google.com Review URL: https://codereview.chromium.org/112803004 git-svn-id: http://skia.googlecode.com/svn/trunk@12895 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement srcRect and dstRect functionality in SkBitmapSource. This is ↵Gravatar senorblanco@chromium.org2013-12-09
| | | | | | | | | | | | | | required for the "preserveAspectRatio" options of SVG's feImage. Covered by new GM "bitmapsource". This also includes some changes to the xfermodeimagefilter and tileimagefilter GMs to properly handle the CTM. This worked before only because SkBitmapSource was ignoring the CTM. Now that it respects it, we need to give the correct transform. This also means the GMs now work while zoomed. It also implements CTM support for SkTileImageFilter. NOTE: this will require rebaselining a number of imagefilter GMs on Nexus4, since they render in perspective (using the CTM). The changes to the results should all be improvements. R=reed@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/106933002 git-svn-id: http://skia.googlecode.com/svn/trunk@12571 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting 12528 & 12533 (Implement srcRect and dstRect functionality in ↵Gravatar robertphillips@google.com2013-12-06
| | | | | | | | | | SkBitmapSource) due to image differences on N4 https://codereview.chromium.org/108623002/ git-svn-id: http://skia.googlecode.com/svn/trunk@12534 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement srcRect and dstRect functionality in SkBitmapSource. This is ↵Gravatar commit-bot@chromium.org2013-12-06
| | | | | | | | | | | | | | required for the "preserveAspectRatio" options of SVG's feImage. Covered by new GM "bitmapsource". This also includes some changes to the xfermodeimagefilter and tileimagefilter GMs to properly handle the CTM. This worked before only because SkBitmapSource was ignoring the CTM. Now that it respects it, we need to give the correct transform. This also means the GMs now work while zoomed. R=reed@google.com Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/106933002 git-svn-id: http://skia.googlecode.com/svn/trunk@12528 2bbb7eff-a529-9590-31e7-b0007b416f81
* Moving 4 SkImageFilter derived classes from blink to skiaGravatar commit-bot@chromium.org2013-09-26
There were 4 classes in blink that derived from SkImageFilter : - TileImageFilter -> SkTileImageFilter - OffsetImageFilter -> SkOffsetImageFilter (already existed) - FloodImageFilter -> SkFloodImageFilter - CompositeImageFilter -> SkCompositeImageFilter All functions were copied as is, without modification (except for warnings fixes), except for the offset filter, which was merged into the existing SkOffsetImageFilter class, as a special case when a crop rect is provided. Since the names won't clash with the names in blink, it should be easy to integrate them in blink later and fix issues, if needed. BUG= R=senorblanco@google.com, senorblanco@chromium.org, bsalomon@google.com, reed@google.com, mtklein@google.com Author: sugoi@chromium.org Review URL: https://chromiumcodereview.appspot.com/24157005 git-svn-id: http://skia.googlecode.com/svn/trunk@11475 2bbb7eff-a529-9590-31e7-b0007b416f81