aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/imagefiltersgraph.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
* Adding more validationGravatar commit-bot@chromium.org2013-11-25
| | | | | | | | | | | | | | | | - Added a way to check that the number of inputs of a filter is not more than a filter expects - Added validation of reftype in SkBitmap::unflatten() - Added validation on fKD (diffuse lighting constant) and fKS (specular lighting constant) to make sure that they are always non-negative numbers - Added validation of SkPerlinNoiseShader::fType and SkPerlinNoiseShader::fNumOctaves BUG= R=reed@google.com, senorblanco@google.com, mtklein@google.com, senorblanco@chromium.org, sugoi@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/83343003 git-svn-id: http://skia.googlecode.com/svn/trunk@12388 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkFloatToScalar macroGravatar commit-bot@chromium.org2013-11-25
| | | | | | | | | | | BUG= R=reed@google.com, djsollen@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/85463005 git-svn-id: http://skia.googlecode.com/svn/trunk@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unnamed namespace usage from 'gm'.Gravatar commit-bot@chromium.org2013-11-20
| | | | | | | | | | | | | | Skia prefers static over unnamed namespaces. BUG=None TEST=None R=bsalomon@google.com, robertphillips@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/79173002 git-svn-id: http://skia.googlecode.com/svn/trunk@12326 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix drawBitmap() of scratch texture.Gravatar senorblanco@chromium.org2013-10-24
| | | | | | | | R=bsalomon@google.com Review URL: https://codereview.chromium.org/40163004 git-svn-id: http://skia.googlecode.com/svn/trunk@11947 2bbb7eff-a529-9590-31e7-b0007b416f81
* Apply matrix early in draw bitmapGravatar commit-bot@chromium.org2013-10-24
| | | | | | | | | | | | | | Committed: http://code.google.com/p/skia/source/detail?r=11930 Reverted: https://code.google.com/p/skia/source/detail?r=11932 R=robertphillips@google.com, senorblanco@chromium.org Author: bsalomon@google.com Review URL: https://codereview.chromium.org/30593003 git-svn-id: http://skia.googlecode.com/svn/trunk@11933 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Apply matrix early in draw bitmap"Gravatar scroggo@google.com2013-10-23
| | | | | | | | This reverts commit 4c446c8eb50b7a6e6f917fae7b4c4ffe5658a949. Fix build. git-svn-id: http://skia.googlecode.com/svn/trunk@11932 2bbb7eff-a529-9590-31e7-b0007b416f81
* Apply matrix early in draw bitmapGravatar commit-bot@chromium.org2013-10-23
| | | | | | | | | | R=robertphillips@google.com, senorblanco@chromium.org Author: bsalomon@google.com Review URL: https://codereview.chromium.org/30593003 git-svn-id: http://skia.googlecode.com/svn/trunk@11930 2bbb7eff-a529-9590-31e7-b0007b416f81
* Split SkDevice into SkBaseDevice and SkBitmapDeviceGravatar robertphillips@google.com2013-08-29
| | | | | | | | https://codereview.chromium.org/22978012/ git-svn-id: http://skia.googlecode.com/svn/trunk@10995 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get ↵Gravatar robertphillips@google.com2013-08-20
| | | | | | Chromium ready. git-svn-id: http://skia.googlecode.com/svn/trunk@10835 2bbb7eff-a529-9590-31e7-b0007b416f81
* Split SkDevice out of SkBitmapDeviceGravatar robertphillips@google.com2013-08-20
| | | | | | | | https://codereview.chromium.org/22978012/ git-svn-id: http://skia.googlecode.com/svn/trunk@10830 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkBlendImageFilter, and all tests. Its functionality has been ↵Gravatar senorblanco@chromium.org2013-08-01
| | | | | | | | | | subsumed by SkXfermodeImageFilter. R=robertphillips@google.com Review URL: https://codereview.chromium.org/21404002 git-svn-id: http://skia.googlecode.com/svn/trunk@10482 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* Pull SkMergeImageFilter out into its own file.Gravatar senorblanco@chromium.org2012-12-04
| | | | | | Review URL: https://codereview.appspot.com/6873052 git-svn-id: http://skia.googlecode.com/svn/trunk@6662 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a factory Create function for SkColorFilterImageFilter, and move the ↵Gravatar senorblanco@chromium.org2012-10-26
| | | | | | | | matrix optimization there. This will allow the Chrome compositor to extract the optimized matrix, and potentially apply the color matrix itself, saving a buffer allocation & draw. Review URL: https://codereview.appspot.com/6739057 git-svn-id: http://skia.googlecode.com/svn/trunk@6152 2bbb7eff-a529-9590-31e7-b0007b416f81
* Protect filter_texture() against render target change.Gravatar senorblanco@chromium.org2012-10-24
| | | | | | | | | | | | | Fix blend filters when input textures are "sloppy" (approx scratch texture match) Add a new test case to gm/imagefiltersgraph, and reduce its size. NOTE: this will require new baselines for the imagefiltersgraph GM. BUG=950 Review URL: https://codereview.appspot.com/6769043 git-svn-id: http://skia.googlecode.com/svn/trunk@6073 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reenable pipe for imagefiltersgraph GM on Android.Gravatar scroggo@google.com2012-08-28
| | | | | | | | This test was fixed with r5269. Review URL: https://codereview.appspot.com/6490045 git-svn-id: http://skia.googlecode.com/svn/trunk@5324 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part III of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6475053 git-svn-id: http://skia.googlecode.com/svn/trunk@5264 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move SkColorFilterImageFilter into its own file.Gravatar senorblanco@chromium.org2012-08-20
| | | | | | | | Review URL: https://codereview.appspot.com/6463072/ git-svn-id: http://skia.googlecode.com/svn/trunk@5197 2bbb7eff-a529-9590-31e7-b0007b416f81
* Disable imagefiltersgraph from running through pipe on androidGravatar scroggo2012-08-20
| | | | | | | While we figure out what the problem is. Review URL: https://codereview.appspot.com/6441164 git-svn-id: http://skia.googlecode.com/svn/trunk@5193 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implements a new class, SkSingleInputImageFilter, to handle DAG connectivityGravatar senorblanco@chromium.org2012-08-20
for filters with a single image input. This provides functionality to store, flatten and unflatten a single SkImageFilter input, as well as to recursively evaluate it on the CPU or GPU. The following classes were re-parented to implement DAG connectivity: SkBlurImageFilter, SkDilateImageFilter, SkErodeImageFilter, SkColorFilterImageFilter. The constructors for each have been appended with a new parameter, representing the input filter (default NULL). This change also implements an arbitrary SkBitmap input source for filtering, SkBitmapSource. NOTE: This CL will require gyp file changes when rolling past this revision. Review URL: https://codereview.appspot.com/6462071/ git-svn-id: http://skia.googlecode.com/svn/trunk@5170 2bbb7eff-a529-9590-31e7-b0007b416f81