History log of /external/skia/src/effects/SkPictureImageFilter.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5a0f3455320f5591c196844ff8a89b71a7d9aa56 19-Jan-2018 Mike Reed <reed@google.com> remove code from old picture serial guard

Bug: skia:
Change-Id: If50a76c7f570d6e88f6583d381d0354568398039
Reviewed-on: https://skia-review.googlesource.com/97060
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkPictureImageFilter.cpp
d1c65d6708de536a5971575809d7172fa4f54b37 03-Jan-2018 Mike Reed <reed@google.com> remove unneeded readbuffer flags

- buffers are always 'cross-process'
- readbuffer is always validating

Bug:796107
Change-Id: I59614e9c29490c0b029c60d2aafe2806671bc9e1
Reviewed-on: https://skia-review.googlesource.com/90560
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkPictureImageFilter.cpp
48723156c597ec4d7be8e0648548ff27ef6c4e02 10-Nov-2017 Mike Reed <reed@google.com> remove legacy code for resolution

Bug: skia:
Change-Id: I6909325d4ee51140ec0edb47682de18617c23cc7
Reviewed-on: https://skia-review.googlesource.com/70100
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
/external/skia/src/effects/SkPictureImageFilter.cpp
77e487dfc005be66346ebf3e33d3ec394de4cc36 09-Nov-2017 Mike Reed <reed@google.com> Revert "Revert "Remove MakeForLocalSpace since picture image is sufficient""

This reverts commit fc45998242b6e95ff610fd2c4edcf72c10e536ab.

Reason for revert: google3 updated (I think)

Original change's description:
> Revert "Remove MakeForLocalSpace since picture image is sufficient"
>
> This reverts commit 0d8766c84c80537f323947089cc196c3cca106f4.
>
> Reason for revert: broke google3
>
> Original change's description:
> > Remove MakeForLocalSpace since picture image is sufficient
> >
> > Bug: skia:
> > Change-Id: If38e702c418e93141311490edf447d1f09ed4434
> > Reviewed-on: https://skia-review.googlesource.com/68640
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
>
> TBR=robertphillips@google.com,fmalita@chromium.org,reed@google.com
>
> Change-Id: I3dec3d2c704e02b4db5977c27cc3e6d9f1c68ed5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/69500
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=robertphillips@google.com,fmalita@chromium.org,reed@google.com

Change-Id: I5751fa637d280f361dea0f248a43c1f7e9bd8bdc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/69661
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkPictureImageFilter.cpp
fc45998242b6e95ff610fd2c4edcf72c10e536ab 09-Nov-2017 Mike Reed <reed@google.com> Revert "Remove MakeForLocalSpace since picture image is sufficient"

This reverts commit 0d8766c84c80537f323947089cc196c3cca106f4.

Reason for revert: broke google3

Original change's description:
> Remove MakeForLocalSpace since picture image is sufficient
>
> Bug: skia:
> Change-Id: If38e702c418e93141311490edf447d1f09ed4434
> Reviewed-on: https://skia-review.googlesource.com/68640
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=robertphillips@google.com,fmalita@chromium.org,reed@google.com

Change-Id: I3dec3d2c704e02b4db5977c27cc3e6d9f1c68ed5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/69500
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/effects/SkPictureImageFilter.cpp
0d8766c84c80537f323947089cc196c3cca106f4 09-Nov-2017 Mike Reed <reed@google.com> Remove MakeForLocalSpace since picture image is sufficient

Bug: skia:
Change-Id: If38e702c418e93141311490edf447d1f09ed4434
Reviewed-on: https://skia-review.googlesource.com/68640
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
/external/skia/src/effects/SkPictureImageFilter.cpp
63fd760a37905c45d26fc3d49cac261fad1b4808 09-Oct-2017 Ben Wagner <bungeman@google.com> Remove trailing whitespace.

Also adds a presubmit to prevent adding trailing whitespace to source
code in the future.

Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6
Reviewed-on: https://skia-review.googlesource.com/57380
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
/external/skia/src/effects/SkPictureImageFilter.cpp
604f0d54a8b22e6d1ec7581fcb68191aa0ff03fc 13-Jul-2017 Florin Malita <fmalita@chromium.org> Avoid unneeded picture shader color space transforms

Also update SkPictureImageFilter to use SkColorSpace::Equals instead of
direct comparison.

Change-Id: I434cd6d1afcb869d2a56601b72edf56d207d9868
Reviewed-on: https://skia-review.googlesource.com/23201
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/src/effects/SkPictureImageFilter.cpp
a252c661d686393207b133cccbc6211620bf7772 10-Jul-2017 Florin Malita <fmalita@chromium.org> Avoid unneeded SkPictureImageFilter color space transforms

Change-Id: Ib5391b4bc315cf709ba6276a79357ce43ee9427e
Reviewed-on: https://skia-review.googlesource.com/22062
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/src/effects/SkPictureImageFilter.cpp
70bc94f273224ed0755ae11dc479c57ff37e0436 08-Jun-2017 Mike Reed <reed@google.com> Bump min picture to 7+ months ago

Delete lots of support code, including need for SkXfermode objects
which are no longer used anywhere else.

Bug: skia:
Change-Id: Id6b7ef0f529691041ff2b206c35e336e8a4c974d
Reviewed-on: https://skia-review.googlesource.com/19059
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/effects/SkPictureImageFilter.cpp
eb0e60f1ec2498f5cdba96708f25bd7929201aff 31-May-2017 Christopher Cameron <ccameron@chromium.org> Ensure SkPictureImageFilter::onFilterImage doesn't double-convert color

Consider the following sequence of events:
1. SkPictureImageFilter::onFilterImage creates a local canvas, wraps it
in a SkColorSpaceXformCanvas, and passed to...
2. SkPictureImageFilter::drawPictureAtLocalResolution creates a local
canvas (localCanvas) wraps that in a SkColorSpaceXformCanvas, draws
the picture to it, doing sRGB->fColorSpace conversion
3. We then call makeImageSnapshot to produce a SkSpecialImage, localImg,
which is not tagged with any color space.
4. When the draw that localImg to the passed-in SkColorSpaceXformCanvas,
which then performs sRGB->fColorSpace conversion a second time.

We now have performed color conversion twice.

One fix for this would be to have the image produced by the call to
localSurface->makeImageSnapshot() be tagged with fColorSpace. This is
somewhat involved.

The less invasive fix is to remove the SkColorSpaceXformCanvas in
SkPictureImageFilter::onFilterImage, and push it down into the two
branches, SkPictureImageFilter::drawPictureAtLocalResolution and
SkPictureImageFilter::drawPictureAtDeviceResolution.

BUG=728332

Change-Id: If2aa32e18ad660b3e361f1d90845eeb8555fe404
Reviewed-on: https://skia-review.googlesource.com/18282
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Christopher Cameron <ccameron@google.com>
Commit-Queue: Christopher Cameron <ccameron@google.com>
/external/skia/src/effects/SkPictureImageFilter.cpp
92eaad6d508aafa670b8409ea697ff605ec4306a 23-May-2017 Christopher Cameron <ccameron@chromium.org> Make SkPictureImageFilter::drawPictureAtLocalResolution use color xform

This creates a temporary SkCanvas, which needs to be wrapped in a color
xform canvas to behave appropriately.

bug:725372
Change-Id: I572437770f271b7fb813519c0966cd3177b9eeaf
Reviewed-on: https://skia-review.googlesource.com/17658
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Christopher Cameron <ccameron@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
/external/skia/src/effects/SkPictureImageFilter.cpp
e22a6a29e2e5664ee907f1abccf615a900cbcfad 12-Apr-2017 Matt Sarett <msarett@google.com> SkPictureImageFilter::onMakeColorSpace()

Improves gm/recordopts.
Does not break gm/pictureimagefilter or gm/fastfilterbounds.

Bug: skia:
Change-Id: I67c8f02a9548bf751350dfa3c7029dd59b8a2d1d
Reviewed-on: https://skia-review.googlesource.com/13276
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
/external/skia/src/effects/SkPictureImageFilter.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/SkPictureImageFilter.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/SkPictureImageFilter.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/SkPictureImageFilter.cpp
a31312cddd51c896b34c5c3382bcf6c50632d70b 12-May-2016 ericrk <ericrk@chromium.org> SkPictureImageFilter - clear local canvas before use

In SkPictureImageFilter::onFilterImage, we may create two new surfaces,
one for our final output, and one for a local resolution intermediate.

We clear the final output surface before use, removing any previous
content, however we do not do the same for the local surface. This can
lead to content being incorrectly layered on top of previous content
when we go down this path.

This change adds logic to clear the local surface as well.

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

Review-Url: https://codereview.chromium.org/1969193002
/external/skia/src/effects/SkPictureImageFilter.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/SkPictureImageFilter.cpp
0b7e5a13bd371126b5d5794f3f9d2930c35ce05f 13-Apr-2016 robertphillips <robertphillips@google.com> Make SkSpecialSurfaces always use kUnknown for their pixel geometry

This now matches how the SkDevices were being created by the device proxy and prevents LCD text from being inadvertently applied.

BUG=602555

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

Review URL: https://codereview.chromium.org/1878143004
/external/skia/src/effects/SkPictureImageFilter.cpp
fef28606d2c51be627be3a656581882e31945c03 11-Apr-2016 robertphillips <robertphillips@google.com> Switch SkPictureImageFilter over to new onFilterImage interface

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

TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1779743002
/external/skia/src/effects/SkPictureImageFilter.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/SkPictureImageFilter.cpp
372177ee115d46dfb5bfb881a408e6c37ae83678 30-Mar-2016 robertphillips <robertphillips@google.com> Switch SkLocalMatrixImageFilter and SkPaintImageFilter over to sk_sp

TBR=reed@google.com

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

Committed: https://skia.googlesource.com/skia/+/a33cf07a2273315363c0b6fb5d3ce811742f5a85

Review URL: https://codereview.chromium.org/1842793002
/external/skia/src/effects/SkPictureImageFilter.cpp
890579051d4096a8f769eadb9cde3f931d7abd7c 30-Mar-2016 djsollen <djsollen@google.com> Revert of Switch SkLocalMatrixImageFilter and SkPaintImageFilter over to sk_sp (patchset #6 id:100001 of https://codereview.chromium.org/1842793002/ )

Reason for revert:
This CL is causing the autoroll into Chromium & google3 to fail.

Original issue's description:
> Switch SkLocalMatrixImageFilter and SkPaintImageFilter over to sk_sp
>
> TBR=reed@google.com
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842793002
>
> Committed: https://skia.googlesource.com/skia/+/a33cf07a2273315363c0b6fb5d3ce811742f5a85

TBR=fmalita@chromium.org,reed@google.com,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1837293003
/external/skia/src/effects/SkPictureImageFilter.cpp
a33cf07a2273315363c0b6fb5d3ce811742f5a85 29-Mar-2016 robertphillips <robertphillips@google.com> Switch SkLocalMatrixImageFilter and SkPaintImageFilter over to sk_sp

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1842793002
/external/skia/src/effects/SkPictureImageFilter.cpp
9d524f22bfde5dc3dc8f48e1be39bdebd3bb0304 29-Mar-2016 halcanary <halcanary@google.com> Style bikeshed - remove extraneous whitespace

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

Review URL: https://codereview.chromium.org/1842753002
/external/skia/src/effects/SkPictureImageFilter.cpp
5ff17b13524eea03e4b672ee3b3a49b649dd09fb 28-Mar-2016 robertphillips <robertphillips@google.com> Swap SkPictureImageFilter's factories over to smart pointers

A trial balloon before converting the rest

This requires https://codereview.chromium.org/1836443003/ (add SK_SUPPORT_LEGACY_IMAGEFILTER_PTR flag for future skia CL) to land in Chromium first
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1831323003

Review URL: https://codereview.chromium.org/1831323003
/external/skia/src/effects/SkPictureImageFilter.cpp
ca2622ba051829fed5f30facd74c5b41cd4b931c 18-Mar-2016 reed <reed@google.com> return pictures as sk_sp

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

Review URL: https://codereview.chromium.org/1811703002
/external/skia/src/effects/SkPictureImageFilter.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/SkPictureImageFilter.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/SkPictureImageFilter.cpp
efbffedd68636e94d4379e84a2585bce80f6fb8f 22-Jun-2015 robertphillips <robertphillips@google.com> Clean up usage of SkSurfaceProps

This CL continues cleaning up Skia's usage of SkSurfaceProps. It:

Removes the duplicate SkSurfaceProps object from SkImageFilter::Proxy.

Removes a dispreferred ctor from SkCanvas

Removes the initForRootLayer entry point from SkDevice (since the root device and the canvas should always have the same pixel geometry now).

Review URL: https://codereview.chromium.org/1201983006
/external/skia/src/effects/SkPictureImageFilter.cpp
446ee67fda73b11281b8e28a68edec811347c0c5 16-Jun-2015 hendrikw <hendrikw@chromium.org> skia: Add runtime option to disable picture IO security precautions

Replaced the compile time file IO security setting with a runtime setting.

Unfortunately the setting is global.

Review URL: https://codereview.chromium.org/1183853003
/external/skia/src/effects/SkPictureImageFilter.cpp
2c55d7b7f3c2c834085d019bf6b1519b315c8aa1 09-Jun-2015 reed <reed@google.com> remove subclassing from ImageFilter::Proxy

BUG=skia:

Review URL: https://codereview.chromium.org/1172693002
/external/skia/src/effects/SkPictureImageFilter.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/SkPictureImageFilter.cpp
93a1215fe0ab007ce941c721f1fd3e9dcb5d4754 16-Mar-2015 reed <reed@google.com> SkPaint::FilterLevel -> SkFilterQuality

clone (+rebase) of https://codereview.chromium.org/1009183002/

BUG=skia:
TBR=scroggo@google.com

Review URL: https://codereview.chromium.org/1014533004
/external/skia/src/effects/SkPictureImageFilter.cpp
c4bd39c903cc5da16f50d711063b01723b59281c 06-Jan-2015 robertphillips <robertphillips@google.com> Require explicit disabling of cross process pictureimagefilters

This is to allow capturing .skp files with their pictureimagefilters intact.

This is a companion to https://codereview.chromium.org/810933004/ (Provide a way of allowing cross process pictureimagefilters).

Review URL: https://codereview.chromium.org/834673006
/external/skia/src/effects/SkPictureImageFilter.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/SkPictureImageFilter.cpp
f3c78ccf5694d22d2e4a7061a80399a7e69b59db 09-Dec-2014 junov <junov@chromium.org> Adding an option for pixelated rendering in SkPictureImageFilter

BUG=skia:3209

Review URL: https://codereview.chromium.org/787073003
/external/skia/src/effects/SkPictureImageFilter.cpp
5234075b1c6bcada4ad17ed5a83bfcb53df66b7f 02-Dec-2014 Justin Novosad <junov@chromium.org> Adding a PictureResolution option to SkPictureImageFilter

This change adds an option to SkPictureImageFilter to make it
rasterize SkPicture in a resolution that matches the local coordinate
space (equivalent to the record-time device space).

BUG=skia:3176
R=reed@google.com, senorblanco@chromium.org

Review URL: https://codereview.chromium.org/753073010
/external/skia/src/effects/SkPictureImageFilter.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/SkPictureImageFilter.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/SkPictureImageFilter.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/SkPictureImageFilter.cpp
2d97bc139a7de5813468bd3dbfd0037351ae5606 20-Nov-2014 fmalita <fmalita@chromium.org> Disable LCD text explicitly in SkPictureImageFilter::onFilterImage()

As an intermediate fix for
https://code.google.com/p/skia/issues/detail?id=3142, we can use a
non-public SkCanvas constructor and force-disable LCD text.

BUG=skia:3142
R=reed@google.com,senorblanco@google.com

Review URL: https://codereview.chromium.org/725243004
/external/skia/src/effects/SkPictureImageFilter.cpp
b07a94f1cba3976596ae1a7f23d8c2043ba353f3 19-Nov-2014 reed <reed@chromium.org> add roundOut that returns its result

BUG=skia:

Review URL: https://codereview.chromium.org/742663002
/external/skia/src/effects/SkPictureImageFilter.cpp
8f3937d9fcb28018ec14db6697d41b645716d589 29-Oct-2014 senorblanco <senorblanco@chromium.org> Fix bounds computation of all 0-input filters.

The SkRectShaderImageFilter had the same bug as previously fixed for
SkBitmapSource and SkPictureImageFilter. Rather than copy-and-paste
the implementation, this change makes all filters with 0 inputs return
their source bounds, instead of returning false.

BUG=427251

Review URL: https://codereview.chromium.org/681643003
/external/skia/src/effects/SkPictureImageFilter.cpp
d0f1969100a0c00f41166f2fe616de56d44f4a59 28-Oct-2014 hcm <hcm@google.com> Revert of Fix bounds computation of all 0-input filters. (patchset #2 id:20001 of https://codereview.chromium.org/681643003/)

Reason for revert:
try again

Original issue's description:
> Fix bounds computation of all 0-input filters.
>
> The SkRectShaderImageFilter had the same bug as previously fixed for
> SkBitmapSource and SkPictureImageFilter. Rather than copy-and-paste
> the implementation, this change makes all filters with 0 inputs return
> their source bounds, instead of returning false.
>
> BUG=427251
>
> Committed: https://skia.googlesource.com/skia/+/ba036cc82b5a543a13cafd11a19ba0e3087fca38

TBR=bsalomon@google.com,senorblanco@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=427251

Review URL: https://codereview.chromium.org/678273002
/external/skia/src/effects/SkPictureImageFilter.cpp
ba036cc82b5a543a13cafd11a19ba0e3087fca38 27-Oct-2014 senorblanco <senorblanco@chromium.org> Fix bounds computation of all 0-input filters.

The SkRectShaderImageFilter had the same bug as previously fixed for
SkBitmapSource and SkPictureImageFilter. Rather than copy-and-paste
the implementation, this change makes all filters with 0 inputs return
their source bounds, instead of returning false.

BUG=427251

Review URL: https://codereview.chromium.org/681643003
/external/skia/src/effects/SkPictureImageFilter.cpp
49f085dddff10473b6ebf832a974288300224e60 05-Sep-2014 bsalomon <bsalomon@google.com> "NULL !=" = NULL

R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
/external/skia/src/effects/SkPictureImageFilter.cpp
a8d7f0b13cd4c6d773fcf055fe17db75d260fa05 29-Aug-2014 robertphillips <robertphillips@google.com> Try out scalar picture sizes

This paves the way for removing the 'fTile' parameter from SkPictureShader (although that should be a different CL). If we like this we could also move to providing an entire cull SkRect.

R=reed@google.com, mtklein@google.com, fmalita@google.com, fmalita@chromium.org

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/513983002
/external/skia/src/effects/SkPictureImageFilter.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/SkPictureImageFilter.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/SkPictureImageFilter.cpp
3d822c29d4272a6749e59801b202b1ed6d611be8 30-Jul-2014 senorblanco <senorblanco@chromium.org> Intersect SkPictureImageFilter bounds against clip bounds.

Intersect SkPictureImageFilter bounds against clip bounds
to avoid unnecessary processing. This is how the other
filters work (via applyCropRect()), but SkPictureImageFilter
maintains its own crop.

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/428263003
/external/skia/src/effects/SkPictureImageFilter.cpp
e8464994bbcc797b47a5ee24aa513530d2bade3b 14-Jul-2014 robertphillips <robertphillips@google.com> Make SkPictureShader and SkPictureImageFilter use const SkPictures

R=mtklein@google.com, reed@google.com
TBR=reed@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/390023002
/external/skia/src/effects/SkPictureImageFilter.cpp
9b14f26d0f3a974f3dd626c8354e1db1cfcd322f 04-Jun-2014 robertphillips <robertphillips@google.com> Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer)

R=reed@google.com, bsalomon@google.com, mtklein@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/313613004
/external/skia/src/effects/SkPictureImageFilter.cpp
97f5fc651956287e78e35934cf62b9e1b45b4f6c 30-May-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Allow SkPictureImageFilter to be serialized when not run cross-process.

Picture serialization is not yet hardened, but it turns out we do need
serialization of SkPictureImageFilter for deferred SVG-on-SVG filters,
since the SkPaints (and thus the SkImageFilters) are serialized by
SkPictureRecord. However, deferred filters are always drawn in the
same process, so we can safely serialize them in this case. We do this
by turning the compile-time check for
SK_ALLOW_PICTUREIMAGEFILTER_SERIALIZATION to a runtime check for
isCrossProcess().

The image filter fuzzer sample was also modified to enable fuzzing
of basic picture image filters (the code had rotted a bit, being behind
an #ifdef that no one sets).

BUG=375162
R=sugoi@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@15008 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkPictureImageFilter.cpp
910702b564048d77e36a68b0f8dda7cc48a8fcff 30-May-2014 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement SkPictureImageFilter bounds computation.

SkPictureImageFilter::onFilterBounds() was unimplemented, causing
incorrect results for SVG filters and impl-side painting (see Chrome
bug https://code.google.com/p/chromium/issues/detail?id=375162).

BUG=skia:
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@15003 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkPictureImageFilter.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/SkPictureImageFilter.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/SkPictureImageFilter.cpp
5e0995e4b36178e1e4465a9f50114ed39f038c27 07-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Revert "Serialization of SkPictureImageFilter" (https://codereview.chromium.org/153583007/)

Reason for revert:
New SKPs with version20 are in Google Storage due to http://108.170.219.160:10117/builders/Housekeeper-Nightly-RecreateSKPs/builds/22

Original issue's description:
> Revert "Serialization of SkPictureImageFilter"
>
> This reverts commit 227321b30106e57942929eb96fa5bc22544f6c9e.
>
> Revert "Sanitizing source files in Housekeeper-Nightly"
>
> This reverts commit baf28584b7636c01355f8d8d972e06aa7fb66d77.
>
> TBR=robertphillips@google.com,sugoi@google.com
>
> Committed: https://code.google.com/p/skia/source/detail?r=13356

R=robertphillips@google.com, sugoi@google.com, fmalita@google.com, fmalita@chromium.org
TBR=fmalita@chromium.org, fmalita@google.com, robertphillips@google.com, sugoi@google.com
NOTREECHECKS=true
NOTRY=true

Author: rmistry@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13357 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkPictureImageFilter.cpp
7713c38dc0182c8f6a685dace5101c49301de00d 07-Feb-2014 fmalita@google.com <fmalita@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Serialization of SkPictureImageFilter"

This reverts commit 227321b30106e57942929eb96fa5bc22544f6c9e.

Revert "Sanitizing source files in Housekeeper-Nightly"

This reverts commit baf28584b7636c01355f8d8d972e06aa7fb66d77.

TBR=robertphillips@google.com,sugoi@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13356 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkPictureImageFilter.cpp
4f6318d2e64c96fba955ea9154829aee37e155b8 07-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Serialization of SkPictureImageFilter

BUG=skia:

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

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

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13354 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkPictureImageFilter.cpp
8b4799a98b05d626432b11115b5c2f0e0bb1772d 06-Feb-2014 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of r13347 (Serialization of SkPictureImageFilter - https://codereview.chromium.org/138063005) due to bump in skp file format



git-svn-id: http://skia.googlecode.com/svn/trunk@13348 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkPictureImageFilter.cpp
670b98ea5df48daef5d23e2bb7570d408207c333 06-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Serialization of SkPictureImageFilter

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

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13347 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkPictureImageFilter.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/SkPictureImageFilter.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/SkPictureImageFilter.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/SkPictureImageFilter.cpp
533330065a28b51808e5bf564ae45e56f8d9956a 13-Dec-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement an SkPicture image filter source. This is required for the external-SVG reference feature of feImage. It simply plays back an SkPicture to a given destination rect.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12661 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkPictureImageFilter.cpp
9c5435de44ed491353b41f863c4e176b6e7ddc94 12-Dec-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert "Implement an SkPicture image filter source. This is required for the external-SVG reference feature of feImage. It simply plays back an SkPicture to a given destination rect."

This reverts commit a620349a24471546ad2e8f0679774c1f5b4de0a4 (r12656).

git-svn-id: http://skia.googlecode.com/svn/trunk@12657 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/effects/SkPictureImageFilter.cpp
14e21270f5714f391c0319e9728040e074b9c5e0 12-Dec-2013 senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Implement an SkPicture image filter source. This is required for the external-SVG reference feature of feImage. It simply plays back an SkPicture to a given destination rect.

R=reed@google.com

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

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