History log of /external/skia/src/effects/SkComposeImageFilter.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2a75e5df300a2838f943ca52a52a85a5cf69802b 22-Sep-2016 brianosman <brianosman@google.com> Add output format properties to SkImageFilter::Context

For now, this is just the color space (of the original
requesting device). This is used when constructing
intermediate rendering surfaces, so that we ensure we
land in a surface that's similar/compatible to the
final consumer of the DAG's output.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357273002

Review-Url: https://codereview.chromium.org/2357273002
/external/skia/src/effects/SkComposeImageFilter.cpp
225db4441e0cb887d52c906e8bb39df506304b3e 17-Apr-2016 robertphillips <robertphillips@google.com> Outline SkImageFilter Make methods

Mainly mechanical CL.

TBR=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1893973002

Review URL: https://codereview.chromium.org/1893973002
/external/skia/src/effects/SkComposeImageFilter.cpp
60c9b58b3214b0154c931656e91e39b230e987d8 03-Apr-2016 reed <reed@google.com> change flattenable factory to return sk_sp

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1855733002

Review URL: https://codereview.chromium.org/1855733002
/external/skia/src/effects/SkComposeImageFilter.cpp
2238c9dbca4b791edc512957728a18ce14d55912 30-Mar-2016 robertphillips <robertphillips@google.com> Update SkMergeImageFilter to sk_sp

TBR=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1847583002

Review URL: https://codereview.chromium.org/1847583002
/external/skia/src/effects/SkComposeImageFilter.cpp
491fb17cab07574a9d5656c1c97ad0acc3af5c70 30-Mar-2016 robertphillips <robertphillips@google.com> Update SkComposeImageFilter to sk_sp

TBR=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1841233002

Review URL: https://codereview.chromium.org/1841233002
/external/skia/src/effects/SkComposeImageFilter.cpp
2302de920e5434809bd0e85b871a6e002856dfdb 24-Mar-2016 robertphillips <robertphillips@google.com> Switch new SkImageFilter internal methods over to sk_sp

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1826893002

Review URL: https://codereview.chromium.org/1826893002
/external/skia/src/effects/SkComposeImageFilter.cpp
e5e79840ef38ab1d3f03abcf1b2df66fb9940018 21-Mar-2016 senorblanco <senorblanco@chromium.org> Change signatures of filter bounds methods to return a rect.

Change filterBounds(), onFilterBounds() and onFilterNodeBounds() and computeFastBounds() to
return the destination rectangle. There was no code path that could
return false, and returning rects by value is ok now.

BUG=skia:5094
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1823573003

Review URL: https://codereview.chromium.org/1823573003
/external/skia/src/effects/SkComposeImageFilter.cpp
17a652017a0243c57c954662e08a7976b9990fee 21-Mar-2016 jbroman <jbroman@chromium.org> Make SkComposeImageFilter::onFilterImage filter the bounds given to the inner filter.

Previously, the bounds requested by the caller would be passed to both the
inner and outer filter, but since the outer filter may move pixels, this is not
necessarily sufficient to supply the pixels required by the outer filter to fill
the bounds.

Unit test included.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1813373002

Review URL: https://codereview.chromium.org/1813373002
/external/skia/src/effects/SkComposeImageFilter.cpp
40736abf74908dfed82567ba88432103c9a7e900 08-Mar-2016 robertphillips <robertphillips@google.com> Switch SkComposeImageFilter over to new onFilterImage interface

This CL depends on https://codereview.chromium.org/1762013002/ (Swap over to using SkImageFilter::filterImage instead of filterImageDeprecated)

TBR=bsalomon@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1768283002

Review URL: https://codereview.chromium.org/1768283002
/external/skia/src/effects/SkComposeImageFilter.cpp
48e78468f5f6b900d476e616bdb1ba457c8f0b2a 17-Feb-2016 robertphillips <robertphillips@google.com> Mark existing image filter entry points that will be going away with Deprecated
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709753002

Review URL: https://codereview.chromium.org/1709753002
/external/skia/src/effects/SkComposeImageFilter.cpp
d8ff5b336e586ad971ebcafa5fb2eb1e7ac95589 28-Jan-2016 senorblanco <senorblanco@chromium.org> Image filters: Make a recursive, forward-mapping bounds
traversal which respects the CropRect. This is useful when
you want the device-space bounds of a primitive after
filtering. (This may also eventually subsume
computeFastBounds()).

This CL generalizes filterBounds() and onFilterBounds() to
take a mapping direction. It also makes filterBounds()
responsible for calling onFilterNodeBounds() and applying
the crop rect, simplifying onFilterBounds().

BUG=skia:4627
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1612953004

Review URL: https://codereview.chromium.org/1612953004
/external/skia/src/effects/SkComposeImageFilter.cpp
4e23cdaa6b892afeaa150c6d74099dc6c2065b7e 11-Jan-2016 reed <reed@google.com> remove imagefilter::sizeconstraint

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1571033002

Review URL: https://codereview.chromium.org/1571033002
/external/skia/src/effects/SkComposeImageFilter.cpp
db64af3b178a19ecb47d2b9a373113687d8921fd 09-Dec-2015 senorblanco <senorblanco@chromium.org> Fix filter primitive bounds computations.

Make each filter responsible for expanding its destination
bounds. Previously, we were using a union of all
intermediate bounds sizes via join() calls in many image
filters' computeFastBounds(), due to the fact that those
filters could only produce bitmaps the same size as their
inputs. Now, we compute optimal bounds for each filter as
follows:

1) Pass the (unmodified) clip bounds to the root node
of the DAG in the first recursive call to onFilterImage()
as the Context's fClipBounds.

2) Reverse-map the clip: when recursing up the DAG in
filterInput[GPU](), apply filter-specific expansion to the
clip by calling calling onFilterNodeBounds(... kReverse).
This allows upstream nodes to have a clip that respects the
current node's requirements. This is done via helper
function mapContext().

3) Forward-map the source bitmap: just prior to applying
the crop rect in applyCropRect(), we determine the filter's
preferred bounds by mapping the source bitmap bounds
forwards via onFilterNodeBounds(..., kForward).

NOTE: GMs affected by this change:
fast_slow_blurimagefilter: fast and slow paths now produce the same result
spritebitmap: drawSprite() and drawBitmap() paths now produce the same result
filterfastbounds: fast bounds are optimized; all drop-shadow results now appear
apply-filter: snug and not-snug cases give same results
dropshadowimagefilter: drawSprite() results now show shadows
draw-with-filter: no artifacts on erode edges; blur edges no longer clipped
displacement, imagefiltersbase, imagefiltersclipped, imagefilterscropexpand, imagefiltersscaled, matriximagefilter,
resizeimagefilter, localmatriximagefilter, testimagefilters: fixed incorrect clipping
imagefilterstransformed, morphology: no artifacts on erode edges

BUG=skia:1062,skia:3194,skia:3939,skia:4337,skia:4526

Review URL: https://codereview.chromium.org/1308703007
/external/skia/src/effects/SkComposeImageFilter.cpp
c9b5f8b1522e72449d704d30ed6aee4fc6211ee8 22-Oct-2015 reed <reed@google.com> tunnel down texture-size-constraint to imagefilters

BUG=skia:

Review URL: https://codereview.chromium.org/1421493003
/external/skia/src/effects/SkComposeImageFilter.cpp
b9519f86bbce946e505980a4fa950fdc4bcf74ab 15-Oct-2015 senorblanco <senorblanco@chromium.org> Image Filters: refactor all CPU input processing into a filterInput helper function.

No change in behaviour; this is a straight refactoring.

BUG=skia:3194

Review URL: https://codereview.chromium.org/1404743005
/external/skia/src/effects/SkComposeImageFilter.cpp
5788faaa2ac4203827c68006b669e277d441e2e4 13-Feb-2015 ajuma <ajuma@chromium.org> Fix SkComposeImageFilter's bounds computation and offset handling

This makes SkComposeImageFilter::computeFastBounds compose its
filters' bounds (rather than falling back to
SkImageFilter::computeFastBounds, which takes the union of the bounds).

This also makes SkComposeImageFilter::onFilterImage correctly handle
an offset produced when applying the inner filter; such offsets were
previously ignored.

BUG=chromium:453924

Review URL: https://codereview.chromium.org/908273002
/external/skia/src/effects/SkComposeImageFilter.cpp
f3f5bad7ded35265c0b5d042cc4174386b197a33 19-Dec-2014 robertphillips <robertphillips@google.com> Add toString methods to SkImageFilter-derived classes

This isn't definitive but at least makes something show up in the debugger.

Review URL: https://codereview.chromium.org/789163006
/external/skia/src/effects/SkComposeImageFilter.cpp
3f3b3d003527861dc0bd89733857576408906431 01-Dec-2014 mtklein <mtklein@chromium.org> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.

This was needed for pictures before v33, and we're now requiring v35+.

Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88

Review URL: https://codereview.chromium.org/769953002
/external/skia/src/effects/SkComposeImageFilter.cpp
6e78293ee896020104ffc4c23b565073e9a49893 01-Dec-2014 mtklein <mtklein@google.com> Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (patchset #1 id:1 of https://codereview.chromium.org/769953002/)

Reason for revert:
Breaks canary builds. Will reland after the Chromium change lands.

Original issue's description:
> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.
>
> This was needed for pictures before v33, and we're now requiring v35+.
>
> Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/52c293547b973f7fb5de3c83f5062b07d759ab88

TBR=reed@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/768183002
/external/skia/src/effects/SkComposeImageFilter.cpp
52c293547b973f7fb5de3c83f5062b07d759ab88 01-Dec-2014 mtklein <mtklein@chromium.org> Remove SK_SUPPORT_LEGACY_DEEPFLATTENING.

This was needed for pictures before v33, and we're now requiring v35+.

Will follow up with the same for skia/ext/pixel_ref_utils_unittest.cc

BUG=skia:

Review URL: https://codereview.chromium.org/769953002
/external/skia/src/effects/SkComposeImageFilter.cpp
9fa60daad4d5f54c0dbe3dbcc7608a8f6d721187 21-Aug-2014 reed <reed@google.com> Simplify flattening to just write enough to call the factory/public-constructor for the class. We want to *not* rely on private constructors, and not rely on calling through the inheritance hierarchy for either flattening or unflattening(CreateProc).

Refactoring pattern:

1. guard the existing constructor(readbuffer) with the legacy build-flag
2. If you are a instancable subclass, implement CreateProc(readbuffer) to create a new instances from the buffer params (or return NULL).

If you're a shader subclass
1. You must read/write the local matrix if your class accepts that in its factory/constructor, else ignore it.

R=robertphillips@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org, sugoi@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/395603002
/external/skia/src/effects/SkComposeImageFilter.cpp
4cb543d6057b692e1099e9f115155f0bf323a0c8 14-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement support for a Context parameter in image filters

Some upcoming work (support for expanding crop rects) requires
the clip bounds to be available during filter traversal. This change
replaces the SkMatrix parameter in the onFilterImage() traversals
with a Context parameter. It contains the CTM, as well as the clip
bounds.

BUG=skia:
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13803 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkComposeImageFilter.cpp
ae761f7545d8ebf181d220169afac2056b057b8c 05-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Make SkImageFilter methods const.

SkImageFilter had some non-const methods that could all be made const.
This is a first step towards making SkImageFilter immutable.

BUG=skia:2097
R=mtklein@google.com, reed@google.com, robertphillips@google.com

Author: dominikg@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13330 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkComposeImageFilter.cpp
c4b12f19a46946e1c02f3525e0ea4902b09feac5 05-Feb-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement correct clipping for image filters.

Image filters in Skia currently clip the size of the the offscreen
bitmap used for filtering to the device clip bounds. This means that
any pixel-moving filter (e.g., blur) has edge artifacts at the clip
boundaries. This is problematic for tiling, where a single SkPicture
is played back with a clip set to the tile boundaries.

By implementing the onFilterBounds() traversal, and using it in
saveLayer() when a filter is present, we can clip the layer to the
expanded clip rect. Note that this requires that the traversal be
performed in reverse as compared to computeFastBounds(). (It's also
done in device space, unlike computeFastBounds()).

New test imagefiltersclipped tests pixel-moving filters when clipped
by various clip rects.
New test imageblurtiled tests tiled (compositor-style) rendering of
blurred text. There should be no artifacts at the tile boundaries.

BUG=337831
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13323 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkComposeImageFilter.cpp
8b0e8ac5f582de80356019406e2975079bf0829d 30-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Refactor read and write buffers.

Eliminates SkFlattenable{Read,Write}Buffer, promoting SkOrdered{Read,Write}Buffer
a step each in the hierarchy.

What used to be this:

SkFlattenableWriteBuffer -> SkOrderedWriteBuffer
SkFlattenableReadBuffer -> SkOrderedReadBuffer
SkFlattenableReadBuffer -> SkValidatingReadBuffer

is now

SkWriteBuffer
SkReadBuffer -> SkValidatingReadBuffer

Benefits:
- code is simpler, names are less wordy
- the generic SkFlattenableFooBuffer code in SkPaint was incorrect; removed
- write buffers are completely devirtualized, important for record speed

This refactoring was mostly mechanical. You aren't going to find anything
interesting in files with less than 10 lines changed.

BUG=skia:
R=reed@google.com, scroggo@google.com, djsollen@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13245 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkComposeImageFilter.cpp
6776b82d466fa93ccffd251fdf556fe058395444 03-Jan-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Make SkImageFilter crop rects relative to the primitive origin, instead of 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
/external/skia/src/effects/SkComposeImageFilter.cpp
ce33d60187718e7bb01944ee130c9f5d9fb335ec 25-Nov-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Adding more validation

- 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
/external/skia/src/effects/SkComposeImageFilter.cpp
1c4c9ef43747b42d2c31b5f17fe5e054fb3fee64 07-Aug-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Move SkComposeImageFilter into its own {.h, .cpp} files

In http://crrev.com/21154002, SkComposeImageFilter will be used
outside of tests. Consequently, this moves SkComposeImageFilter from
SkTestImageFilters.{h, cpp} into its own {.h, .cpp} files.

BUG=181613
R=senorblanco@chromium.org

Author: ajuma@chromium.org

Review URL: https://chromiumcodereview.appspot.com/22438003

git-svn-id: http://skia.googlecode.com/svn/trunk@10591 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkComposeImageFilter.cpp