Commit Graph

639 Commits

Author SHA1 Message Date
Mike Reed
8ad91a9bf8 remove unused SkRasterizer
Bug: skia:7500
Change-Id: Iaa683cf8f0b18887cce4ec676631d1e1efee1712
Reviewed-on: https://skia-review.googlesource.com/97400
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-21 18:24:11 +00:00
Mike Reed
6e87eee2a0 add shadermaskfilter
next steps:
- gpu impl (will look a lot like shader's asFragProcessor
- special-case rect-input (?)
- explore stages w/ mtklein

Bug: skia:7500
Change-Id: I71089e421d32443a3ddded6967b3e5bc67ed43f2
Reviewed-on: https://skia-review.googlesource.com/95104
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-01-18 21:24:38 +00:00
Brian Osman
3e31e99bab Revert "Alloc glyph image correctly for SkMask::k3D_Format."
This reverts commit 1662257bda.

Reason for revert: Android still using this API

Original change's description:
> Alloc glyph image correctly for SkMask::k3D_Format.
> 
> Remove the no longer used outside Skia SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
> define, and either delete the code it guards or update it to use the new
> emboss mask filter factory.
> 
> Re-enable the code to test the emboss mask filter.
> 
> Add a test to ensure that embossed text is drawn correctly, as before
> glyphs did not allocate the proper amount of memory for the k3D_Format
> which the emboss mask filter produces.
> 
> Fixes SkEmbossMask::Emboss to write the whole of the mul and add planes
> to avoid pixel differences and MemorySanitizer errors.
> 
> Update the GPU to understand the k3D_Format and use just the alpha
> plane, ignoring the mul and add plane which it currently cannot support.
> 
> Change-Id: Icac1a3f37d6e8c6be3151df570f5e14111e18585
> Reviewed-on: https://skia-review.googlesource.com/70260
> Reviewed-by: Herb Derby <herb@google.com>
> Reviewed-on: https://skia-review.googlesource.com/70962
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=djsollen@google.com,bungeman@google.com,herb@google.com

Change-Id: Id6625bae8d3bd70ce7aa3045348c04fdd146c637
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/71183
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-14 16:16:45 +00:00
Ben Wagner
1662257bda Alloc glyph image correctly for SkMask::k3D_Format.
Remove the no longer used outside Skia SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
define, and either delete the code it guards or update it to use the new
emboss mask filter factory.

Re-enable the code to test the emboss mask filter.

Add a test to ensure that embossed text is drawn correctly, as before
glyphs did not allocate the proper amount of memory for the k3D_Format
which the emboss mask filter produces.

Fixes SkEmbossMask::Emboss to write the whole of the mul and add planes
to avoid pixel differences and MemorySanitizer errors.

Update the GPU to understand the k3D_Format and use just the alpha
plane, ignoring the mul and add plane which it currently cannot support.

Change-Id: Icac1a3f37d6e8c6be3151df570f5e14111e18585
Reviewed-on: https://skia-review.googlesource.com/70260
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-on: https://skia-review.googlesource.com/70962
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-11-14 14:10:22 +00:00
Ben Wagner
3ae1a307f6 Revert "Alloc glyph image correctly for SkMask::k3D_Format."
This reverts commit 6b26deb8d6.

Reason for revert: GPU bots failing

Original change's description:
> Alloc glyph image correctly for SkMask::k3D_Format.
> 
> This removes the no longer used outside Skia
> SK_SUPPORT_LEGACY_EMBOSSMASKFILTER define, and either deletes the code
> it guards or updates it to use the new emboss mask filter factory. This
> re-enables the code to test the emboss mask filter. Also added is a test
> to ensure that embossed text is drawn correctly, as before this glyphs
> did not allocate the proper amount of memory for the k3D_Format which
> this mask filter produces. This also fixes SkEmbossMask::Emboss to write
> the whole of the mul and add planes to avoid pixel differences and
> MemorySanitizer errors.
> 
> Change-Id: Ib492c72a19d6a27d140e3cd48179a3ca9ce313f5
> Reviewed-on: https://skia-review.googlesource.com/70260
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Herb Derby <herb@google.com>

TBR=djsollen@google.com,bungeman@google.com,herb@google.com,reed@google.com

Change-Id: I8a9db6c00e0cb84bdd4833474a9ffffa6ecc606c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/70920
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-11-13 20:43:06 +00:00
Ben Wagner
6b26deb8d6 Alloc glyph image correctly for SkMask::k3D_Format.
This removes the no longer used outside Skia
SK_SUPPORT_LEGACY_EMBOSSMASKFILTER define, and either deletes the code
it guards or updates it to use the new emboss mask filter factory. This
re-enables the code to test the emboss mask filter. Also added is a test
to ensure that embossed text is drawn correctly, as before this glyphs
did not allocate the proper amount of memory for the k3D_Format which
this mask filter produces. This also fixes SkEmbossMask::Emboss to write
the whole of the mul and add planes to avoid pixel differences and
MemorySanitizer errors.

Change-Id: Ib492c72a19d6a27d140e3cd48179a3ca9ce313f5
Reviewed-on: https://skia-review.googlesource.com/70260
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-11-13 20:26:21 +00:00
Mike Reed
48723156c5 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>
2017-11-10 19:59:47 +00:00
Mike Reed
77e487dfc0 Revert "Revert "Remove MakeForLocalSpace since picture image is sufficient""
This reverts commit fc45998242.

Reason for revert: google3 updated (I think)

Original change's description:
> Revert "Remove MakeForLocalSpace since picture image is sufficient"
> 
> This reverts commit 0d8766c84c.
> 
> 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>
2017-11-09 21:50:27 +00:00
Mike Reed
fc45998242 Revert "Remove MakeForLocalSpace since picture image is sufficient"
This reverts commit 0d8766c84c.

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>
2017-11-09 18:44:17 +00:00
Mike Reed
0d8766c84c 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>
2017-11-09 16:49:44 +00:00
Brian Salomon
4cbb6e6d55 Pass GrRenderTargetContext's GrColorSpaceInfo to SkShader and SkColorFilter.
Also to SkColorTo(Premul|Unpremul)GrColor4f.

This can avoid cache lookups to find GrColorSpaceXforms as the xform pointer is stored in GrColorSpaceInfo after the first lookup.

Also uses GrColorSpaceInfo to construct GrTextUtils::Paint.

Bug: skia:
Change-Id: Idf19d512a60d2269e6921c7fb54d93aee499a70d
Reviewed-on: https://skia-review.googlesource.com/63660
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-10-25 19:32:20 +00:00
Ben Wagner
63fd760a37 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>
2017-10-09 21:20:34 +00:00
Xianzhu Wang
b449666fa2 Reland "Fix SkImageSource::filterBounds()" again
This relands commit cb4d587666
which was reverted by commit b6d2be1330
because the original CL broke some blink layout tests, and the first
reland was reverted by commit because it broke filterfastbounds gm.

This reland let SkImageSource::onFilterNodeBounds() return the dst rect
with ctm applied when mapping forward or otherwise the default value.

Original description:

> Previously SkImageSource::filterBounds() uses the default
> SkImageFilter::onFilterNodeBounds() which returns the input rect.
>
> Now override onFilterNodeBounds() in SkImageSource to return src
> or dst rect (with transform applied).

Change-Id: I4548981142b9a96beda8339d394cf9943c9f4c0f
Reviewed-on: https://skia-review.googlesource.com/50420
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-09-25 19:05:20 +00:00
Derek Sollenberger
2fbf1bc8c9 Add SK_API to APIs used by the android framework.
This CL enables us to set the default visibility of the symbols
on Android to hidden.  It is the intent that all of he SK_APIs
that have been added to /src directies should be removed as soon
as we can remove their callers within Android.

Bug: b/31971097
Change-Id: Ic787f94df0fb0c2b8d941aa7095a12b317c4b5de
Reviewed-on: https://skia-review.googlesource.com/49501
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-09-21 18:14:36 +00:00
Florin Malita
2ad0908b67 Revert "Reland "Fix SkImageSource::filterBounds()""
This reverts commit bf12c07970.

Reason for revert: broke the filterfastbounds GM (2nd column, 5th & 7th rows)

Original change's description:
> Reland "Fix SkImageSource::filterBounds()"
> 
> This relands commit cb4d587666
> which was reverted by commit b6d2be1330
> because the original CL broke some blink layout tests.
> 
> This reland let SkImageSource::filterBounds() return the dst rect with
> ctm applied regardless of direction.
> 
> Original description:
> 
> > Previously SkImageSource::filterBounds() uses the default
> > SkImageFilter::onFilterNodeBounds() which returns the input rect.
> >
> > Now override onFilterNodeBounds() in SkImageSource to return src
> > or dst rect (with transform applied).
> 
> Change-Id: I915b7889ff59829ddbc4479cd66d75a0bb581e54
> Reviewed-on: https://skia-review.googlesource.com/47501
> Commit-Queue: Stephen White <senorblanco@chromium.org>
> Reviewed-by: Stephen White <senorblanco@chromium.org>

TBR=senorblanco@chromium.org,reed@google.com,wangxianzhu@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I698433de66cf3de145b9319e09cb9ec9e30d2fa9
Reviewed-on: https://skia-review.googlesource.com/48160
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-09-18 20:52:21 +00:00
Xianzhu Wang
bf12c07970 Reland "Fix SkImageSource::filterBounds()"
This relands commit cb4d587666
which was reverted by commit b6d2be1330
because the original CL broke some blink layout tests.

This reland let SkImageSource::filterBounds() return the dst rect with
ctm applied regardless of direction.

Original description:

> Previously SkImageSource::filterBounds() uses the default
> SkImageFilter::onFilterNodeBounds() which returns the input rect.
>
> Now override onFilterNodeBounds() in SkImageSource to return src
> or dst rect (with transform applied).

Change-Id: I915b7889ff59829ddbc4479cd66d75a0bb581e54
Reviewed-on: https://skia-review.googlesource.com/47501
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2017-09-16 18:55:53 +00:00
Mike Reed
b6d2be1330 Revert "Fix SkImageSource::filterBounds()"
This reverts commit cb4d587666.

Reason for revert: speculative fix for broken layout tests

https://storage.googleapis.com/chromium-layout-test-archives/linux_chromium_rel_ng/547101/layout-test-results/results.html

+fast/css/transformed-mask.html		images diff	image	pass
+svg/W3C-SVG-1.1-SE/filters-image-03-f.svg		images diff	image	pass
+svg/W3C-SVG-1.1-SE/filters-image-05-f.svg		images diff	image	pass
+svg/W3C-SVG-1.1/filters-displace-01-f.svg		images diff	image	pass
+svg/filters/feImage-preserveAspectRatio-all.svg		images diff	image	pass
+svg/filters/feImage-preserveAspectratio.svg		images diff	image	pass

Original change's description:
> Fix SkImageSource::filterBounds()
> 
> Previously SkImageSource::filterBounds() uses the default
> SkImageFilter::onFilterNodeBounds() which returns the input rect.
> 
> Now override onFilterNodeBounds() in SkImageSource to return src
> or dst rect (with transform applied).
> 
> Change-Id: I6681e1ba97affb09ef1ca5bc03b3d0f66c10f149
> Reviewed-on: https://skia-review.googlesource.com/46741
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=senorblanco@chromium.org,reed@google.com,wangxianzhu@chromium.org

Change-Id: Ib335f8e2ccbadc2335d23bc5f122fc5de53a8740
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/47342
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-15 20:30:36 +00:00
Xianzhu Wang
cb4d587666 Fix SkImageSource::filterBounds()
Previously SkImageSource::filterBounds() uses the default
SkImageFilter::onFilterNodeBounds() which returns the input rect.

Now override onFilterNodeBounds() in SkImageSource to return src
or dst rect (with transform applied).

Change-Id: I6681e1ba97affb09ef1ca5bc03b3d0f66c10f149
Reviewed-on: https://skia-review.googlesource.com/46741
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-09-15 17:15:54 +00:00
Ben Wagner
a93a14a998 Convert NULL and 0 to nullptr.
This was created by looking at warnings produced by clang's
-Wzero-as-null-pointer-constant. This updates most issues in
Skia code. However, there are places where GL and Vulkan want
pointer values which are explicitly 0, external headers which
use NULL directly, and possibly more uses in un-compiled
sources (for other platforms).

Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345
Reviewed-on: https://skia-review.googlesource.com/39521
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-28 17:48:57 +00:00
Sadrul Habib Chowdhury
4189d1b8b7 Add SK_API to SkOverdrawCanvas and SkOverdrawColorFilter.
The SkiaRenderer in chromium is going to use the overdraw canvas and
filter for measuring overdraw. Move these headers out of src/ into
include/.

Bug: chromium:704285
Change-Id: I2abb1671b73e3d26552462cf700340a7e3b874f0
Reviewed-on: https://skia-review.googlesource.com/36160
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-18 16:53:49 +00:00
Brian Salomon
aff329b8e9 Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.
Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008
Reviewed-on: https://skia-review.googlesource.com/32760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-08-11 14:13:26 +00:00
Florin Malita
5a9a981edf Tiling support for SkSweepGradient
Expand the sweep gradient definition to include a color stop angular range ([0, 360] by default).

Color stop positions in [0,1] are mapped to this range, and drawing outside is controlled by a
tile mode param.

This is closer to the CSS gradients spec and allows us to use fewer color stops in Blink conic
gradients.

Impl-wise, the remapping is effected after t calculation, and before tiling.

Change-Id: I5d71be01d134404d6eb9d7e2a904ec636b39f855
Reviewed-on: https://skia-review.googlesource.com/27704
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-08-01 21:03:28 +00:00
Brian Salomon
6b17ff664e Implement clone for GrLightingEffect descendants
Also use sk_sp for ref management of owned light object.

Change-Id: I2fa8427a9374351996c09f992f74cc83008605f1
Reviewed-on: https://skia-review.googlesource.com/28040
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-07-28 14:39:57 +00:00
Brian Osman
10b6ad13f9 sRGB color filter
Bug: skia:
Change-Id: I9f04b8ce778349218ccd55673bdd1d16a192383c
Reviewed-on: https://skia-review.googlesource.com/26422
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-25 14:27:33 +00:00
Mike Reed
40e7e65534 remove (unused?) arcto patheffect
Bug: skia:
Change-Id: I80943cc495eb1edce839387f4b9512a66a4e5c11
Reviewed-on: https://skia-review.googlesource.com/25981
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-24 12:53:19 +00:00
wutao
da69944cbb Serialize the new TileMode in SkBlurImageFilterImpl.
Serialize the new TileMode in SkBlurImageFilterImpl. And also update the
SkReadBuffer::Version and CURRENT_PICTURE_VERSION in SkPicture.

Bug: 622128
Change-Id: I3b04be2a36406227c6d8112e943d7415566c0c42
Reviewed-on: https://skia-review.googlesource.com/22079
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-11 18:13:31 +00:00
wutao
039a7c70ce Added new edge handling mode (clamp and repeat) to Gaussian blur filter.
Gaussian blur filter will interpolate value by using out of bounds
coords, which is 0. This makes it appears darker near the bounds in the
blurred images. There are two issues: 1) when downsampling and
upsampling, we should use GrTextureDomainEffect kClamp_Mode to clamp
the texture coords to the bounds; 2) during Gaussian blur, we need to
clamp to texture bounds.

BUG=622128
TEST=cc_unittests, GM image test & manual. Some test results can be found at:
https://bugs.chromium.org/p/chromium/issues/detail?id=622128#c49
Change-Id: I9283da1d91efb0da94a991f2d372e9f62c288bdc
Reviewed-on: https://skia-review.googlesource.com/20465
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-06-30 18:11:16 +00:00
Mike Reed
9c1d780228 remove filterSpan from SkColorFilter
Bug: skia:
Change-Id: Ie8a31ea8131c08d251a825622484342e3e174474
Reviewed-on: https://skia-review.googlesource.com/21207
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-06-29 16:09:37 +00:00
Robert Phillips
70e3e9adc5 Remove SkImageFilter::MakeBlur entry point
AFAICT none of our clients use this entry point and it is tangling up efforts to add a new parameter to the BlurImageFilter.

Change-Id: I494634db98a1d246854a5e3735380fbe55f425c2
Reviewed-on: https://skia-review.googlesource.com/20837
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-27 12:49:25 +00:00
Mike Reed
ffa8484eb0 Revert "Revert "remove unused api on xfermodeimagefilter""
This reverts commit 369f7eaeb0.

Reason for revert: google3 updated

Original change's description:
> Revert "remove unused api on xfermodeimagefilter"
> 
> This reverts commit fcc4a071d9.
> 
> Reason for revert: broke google3 roll.
> 
> Original change's description:
> > remove unused api on xfermodeimagefilter
> > 
> > Bug: skia:
> > Change-Id: If99ee7b4d959d728849a20ee43a0d0ec25196f58
> > Reviewed-on: https://skia-review.googlesource.com/20303
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> 
> TBR=reed@google.com
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> 
> Change-Id: I80e8b1e9009263a61230d22a988a9bb5ba7e162d
> Reviewed-on: https://skia-review.googlesource.com/20320
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com,reed@google.com

Change-Id: Icaa72fe6b1586cb76b37ab88ee1950628048d4ac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20312
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-20 17:26:39 +00:00
Mike Reed
8051c4f22c Revert "Revert "remove unused api""
This reverts commit 012bdf8cb5.

Reason for revert: google3 updated

Original change's description:
> Revert "remove unused api"
> 
> This reverts commit 151b6ff295.
> 
> Reason for revert: broke google3
> 
> Original change's description:
> > remove unused api
> > 
> > Needs this to land first
> > https://codereview.chromium.org/2945973002/
> > 
> > Bug: skia:
> > Change-Id: Ib5db8a528cdf9fd75c7a547a5fc637da7a4bbce0
> > Reviewed-on: https://skia-review.googlesource.com/20304
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> 
> TBR=reed@google.com
> 
> Change-Id: If37bbf75eec6415639c65163d3a574554c3fa232
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/20324
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com,reed@google.com

Change-Id: I082ace66ad9e04548273e9f7d9b86539a71941c1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20311
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-20 17:26:09 +00:00
Hal Canary
012bdf8cb5 Revert "remove unused api"
This reverts commit 151b6ff295.

Reason for revert: broke google3

Original change's description:
> remove unused api
> 
> Needs this to land first
> https://codereview.chromium.org/2945973002/
> 
> Bug: skia:
> Change-Id: Ib5db8a528cdf9fd75c7a547a5fc637da7a4bbce0
> Reviewed-on: https://skia-review.googlesource.com/20304
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: If37bbf75eec6415639c65163d3a574554c3fa232
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20324
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-20 15:40:46 +00:00
Mike Reed
151b6ff295 remove unused api
Needs this to land first
https://codereview.chromium.org/2945973002/

Bug: skia:
Change-Id: Ib5db8a528cdf9fd75c7a547a5fc637da7a4bbce0
Reviewed-on: https://skia-review.googlesource.com/20304
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-20 13:59:31 +00:00
Hal Canary
369f7eaeb0 Revert "remove unused api on xfermodeimagefilter"
This reverts commit fcc4a071d9.

Reason for revert: broke google3 roll.

Original change's description:
> remove unused api on xfermodeimagefilter
> 
> Bug: skia:
> Change-Id: If99ee7b4d959d728849a20ee43a0d0ec25196f58
> Reviewed-on: https://skia-review.googlesource.com/20303
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:

Change-Id: I80e8b1e9009263a61230d22a988a9bb5ba7e162d
Reviewed-on: https://skia-review.googlesource.com/20320
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-20 13:32:50 +00:00
Mike Reed
fcc4a071d9 remove unused api on xfermodeimagefilter
Bug: skia:
Change-Id: If99ee7b4d959d728849a20ee43a0d0ec25196f58
Reviewed-on: https://skia-review.googlesource.com/20303
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-20 04:33:39 +00:00
Mike Reed
0bdaf05fc1 remove unused mode parameter from SkMergeImageFilter
Bug: skia:
Change-Id: Iaa46aaef130a337987c3528685f59c56387d4a7d
Reviewed-on: https://skia-review.googlesource.com/20210
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-19 14:01:56 +00:00
Mike Reed
ab51d1b297 Revert "remove unused TableMaskFilter"
This reverts commit d72b55b32c.

Reason for revert: used by android

Original change's description:
> remove unused TableMaskFilter
> 
> will revert if its needed in android
> 
> Bug: skia:
> Change-Id: I2ef777d31de4bbed6556d013054083ff6ff2cb8c
> Reviewed-on: https://skia-review.googlesource.com/20206
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=djsollen@google.com,reed@google.com,stani@google.com

Change-Id: I8ea36a912496e12c9fbfb73587d11e002252e8b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20212
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-19 02:50:18 +00:00
Mike Reed
6b9cd051b4 remove unused variants in imagefilter factories
Bug: skia:
Change-Id: Ife12bfa1c16f9dd87b24f73d3b260b0d2f46c7df
Reviewed-on: https://skia-review.googlesource.com/20207
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-19 01:57:51 +00:00
Mike Reed
d72b55b32c remove unused TableMaskFilter
will revert if its needed in android

Bug: skia:
Change-Id: I2ef777d31de4bbed6556d013054083ff6ff2cb8c
Reviewed-on: https://skia-review.googlesource.com/20206
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-19 01:45:21 +00:00
Mike Reed
25f3805efa slant colorfilter away from filterSpan4f
rename to make it easy to delete any impl that also had onAppendStages...
i.e. rename to make it clear that it is just an impl trick for rasterpipeline.

Bug: skia:
Change-Id: If3c3b2811eff12d399cdf7a77552c01e72c06996
Reviewed-on: https://skia-review.googlesource.com/18234
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-05-31 19:54:05 +00:00
Mike Reed
f2ae2b2dbc move perlinenoise2 into effects
Bug: skia:
Change-Id: I5c178bdc5901d15c6924b3fb1f29119ab3cc701d
Reviewed-on: https://skia-review.googlesource.com/18131
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-05-30 20:15:37 +00:00
Mike Reed
76f70622cf move all details for dashing into impl
Bug: skia:
Change-Id: I035603ad75158d9984cce7807bef6a668d9eb014
Reviewed-on: https://skia-review.googlesource.com/17793
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-05-24 03:22:23 +00:00
Florin Malita
14d54c207d Hide SkPerlinNoiseShader impl details
Move the shader impl to a private class, leave SkPerlinNoiseShader as
a factory class only (similar to e.g. SkLightingShader).

Change-Id: Ic1180db8f5dfd3d8f6fba133c6bf6bbdfa4f97a4
Reviewed-on: https://skia-review.googlesource.com/17318
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-18 17:24:39 +00:00
Mike Klein
fdf31035a9 void SkColorFilter::onAppendStages(...)
SkColorFilter::onAppendStages() can't actually fail today.
Let's enforce that.  This means the fallback is now used
only for color filters that have not implemented onAppendStages().

Change-Id: Ica3939685694f6186727766b54914b9ba05ca68c
Reviewed-on: https://skia-review.googlesource.com/16231
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-09 20:04:44 +00:00
Mike Reed
b9641bd55a force all colorfilters to implement 4f
high-contrast gms differ at most by 1 bit

Bug: skia:
Change-Id: I1308bd105020ea3cd5a30fd3dd322ed134fb5ed5
Reviewed-on: https://skia-review.googlesource.com/15249
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-05-04 15:21:39 +00:00
Matt Sarett
e22a6a29e2 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>
2017-04-15 12:15:36 +00:00
Matt Sarett
6d72ed918d SkImageFilter::onMakeColorSpace() - more overrides
Fills out most of the simple implementations.
Improves 22 gms in gbr-8888.

Bug: skia:
Change-Id: I881ade140993568263de75be51aed240d2de8cc6
Reviewed-on: https://skia-review.googlesource.com/13126
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-10 21:28:43 +00:00
Matt Sarett
31abf1fc94 Add SkImageFilter::makeColorSpace(SkColorSpaceXformer*)
Plus two sample implementations.  Will fill out the
rest if the model looks ok.

Bug: skia:
Change-Id: Ie24ecd0cbc36263220cb1e506f7812c582554e50
Reviewed-on: https://skia-review.googlesource.com/12100
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-10 13:35:42 +00:00
Matt Sarett
cdc651d29d Make xformer class for SkCSXCanvas, use for draw loopers
Fixes draw looper gms in gbr-8888 config.

Bug: skia:
Change-Id: I0a9306cc0523c82f2ad9516752d79c1d86b1e295
Reviewed-on: https://skia-review.googlesource.com/10644
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-30 18:02:58 +00:00
Matt Sarett
56ea77ac5f Implement SkBlurDrawLooper with SkLayerDrawLooper
This allows us to delete SkBlurDrawLooper (and leave only one draw
looper implementation).

BUG=skia:

Change-Id: I549af86b81babf19e3649bdffffe2fdb0b308d5a
Reviewed-on: https://skia-review.googlesource.com/10101
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-03-28 19:29:00 +00:00