History log of /external/skia/src/effects/SkDropShadowImageFilter.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8be952ad8c9deefe19cff36f9ad217563400f817 14-Feb-2017 Mike Reed <reed@google.com> SkScalarMul is deprecated

BUG=skia:

Change-Id: I88ecfe9d4c72506f6b1a0e0dfadd2a5c171a6cb6
Reviewed-on: https://skia-review.googlesource.com/8353
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
92a895e66378527e6e33b825dc6528235e7c76bd 09-Dec-2016 Robert Phillips <robertphillips@google.com> Revert "Revert "Add antialiasing to SkDropShadowImageFilter's shadow draw""

This reverts commit 45aac57ac6195880930441656a0988453f16c3db.

Reason for revert:

Pixel test suppression has landed in Chrome:
https://codereview.chromium.org/2559213002 (Add suppression for GPU Pixel test in preparation for Skia CL)

Original change's description:
> Revert "Add antialiasing to SkDropShadowImageFilter's shadow draw"
>
> This reverts commit 78e8165ec3a408a88c394095bfbc43df2051449d.
>
> Reason for revert: Chrome pixel test
>
> Original change's description:
> > Add antialiasing to SkDropShadowImageFilter's shadow draw
> >
> > A BW draw in the SkDropShadowImageFilter can lead to unexpected popping of the shadow when the dest rect lies on half pixel boundaries.
> >
> > Change-Id: Ibc59dacc79bca8955981ec2889e79facd7d2de83
> > Reviewed-on: https://skia-review.googlesource.com/5669
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=bsalomon@google.com,robertphillips@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I0b0073cd8d9f1502daaa452c2153af029c11e52a
> Reviewed-on: https://skia-review.googlesource.com/5652
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I7d844c486fd6db57d3df60a32c12699f2d85ad16
Reviewed-on: https://skia-review.googlesource.com/5747
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
45aac57ac6195880930441656a0988453f16c3db 08-Dec-2016 Robert Phillips <robertphillips@google.com> Revert "Add antialiasing to SkDropShadowImageFilter's shadow draw"

This reverts commit 78e8165ec3a408a88c394095bfbc43df2051449d.

Reason for revert: Chrome pixel test

Original change's description:
> Add antialiasing to SkDropShadowImageFilter's shadow draw
>
> A BW draw in the SkDropShadowImageFilter can lead to unexpected popping of the shadow when the dest rect lies on half pixel boundaries.
>
> Change-Id: Ibc59dacc79bca8955981ec2889e79facd7d2de83
> Reviewed-on: https://skia-review.googlesource.com/5669
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I0b0073cd8d9f1502daaa452c2153af029c11e52a
Reviewed-on: https://skia-review.googlesource.com/5652
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
78e8165ec3a408a88c394095bfbc43df2051449d 07-Dec-2016 Robert Phillips <robertphillips@google.com> Add antialiasing to SkDropShadowImageFilter's shadow draw

A BW draw in the SkDropShadowImageFilter can lead to unexpected popping of the shadow when the dest rect lies on half pixel boundaries.

Change-Id: Ibc59dacc79bca8955981ec2889e79facd7d2de83
Reviewed-on: https://skia-review.googlesource.com/5669
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
7d954ad797176afedb9262fdea4507d0fc60eb9d 28-Oct-2016 Mike Reed <reed@google.com> remove xfermode from public api

BUG=skia:

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

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Change-Id: I19cd056f2af778f10e8c6c2b7b2735593b43dbac
Reviewed-on: https://skia-review.googlesource.com/4020
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
374772bd61951f01bf84fe17bf53d8867681c9ae 06-Oct-2016 reed <reed@google.com> Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints"

This reverts commit c245574ba3d0e2ade6c94b2812de3baa383bf4c4.

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

TBR=

Review-Url: https://codereview.chromium.org/2396953002
/external/skia/src/effects/SkDropShadowImageFilter.cpp
c245574ba3d0e2ade6c94b2812de3baa383bf4c4 05-Oct-2016 Mike Reed <reed@google.com> Revert[7] "replace SkXfermode obj with SkBlendMode enum in paints"

This reverts commit Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8.

Reason for revert: new assert from 100K bot

Original change's description:
> Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"
>
> - perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter
> This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44.
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2992
>
> Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8
> Reviewed-on: https://skia-review.googlesource.com/2992
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I848e5a69c5cd67f2c14889f4f0a346652578c4ff
Reviewed-on: https://skia-review.googlesource.com/3023
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
2b2fc7db4f8a4a4d4a51d7eb4df6aa62e309928d 05-Oct-2016 Mike Reed <reed@google.com> Revert[6] "replace SkXfermode obj with SkBlendMode enum in paints"

- perform version check in CreateProc for XfermodeImageFilter and ArithmeticImageFilter
This reverts commit 3ed485f4249e17abb4b11f5018d03175fd1afb44.

BUG=skia:

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

Change-Id: Ib4a154cdd5f5d1dcac921ef50d53b79a2d6a1be8
Reviewed-on: https://skia-review.googlesource.com/2992
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
3ed485f4249e17abb4b11f5018d03175fd1afb44 04-Oct-2016 Mike Reed <reed@google.com> Revert[5] "replace SkXfermode obj with SkBlendMode enum in paints"

This reverts commit I0fa5c58af428f3da8565465d1219a34ef8417d9a.

Reason for revert: failing to deserialize some of the 100K

Original change's description:
> Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"
>
> This reverts commit 2cbcd12281ee807214df094964c584c78932e10b.
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2924
>
> Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a
> Reviewed-on: https://skia-review.googlesource.com/2924
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I1805a57eef5ebcac203da5989c8539345ecf806f
Reviewed-on: https://skia-review.googlesource.com/2962
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
1834242ec6e3cd62669227d394bc79e1cd66dcfb 04-Oct-2016 Mike Reed <reed@google.com> Revert[4] "replace SkXfermode obj with SkBlendMode enum in paints"

This reverts commit 2cbcd12281ee807214df094964c584c78932e10b.

BUG=skia:

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

Change-Id: I0fa5c58af428f3da8565465d1219a34ef8417d9a
Reviewed-on: https://skia-review.googlesource.com/2924
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
2cbcd12281ee807214df094964c584c78932e10b 03-Oct-2016 Mike Reed <reed@google.com> Revert "Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints"""

This reverts commit I86875511a13497112827cbaed1dbd7639e9e3d10.

legacy (100K) skp failure

Original change's description:
> Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""
>
> This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e.
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2878
>
> Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10
> Reviewed-on: https://skia-review.googlesource.com/2878
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=msarett@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ife6f0cf3a22b3e8cf885a188f7f44e1ff62e06a5
Reviewed-on: https://skia-review.googlesource.com/2881
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
70cdb396eb5ffbbed128b902532e9292b5ec0e9d 03-Oct-2016 Mike Reed <reed@google.com> Revert "Revert "replace SkXfermode obj with SkBlendMode enum in paints""

This reverts commit ce02e7175872abde3721df9e5d3ec0ab8384cd8e.

BUG=skia:

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

Change-Id: I86875511a13497112827cbaed1dbd7639e9e3d10
Reviewed-on: https://skia-review.googlesource.com/2878
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
ce02e7175872abde3721df9e5d3ec0ab8384cd8e 03-Oct-2016 Mike Reed <reed@google.com> Revert "replace SkXfermode obj with SkBlendMode enum in paints"

This reverts commit I4fb489ba6b3f77b458f7e4a99f79c7ad10859135.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> replace SkXfermode obj with SkBlendMode enum in paints
>
> BUG=skia:5814
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714
>
> Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135
> Reviewed-on: https://skia-review.googlesource.com/2714
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=bsalomon@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I3e43f79ef5c1709929663fe63cc1f67cd78270b7
Reviewed-on: https://skia-review.googlesource.com/2871
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
0591897548c8fcb7d53cc94053e01702e58f1ac5 03-Oct-2016 Mike Reed <reed@google.com> replace SkXfermode obj with SkBlendMode enum in paints

BUG=skia:5814

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

Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135
Reviewed-on: https://skia-review.googlesource.com/2714
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkDropShadowImageFilter.cpp
eed6b0e1d865a1f93143c09961debba0aca592ca 23-Sep-2016 brianosman <brianosman@google.com> Change SkSpecialImage::makeSurface and makeTightSurface to take output
properties (color space), bounds, and (optional) alphaType.

We were being pretty inconsistent before. Raster was honoring all
components of the info. GPU was using the supplied color type, but
propagating the source's color space. All call sites were saying N32.

What we want to do is propagate the original device's color space, and
pick a good format from that. Rather than force all the clients to
jump through hoops constructing an SkImageInfo that meets our criteria,
just have them supply the few bits we care about, and do everything else
internally.

This also lets us always use RGBA on GPU, but N32 on raster.

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

Committed: https://skia.googlesource.com/skia/+/53c38087949252d27cde668368a3eeb59cc2eb00
Review-Url: https://codereview.chromium.org/2349373004
/external/skia/src/effects/SkDropShadowImageFilter.cpp
a76554d2ae7f676776c1d472aa433b048f418ea9 23-Sep-2016 brianosman <brianosman@google.com> Revert of Create special surfaces according to original device (not always in N32) (patchset #9 id:160001 of https://codereview.chromium.org/2349373004/ )

Reason for revert:
DM crash and/or TSAN failure

Original issue's description:
> Change SkSpecialImage::makeSurface and makeTightSurface to take output
> properties (color space), bounds, and (optional) alphaType.
>
> We were being pretty inconsistent before. Raster was honoring all
> components of the info. GPU was using the supplied color type, but
> propagating the source's color space. All call sites were saying N32.
>
> What we want to do is propagate the original device's color space, and
> pick a good format from that. Rather than force all the clients to
> jump through hoops constructing an SkImageInfo that meets our criteria,
> just have them supply the few bits we care about, and do everything else
> internally.
>
> This also lets us always use RGBA on GPU, but N32 on raster.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2349373004
>
> Committed: https://skia.googlesource.com/skia/+/53c38087949252d27cde668368a3eeb59cc2eb00

TBR=robertphillips@google.com,reed@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2366723004
/external/skia/src/effects/SkDropShadowImageFilter.cpp
53c38087949252d27cde668368a3eeb59cc2eb00 23-Sep-2016 brianosman <brianosman@google.com> Change SkSpecialImage::makeSurface and makeTightSurface to take output
properties (color space), bounds, and (optional) alphaType.

We were being pretty inconsistent before. Raster was honoring all
components of the info. GPU was using the supplied color type, but
propagating the source's color space. All call sites were saying N32.

What we want to do is propagate the original device's color space, and
pick a good format from that. Rather than force all the clients to
jump through hoops constructing an SkImageInfo that meets our criteria,
just have them supply the few bits we care about, and do everything else
internally.

This also lets us always use RGBA on GPU, but N32 on raster.

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

Review-Url: https://codereview.chromium.org/2349373004
/external/skia/src/effects/SkDropShadowImageFilter.cpp
203a993c77ea146e0a4e7f1e0c079cc79fd09167 11-Jul-2016 jbroman <jbroman@chromium.org> Handle negative scale in SkDropShadowImageFilter::onFilterNodeBounds.

Add unit tests for positive and negative scale factors for the two effects that
apply a Gaussian blur like this: blur and drop-shadow. The last two assertions
fail without the fix in SkDropShadowImageFilter.

BUG=chromium:600821
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114313002

Review-Url: https://codereview.chromium.org/2114313002
/external/skia/src/effects/SkDropShadowImageFilter.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/SkDropShadowImageFilter.cpp
c416912da4840af0c49bd8cdcf00044ed39500f6 06-Apr-2016 robertphillips <robertphillips@google.com> Update DropShadowImageFilter to sk_sp

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1861843002
/external/skia/src/effects/SkDropShadowImageFilter.cpp
6e7025ab13dfc4f0037233e67b4b8e18d6dfd1e1 04-Apr-2016 robertphillips <robertphillips@google.com> Update SkBlurImageFilter to sk_sp

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1852743002
/external/skia/src/effects/SkDropShadowImageFilter.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/SkDropShadowImageFilter.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/SkDropShadowImageFilter.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/SkDropShadowImageFilter.cpp
0a291c7b7eea1807bd58bdaa60c258fd0ebeb257 23-Mar-2016 robertphillips <robertphillips@google.com> Switch SkDropShaderImageFilter over to new onFilterImage interface

TBR=bsalomon@google.com

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

Review URL: https://codereview.chromium.org/1784863003
/external/skia/src/effects/SkDropShadowImageFilter.cpp
d053ce9c54d4e5937a142278359e5a4cde18095e 22-Mar-2016 reed <reed@google.com> Reland of [2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (patchset #1 id:1 of https://codereview.chromium.org/1821103004/ )

Reason for revert:
guard has now landed in chrome

Original issue's description:
> Revert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (patchset #3 id:40001 of https://codereview.chromium.org/1825073002/ )
>
> Reason for revert:
> CreateModeFilter not compiling
>
> Original issue's description:
> > Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )"
> >
> > Fixed legacy withColorFilter to call new(er) make method
> >
> > This reverts commit 1eb81db650d31f50be67b12d60c4f9e7dd08432f.
> >
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825073002
> >
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/4c9776b046dd5e9e46e2d1ce35154855c8fcb381
>
> TBR=
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d6889293dd0942f27f9593f679722c956831f2c4

TBR=
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review URL: https://codereview.chromium.org/1827433002
/external/skia/src/effects/SkDropShadowImageFilter.cpp
d6889293dd0942f27f9593f679722c956831f2c4 22-Mar-2016 reed <reed@google.com> Revert of Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (patchset #3 id:40001 of https://codereview.chromium.org/1825073002/ )

Reason for revert:
CreateModeFilter not compiling

Original issue's description:
> Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )"
>
> Fixed legacy withColorFilter to call new(er) make method
>
> This reverts commit 1eb81db650d31f50be67b12d60c4f9e7dd08432f.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1825073002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/4c9776b046dd5e9e46e2d1ce35154855c8fcb381

TBR=
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1821103004
/external/skia/src/effects/SkDropShadowImageFilter.cpp
4c9776b046dd5e9e46e2d1ce35154855c8fcb381 22-Mar-2016 reed <reed@google.com> Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )"

Fixed legacy withColorFilter to call new(er) make method

This reverts commit 1eb81db650d31f50be67b12d60c4f9e7dd08432f.

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

TBR=

Review URL: https://codereview.chromium.org/1825073002
/external/skia/src/effects/SkDropShadowImageFilter.cpp
1eb81db650d31f50be67b12d60c4f9e7dd08432f 22-Mar-2016 reed <reed@google.com> Revert of switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.org/1822623002/ )

Reason for revert:
need to fix unguarded makeWithFilter

Original issue's description:
> switch colorfilters to sk_sp
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822623002
>
> Committed: https://skia.googlesource.com/skia/+/f809d7687a4fb7b88b651b046da2bc0035d6aa09

TBR=fmalita@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1820303002
/external/skia/src/effects/SkDropShadowImageFilter.cpp
f809d7687a4fb7b88b651b046da2bc0035d6aa09 22-Mar-2016 reed <reed@google.com> switch colorfilters to sk_sp

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

Review URL: https://codereview.chromium.org/1822623002
/external/skia/src/effects/SkDropShadowImageFilter.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/SkDropShadowImageFilter.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/SkDropShadowImageFilter.cpp
afec27f13b28d900232cb1825c63cab2d6e4e103 16-Feb-2016 senorblanco <senorblanco@chromium.org> Image filters: change applyCropRect() to take a src rect.

Instead of taking the source bitmap and offset, we simply take the
source rect bounds, and make the caller responsible for computing it.

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

Review URL: https://codereview.chromium.org/1702683002
/external/skia/src/effects/SkDropShadowImageFilter.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/SkDropShadowImageFilter.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/SkDropShadowImageFilter.cpp
96fcdcc219d2a0d3579719b84b28bede76efba64 27-Aug-2015 halcanary <halcanary@google.com> Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
/external/skia/src/effects/SkDropShadowImageFilter.cpp
99fe82260633fcf5d92cca38d12ef0937ecca61c 20-Aug-2015 bungeman <bungeman@google.com> Use static_assert instead of SK_COMPILE_ASSERT.

Now that static_assert is allowed, there is no need to use a non-
standard compile time assertion

Review URL: https://codereview.chromium.org/1306443004
/external/skia/src/effects/SkDropShadowImageFilter.cpp
24e06d5244ae96e440410e1d76e039983b2efac9 18-Mar-2015 senorblanco <senorblanco@chromium.org> Remove uniqueID from all filter serialization.

(This is essentially a revert of https://codereview.chromium.org/503833002/.)

This was necessary back when SkPaint was flattened even for in-process use. Now that we only flatten SkPaint for cross-process use, there's no need to serialize UniqueIDs.

Note: SkDropShadowImageFilter is being constructed with a croprect and UniqueID (of 0) in Blink. I've made the uniqueID param default to 0 temporarily, until this rolls in and Blink can be changed. (Blink can't be changed first, since unlike the other filters, there's no constructor that takes a cropRect but not a uniqueID.)

BUG=skia:

Review URL: https://codereview.chromium.org/1019493002
/external/skia/src/effects/SkDropShadowImageFilter.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/SkDropShadowImageFilter.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/SkDropShadowImageFilter.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/SkDropShadowImageFilter.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/SkDropShadowImageFilter.cpp
234f036b3e731e06e616c5291157d3bb4fbfdee2 23-Oct-2014 sugoi <sugoi@chromium.org> Adding an option to render only the shadow in SkDropShadowImageFilter

This is basically how blink uses the filter. Currently, I can't use it for "ShadowOnly" mode with the filter at all, but instead of copying the code and risking to have the codepaths diverge, I'm simply going to add the option here.

BUG=skia:

Review URL: https://codereview.chromium.org/646213004
/external/skia/src/effects/SkDropShadowImageFilter.cpp
5e5f948b6b363dbfc8c076d8ff0c6b8e9ea99958 26-Aug-2014 senorblanco <senorblanco@chromium.org> Reimplement deserialization of SkImageFilter's uniqueID.

9fa60d ("Simplify flattening to just write enough ... ") simplified just
a tad too much. In particular, it disabled deserialization of
SkImageFilter's uniqueID, which in turn caused the failure of
SkImageFilter's cache, which caused a large regression in Chrome's SVG
filter performance.

The medium-term fix is to switch to the new SkRecordDraw SkPicture
backend, which will make the unique IDs unnecessary.

This change is an "in case of emergecy" CL, in the event that there are
problems switching on the new backend in Chrome. For that reason, it's
minimalist: only the filters used by Chrome are modified, and whitespace
changes are kept to a minimum. In this way, it should be easy to revert
once the new backend goes in.

R=reed@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/503833002
/external/skia/src/effects/SkDropShadowImageFilter.cpp
1150a6d151571fb6ee816dadec844ae7ab53948a 25-Aug-2014 senorblanco <senorblanco@chromium.org> Fix recursive computation of filter bounds for drop shadow,
morphology, blur.

[Reland with fixed tests.]

Because we're computing "backwards" from a clip rect of destination
pixels to be filled to the required source pixels, we should use tail
recursion rather than head recursion in onFilterBounds().

This actually only makes a difference for drop-shadow, where
the computation is non-commutative. Blur and morphology commute, but I
moved them to tail recursion anyway for clarity (so all onFilterBounds
use tail recursion).

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/481273005
/external/skia/src/effects/SkDropShadowImageFilter.cpp
38cb688bd0e17021bb140bbc15ac1a7b8f182939 25-Aug-2014 djsollen <djsollen@google.com> Revert of Fix recursive computation of filter bounds for drop shadow, (patchset #1 of https://codereview.chromium.org/481273005/)

Reason for revert:
This CL is currently breaking the Win7 and Win8 bots on some of the new tests (in DM).

Original issue's description:
> Fix recursive computation of filter bounds for drop shadow,
> morphology, blur.
>
> Because we're computing "backwards" from a clip rect of destination
> pixels to be filled to the required source pixels, we should use tail
> recursion rather than head recursion in onFilterBounds().
>
> This actually only makes a difference for drop-shadow, where
> the computation is non-commutative. Blur and morphology commute, but I
> moved them to tail recursion anyway for clarity (so all onFilterBounds
> use tail recursion).
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/28648fe4a69b0cee8df42b5966e4e645c3aabefb

R=bsalomon@google.com, senorblanco@chromium.org
TBR=bsalomon@google.com, senorblanco@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/504773003
/external/skia/src/effects/SkDropShadowImageFilter.cpp
28648fe4a69b0cee8df42b5966e4e645c3aabefb 25-Aug-2014 senorblanco <senorblanco@chromium.org> Fix recursive computation of filter bounds for drop shadow,
morphology, blur.

Because we're computing "backwards" from a clip rect of destination
pixels to be filled to the required source pixels, we should use tail
recursion rather than head recursion in onFilterBounds().

This actually only makes a difference for drop-shadow, where
the computation is non-commutative. Blur and morphology commute, but I
moved them to tail recursion anyway for clarity (so all onFilterBounds
use tail recursion).

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/481273005
/external/skia/src/effects/SkDropShadowImageFilter.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/SkDropShadowImageFilter.cpp
bc9845bb60cd883e7ddabb21f04997602145a1ad 22-Jul-2014 senorblanco <senorblanco@chromium.org> Remove the single-sigma version of SkDropShadowImageFilter::Create().

It's no longer used in Chrome.

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/407203002
/external/skia/src/effects/SkDropShadowImageFilter.cpp
9ea3d57fde28a5fe4487a111dc3dd49418235e5e 08-Jul-2014 senorblanco <senorblanco@chromium.org> Clean up SkImageFilter constructors.

Now that all creation of SkImageFilters goes through
factory Create() methods, there's no real reason for the
convenience constructors. Some SkImageFilter subclasses
which actually have zero DAG-able inputs were passing NULL
to the superclass constructor. This actually means 1 input,
with a NULL value, not zero inputs. This becomes more
relevant for the upcoming cache infrastructure, where this
indicates that the filter will use its src input, where in
fact some of these filters do not (they are image generators
only).

Limiting SkImageFilter to a single constructor resolves this
ambiguity.

Along the way, I removed all of the default parameters to
the constructors, since the Create methods always call them
with the full argument list.

BUG=skia:
R=reed@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/376953003
/external/skia/src/effects/SkDropShadowImageFilter.cpp
ba31f1d341bac57ca76a75d67f64434b4b371dc6 07-May-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Some small cleanups for image filter code.

Use the 2-param flavour of mapVector instead of the 3-param, where possible.
Add an SkMatrixImageFilter test case to the tiling unit test.

R=junov@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14630 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
f7efa502d62af80bd15b03e1131603fb6577c3df 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement intra-frame cacheing in image filters.

When image filters are processed within Skia, they simply do
a blind recursion. This has the side-effect of turning the
DAG into a tree. I.e., nodes visited more than once during
the traversal will be processed more than once.

This change implements a very simple cacheing scheme: a
cache is created before traversing the DAG, and handed
into the processing traversal. Before recursing into a child
in SkImageFilter::filterImage(), the cache is checked for a
hit, and early-out is performed. Otherwise, the node is
processed, and its result bitmap and location (offset) are
cached, but only if it contains two or more children and
thus will be visited again during the traversal.

Currently, the child count is approximated with the
refcount. This is good enough in most cases (and exactly
correct for the Chrome use case). We could add an exact
child count to the image filter, but this will require
violating the immutability of image filters slightly in
order to bump the child count as nodes are connected. I
leave it up to the reviewer to decide which is better.

R=reed@google.com

Author: senorblanco@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14160 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
118252962f89a80db661a0544f1bd61cbaab6321 14-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement support for expanding crop rects in image filters

NOTE: this patch set is based on https://codereview.chromium.org/189913021/,
and needs that patch to land first.

Until now, crop rects in Skia have only been able to reduce
the size of the destination bounds, but not expand them.
SVG semantics require the latter as well. The heart of
the change is in applyCropRect(), which now assigns each
edge, instead of doing an intersection with the crop rect.

In order to support this (and still work well with tiled
drawing) we need to clip the resulting crop rect to the
clipping region of the filters. This uses the Context struct
previously landed from https://codereview.chromium.org/189913021/.

Many of the pixel loops are not yet ready to handle a
destination rect larger than the source rect. So we provide
a convenience version of applyCropRect() which creates an
offscreen and pads it out with transparent black. Once the
pixel loops and shaders have been fixed to support larger
destination bounds, they should be switched back to the
non-drawing version of applyCropRect().

BUG=skia:
R=bsalomon@google.com, reed@google.com

Committed: https://code.google.com/p/skia/source/detail?r=13805

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13809 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
29089179a66c06ef70da387111af75970f04ed53 14-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Implement support for expanding crop rects in image filters"

Breaking ImageFilterTests unit test.

TBR=bsalomon@google.com
BUG=skia:

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13806 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
0ef0501baf615149d6d84398d7594cd89f6e928d 14-Mar-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement support for expanding crop rects in image filters

NOTE: this patch set is based on https://codereview.chromium.org/189913021/,
and needs that patch to land first.

Until now, crop rects in Skia have only been able to reduce
the size of the destination bounds, but not expand them.
SVG semantics require the latter as well. The heart of
the change is in applyCropRect(), which now assigns each
edge, instead of doing an intersection with the crop rect.

In order to support this (and still work well with tiled
drawing) we need to clip the resulting crop rect to the
clipping region of the filters. This uses the Context struct
previously landed from https://codereview.chromium.org/189913021/.

Many of the pixel loops are not yet ready to handle a
destination rect larger than the source rect. So we provide
a convenience version of applyCropRect() which creates an
offscreen and pads it out with transparent black. Once the
pixel loops and shaders have been fixed to support larger
destination bounds, they should be switched back to the
non-drawing version of applyCropRect().

BUG=skia:
R=bsalomon@google.com, reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13805 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.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/SkDropShadowImageFilter.cpp
cac5fd597f6e2495f50aaa6bcbe3dadc56f0b977 10-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Factory methods for heap-allocated SkImageFilter objects.

This is part of an effort to ensure that all SkPaint effects can only be
allocated on the heap.

This patch makes the constructors of SkImageFilter and its subclasses non-public
and instead provides factory methods for creating these objects on the heap. We
temporarily keep constructor of publicly visible classes public behind a flag.

BUG=skia:2187
R=scroggo@google.com, mtklein@chromium.org, reed@google.com, senorblanco@google.com, senorblanco@chromium.org, bsalomon@google.com, sugoi@chromium.org, zork@chromium.org

Author: dominikg@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13718 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.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/SkDropShadowImageFilter.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/SkDropShadowImageFilter.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/SkDropShadowImageFilter.cpp
74bdde0d50f45c5848381ec207c1464b70a48ee3 28-Jan-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Clamp negative sigma to 0 in SkDropShadowImageFilter.

This can occur when the matrix includes a perspective transform.

BUG=skia:2094
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13220 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
410be679754106b5ecbf3b5744b0ef51674cb420 28-Jan-2014 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@13214 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
336d1d759590d9bedcbc5a96d0fff79861cf8f7a 27-Jan-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement a computeFastBounds() traversal for SkImageFilter.

This allows for correct culling of primitives which have image filters applied.

R=reed@google.com
BUG=skia:

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13207 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
2bfe36b68d11d05c114a33d62f9f45427e316916 20-Jan-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Apply the CTM to filter parameters for SkBlurImageFilter, SkDropShadowImageFilter, SkDisplacementMapEffect and SkMorphologyImageFilter. I had resisted this (and may later put in an assert that the CTM contains no rotation, skew or perspective), but it just makes the filters play better with Skia generally.

This revealed that the displacement map was not handling clipping or upstream cropping at all well (the color would "swim" through the displacement at the edge of the clip rect). Fixed by passing through the correct offsets to the bitmap accesses in both raster and GPU paths. Same for morphology.

R=sugoi@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13127 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.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/SkDropShadowImageFilter.cpp
cd3b15ca6364a04b0eeeb4f89c7daa8aefe854c8 04-Dec-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fixed bad bitmap size crashes

There were 2 issues :
1 ) If the size of an SkBitmap's underlying SkPixelRef's alocated memory is too small to fit the bitmap, then the deserialization will now check this and set an error appropriately.
2 ) If a device fails to allocate its pixels, the device will be deleted and NULL will be returned to avoid attempting to draw on a bad device.

BUG=
R=senorblanco@chromium.org, reed@google.com, sugoi@google.com, halcanary@google.com, mtklein@google.com

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12484 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
d6bab0238655dbab24dfe92bd0b16b464310a8c7 02-Dec-2013 rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reverting r12427

git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
5b39f5ba9c339d1e4dae391fee9ec1396feec180 02-Dec-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
d8f82a4c44b844fed98d3ecc0072e0626b06bb37 26-Nov-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Enhance SkDropShadowImageFilter to support separate X & Y sigmas, and crop rect. This required a new flavour of the constructor.

This is driven by the feDropShadow filter effect in SVG, which unlike the shorthand version accepts separate X & Y sigmas.

Covered by new GM dropshadowimagefilter.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12401 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.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/SkDropShadowImageFilter.cpp
c0b7e10c6a68f59e1653e6c18e6bc954b3c3f0cf 23-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Initial error handling code

I made it as simple as possible. The impact seems minimal and it should do what's necessary to make this code secure.

BUG=

Committed: http://code.google.com/p/skia/source/detail?r=11247

R=reed@google.com, scroggo@google.com, djsollen@google.com, sugoi@google.com, bsalomon@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11922 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
24ddde97581624777feebc9e95ae558282f95d4c 16-Sep-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert 11247, 11250, 11251, 11257, and 11279 to unblock DEPS roll (https://codereview.chromium.org/24159002/)

11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11257 Canary build fix - https://codereview.chromium.org/23532068
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015



git-svn-id: http://skia.googlecode.com/svn/trunk@11288 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
ba6e954140e45e251d67934ed6ad752149fcf72f 16-Sep-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert the revert of 11247, 11250, 11251 and 11279 (Chrome already relies on changes in r11247)



git-svn-id: http://skia.googlecode.com/svn/trunk@11287 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
478884f7d3b8c7be8b62f3fa2b79192f411c3fec 16-Sep-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert 11247, 11250, 11251 and 11279 to unblock DEPS roll (https://codereview.chromium.org/24159002/)

11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015



git-svn-id: http://skia.googlecode.com/svn/trunk@11285 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
5792cded61a7302f32bd0f4aeda51a9b2f1d00f6 13-Sep-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Initial error handling code

I made it as simple as possible. The impact seems minimal and it should do what's necessary to make this code secure.

BUG=
R=reed@google.com, scroggo@google.com, djsollen@google.com, sugoi@google.com, bsalomon@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11247 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
1f2f338e23789f3eef168dcbd8171a28820ba6c1 29-Aug-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Split SkDevice into SkBaseDevice and SkBitmapDevice

https://codereview.chromium.org/22978012/



git-svn-id: http://skia.googlecode.com/svn/trunk@10995 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
9b051a375ba6d6b61cea98f35834cd032aaa5347 20-Aug-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get Chromium ready.



git-svn-id: http://skia.googlecode.com/svn/trunk@10835 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
3055b700189afdd02486ed8f2279cea1d8897243 20-Aug-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Split SkDevice out of SkBitmapDevice

https://codereview.chromium.org/22978012/



git-svn-id: http://skia.googlecode.com/svn/trunk@10830 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
d55e357a8e276d1f1cd6231d57dda339a2beb76f 08-Aug-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@10634 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
f44fcdca01722959c3be335f44e88b59dbb33a10 07-Aug-2013 junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Upstreaming DropShadowImageFilter into skia, from Blink

GM imagefiltersbase will need rebaselining after this change

R=senorblanco@chromium.org

Committed: https://code.google.com/p/skia/source/detail?r=10583

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10626 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
9c8b4eaf280630438d32fee8acd04edad2414d54 06-Aug-2013 jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reverting r10583: Upstreaming DropShadowImageFilter into skia, from Blink


git-svn-id: http://skia.googlecode.com/svn/trunk@10587 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkDropShadowImageFilter.cpp
d8e4024719aeb49564880741faf48360ffcddf3b 06-Aug-2013 junov@chromium.org <junov@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Upstreaming DropShadowImageFilter into skia, from Blink

GM imagefiltersbase will need rebaselining after this change

R=senorblanco@chromium.org

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

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