reed
01dc44ae66
add GM to show miplevels for all colortypes
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1594613002
TBR=
Review URL: https://codereview.chromium.org/1594613002
2016-01-15 10:51:08 -08:00
reed
a40be09c44
expand gm to exercise miplevels and various scalers
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574233003
TBR=
Review URL: https://codereview.chromium.org/1574233003
2016-01-14 09:11:51 -08:00
senorblanco
06d54ad09a
Fix SkXfermodeImageFilter GPU fast path for differing sizes.
...
The GPU fast path was not doing the correct thing for input bitmaps of
differing sizes. This change brings the fast path in line with the
slow path: use the union of foreground and background bounds as bounds,
offset the draw context by the bounds translation, and translate the
foreground and background independently by their respective offsets.
Finally, we add a texture domain for the background fragment
processor, since we may access texels outside its domain.
Note: this adds two new test cases to the xfermodeimagefilter GM, so
those will need to be rebaselined.
BUG=568196
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1588633002
Review URL: https://codereview.chromium.org/1588633002
2016-01-13 13:48:54 -08:00
joshualitt
c2eff2ac77
micro fix for rrects bug using GrDrawContext
...
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1582933002
Review URL: https://codereview.chromium.org/1582933002
2016-01-13 11:23:27 -08:00
joshualitt
04194f32f4
Remove two varieties of drawNonAARect from GrDrawTarget
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584703003
Review URL: https://codereview.chromium.org/1584703003
2016-01-13 10:08:27 -08:00
joshualitt
f5883a6d75
Hide drawBatch on GrDrawTarget from test Methods
...
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574383002
Review URL: https://codereview.chromium.org/1574383002
2016-01-13 07:47:38 -08:00
senorblanco
a9fbd1676c
Fix SkTileImageFilter when srcRect is a superset of bitmap bounds.
...
If the input bitmap passed to SkTileImageFilter does not fill the
srcRect, we were tiling this incorrectly (see the first sample
from tileimage filter -- it draws from a srcRect of 12,12 50x50
to a dstRect of 0,0 50x50. There should be no tiling at all
in this case!)
In order to fix this, we need to pad the bitmap out to srcRect,
and tile with that. In order to tile correctly in the GPU case,
we need to request a tileable texture.
NOTE: this will change the results of the tileimagefilter GM (correctness,
and added src / dest rects).
BUG=skia:4774
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1570133003
Review URL: https://codereview.chromium.org/1570133003
2016-01-11 14:09:09 -08:00
reed
0daf5dd7fc
move declaration of CreateLightingFilter into SkColorMatrixFilter
...
BUG=skia:4791
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574023002
Review URL: https://codereview.chromium.org/1574023002
2016-01-11 12:34:04 -08:00
reed
22471ed134
remove SkImage::applyFilter() -- unused, can always re-add later
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1573653002
Review URL: https://codereview.chromium.org/1573653002
2016-01-08 17:21:47 -08:00
ajuma
77b6ba3b6e
Implement an SkPaint-based image filter
...
This implements SkPaintImageFilter, and is intended to replace
SkRectShaderImageFilter. By allowing a paint and not just a
shader as input, this allows consumers to control dithering.
BUG=skia:4780
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556553002
Review URL: https://codereview.chromium.org/1556553002
2016-01-08 14:58:35 -08:00
herb
b10fe4941b
Remove work from constructors to facilitate debugging.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1562093002
Review URL: https://codereview.chromium.org/1562093002
2016-01-08 13:48:43 -08:00
reed
57fa241d6f
don't leak test filters and shaders
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568173002
TBR=
Review URL: https://codereview.chromium.org/1568173002
2016-01-07 17:56:33 -08:00
reed
3061af4a5f
add SkShader::newWithColorFilter
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556693003
Review URL: https://codereview.chromium.org/1562193002
2016-01-07 15:47:29 -08:00
reed
bfd5f171e6
Revert[2] of "add backdrop option to SaveLayerRec"
...
Reverted because of picture/serialization failure
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567063002
TBR=mtklein
Review URL: https://codereview.chromium.org/1567063002
2016-01-07 11:28:08 -08:00
reed
0575cb2def
Revert of add backdrop option to SaveLayerRec (patchset #14 id:260001 of https://codereview.chromium.org/1523053003/ )
...
Reason for revert:
serialized != direct, will investigate
Original issue's description:
> add backdrop option to SaveLayerRec
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1523053003
>
> Committed: https://skia.googlesource.com/skia/+/247415969a9a5ed6c83cc09395472416c4b7de7f
TBR=robertphillips@google.com ,bsalomon@google.com,mtklein@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/1565203002
2016-01-07 08:15:10 -08:00
reed
247415969a
add backdrop option to SaveLayerRec
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1523053003
Review URL: https://codereview.chromium.org/1523053003
2016-01-07 07:44:35 -08:00
djsollen
19aa2b0867
Fix crash when ETC1 codec is not supported.
...
BUG=skia:4216
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567893002
Review URL: https://codereview.chromium.org/1567893002
2016-01-07 07:22:47 -08:00
caryclark
6df611574a
handle halfway case in scan converter
...
Scan edges that start at exactly -0.5 aren't trimmed by
clipping or by rounding, triggering a debug assert.
One way to fix this is to round the top and left
down instead of up.
Also, move the path initialization of gm/composeshader.cpp
to make debugging other path problems easier.
R=reed@google.com
BUG=skia:2715
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1544873002
Review URL: https://codereview.chromium.org/1544873002
2016-01-04 14:17:47 -08:00
reed
f880e45e92
change factory to method, to parallel pattern in imagefilters. no functionality change.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1553743002
TBR=
Review URL: https://codereview.chromium.org/1553743002
2015-12-30 13:39:41 -08:00
mtklein
636270245f
initialize offscreen in StrokeZeroGM
...
Valgrind's complaining that we're drawing uninitialized source pixels
from that offscreen via drawBitmap():
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Valgrind/builds/736/steps/dm/logs/stdio
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1546363002
Review URL: https://codereview.chromium.org/1546363002
2015-12-28 11:15:46 -08:00
reed
48eb08a790
remove unused SkAutoROCanvasPixels
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1550583002
TBR=
Review URL: https://codereview.chromium.org/1550583002
2015-12-25 12:56:03 -08:00
caryclark
c53b82ec0e
revised strokerect gm
...
In service of the bug below, revise the gm to show what zero
widths draw, and what they should draw (by including rects
with fractionally tiny widths).
TBR=halcanary@google.com ,reed@google.com
BUG=1294
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1548643002
Review URL: https://codereview.chromium.org/1548643002
2015-12-22 07:50:16 -08:00
caryclark
40b7d3b48b
fix hair fuzz
...
If the end and control points of a quad, conic, or cubic are the same,
adjust all of them when stretching the curve to account for a square
or round end cap. If all of the points are the same, move all but the
last.
Enlarge the clip check to account for the cap.
The clip bug was detected by ASAN.
R=reed@google.com , msarett@google.com
BUG=571214
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1547483003
Review URL: https://codereview.chromium.org/1547483003
2015-12-22 06:13:33 -08:00
reed
b39f39f5cc
remove unused SkCullPoints
...
need to remove file references from chrome before landing this
https://codereview.chromium.org/1547603002#
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541933004
TBR=scroggo
Review URL: https://codereview.chromium.org/1541933004
2015-12-21 18:37:16 -08:00
reed
5e1ddb1086
Reland of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1540203002/ )
...
Reason for revert:
chrome changes have landed
Original issue's description:
> Revert of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1535353002/ )
>
> Reason for revert:
> need to update some chrome/blink call-sites
>
> Original issue's description:
> > change all factories to return their base-class
> >
> > will watch DEPS roll to see if there are chrome sites needing updates
> >
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002
> >
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/d63f60a36327e9580861205ebb35cade8c49bd34
>
> TBR=
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2d6ba6690f8951e152d8e793191b14afd52f5506
TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1533373002
2015-12-21 08:52:45 -08:00
caryclark
fb56218292
fix stroked text underline / strikethrough
...
Pass 1 to DrawRect for underline and strikethrough since it will
scale by the text size later.
R=reed@google.com
BUG=skia:971
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535793004
Review URL: https://codereview.chromium.org/1535793004
2015-12-21 08:35:51 -08:00
reed
2d6ba6690f
Revert of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1535353002/ )
...
Reason for revert:
need to update some chrome/blink call-sites
Original issue's description:
> change all factories to return their base-class
>
> will watch DEPS roll to see if there are chrome sites needing updates
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/d63f60a36327e9580861205ebb35cade8c49bd34
TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1540203002
2015-12-20 20:08:43 -08:00
reed
d63f60a363
change all factories to return their base-class
...
will watch DEPS roll to see if there are chrome sites needing updates
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002
TBR=
Review URL: https://codereview.chromium.org/1535353002
2015-12-20 19:38:20 -08:00
caryclark
f97aa74fea
fix large dashed paths
...
Paths with lots of points exceed the 32767 point index.
Make the index larger, add a test, and allow the
t value to use the extra bits.
R=reed@google.com ,fmalita@chromium.org
BUG=skia:3501
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534223002
Review URL: https://codereview.chromium.org/1534223002
2015-12-18 07:03:13 -08:00
robertphillips
e80eb928ba
Add default ctor to SkMask
...
The minimal fix here seems to be handling BoxBlur's return value in SkBlurMaskFilter.cpp::GrRRectBlurEffect::Create. We seem to do enough special handling of the fImage field though that always initialializing it may not be a bad idea.
BUG=570232
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1539553002
Review URL: https://codereview.chromium.org/1539553002
2015-12-17 11:33:12 -08:00
ethannicholas
3819d2d767
Added concave paths to aaxfermodes GM
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534823004
Review URL: https://codereview.chromium.org/1534823004
2015-12-17 10:58:28 -08:00
senorblanco
c834ab178e
Fix gaussian blur for small sigma.
...
I broke this in https://skia.googlesource.com/skia/+/c57e0ded7d535523cfc6bf07c78e5f3479bb8c42 .
That change added support for cropping during blur, but
did not do the correct thing for the small-sigma 2D matrix convolution
optimization when blurring from small-to-large textures.
The fix is pass the correct dstRect and srcOffset to convolve_gaussian_2d.
I also changed convolve_gaussian_1d() and convolve_gaussian_2d() to take
the original (non-negated) srcOffset, and to negate them when constructing
the local matrix.
Test: added a new (blur 0.3 0.3) column to imagefilterscropexpand, so that
GM will have to be rebaselined.
BUG=skia:4719,569883
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1529313003
Review URL: https://codereview.chromium.org/1529313003
2015-12-17 08:10:17 -08:00
caryclark
1f17ab5992
This brings hairlines into agreement with thick strokes.
...
Add more testing and a pixel magnification to GM.
R=reed@google.com , fmalita@chromium.org
BUG=skia:4599
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1527083002
Review URL: https://codereview.chromium.org/1527083002
2015-12-16 08:53:41 -08:00
reed
da420b976e
Reland of move drawSprite from canvas (patchset #1 id:1 of https://codereview.chromium.org/1529803004/ )
...
Reason for revert:
guard has landed in chrome
Original issue's description:
> Revert of remove drawSprite from canvas (patchset #4 id:60001 of https://codereview.chromium.org/1534443003/ )
>
> Reason for revert:
> need to remove an override in chrome
>
> Original issue's description:
> > remove drawSprite from canvas
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/4657ce2324ea197507c4ba728d81138f56da13b1
>
> TBR=fmalita@chromium.org ,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/32704674f64cb6a14356dfebe060cd3484c06cc7
TBR=fmalita@chromium.org ,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1530203002
2015-12-16 08:38:16 -08:00
reed
32704674f6
Revert of remove drawSprite from canvas (patchset #4 id:60001 of https://codereview.chromium.org/1534443003/ )
...
Reason for revert:
need to remove an override in chrome
Original issue's description:
> remove drawSprite from canvas
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4657ce2324ea197507c4ba728d81138f56da13b1
TBR=fmalita@chromium.org ,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1529803004
2015-12-16 08:27:10 -08:00
reed
4657ce2324
remove drawSprite from canvas
...
BUG=skia:
Review URL: https://codereview.chromium.org/1534443003
2015-12-16 07:52:47 -08:00
fmalita
aed4d32de9
SkBitmapProcState rounding bias
...
Epsilon bias to keep bitmap sample rounding consistent with geometry
rounding.
Also update the GM to draw an outer border + drop uninteresting
scales in favor of negative scale variants.
BUG=skia:4680,skia:4649
R=reed@google.com ,caryclark@google.com,mtklein@google.com
Review URL: https://codereview.chromium.org/1527633002
2015-12-15 06:48:48 -08:00
fmalita
cad54b5366
New GM: image_scale_aligned
...
To verify alignment for various image scaling modes.
BUG=skia:4649
R=reed@google.com
Review URL: https://codereview.chromium.org/1514923002
2015-12-11 11:03:27 -08:00
reed
70ee31b2fa
try adding flag to allow lcd text even in a layer
...
BUG=skia:
Review URL: https://codereview.chromium.org/1513513002
2015-12-10 13:44:45 -08:00
scroggo
96f16e835e
Use DEF_GM everywhere
...
BUG=skia:1902
Review URL: https://codereview.chromium.org/1518893002
2015-12-10 13:31:59 -08:00
robertphillips
4e56772432
Address precision issue in circle blur effect
...
BUG=560651
Review URL: https://codereview.chromium.org/1504333003
2015-12-10 13:29:14 -08:00
xidachen
467ddc0b24
SkBlurImageFilter returns input when sigma = 0
...
In the current implementation, a blur filter is always created even in the
case when sigma.fX == 0 && sigma.fY == 0. This CL makes the blur filter
return input in this case.
BUG=568393
Review URL: https://codereview.chromium.org/1518643002
2015-12-10 12:08:44 -08:00
scroggo
565901db95
Switch SkAutoMalloc to SkAutoTMalloc to avoid cast
...
Make SkAutoTMalloc's interface look more like SkAutoMalloc:
- add free(), which does what you expect
- make reset() return a pointer fPtr
No public API changes (SkAutoTMalloc is in include/private)
BUG=skia:2148
Review URL: https://codereview.chromium.org/1516833003
2015-12-10 10:44:13 -08:00
halcanary
e36ec87176
SkBitmap::installPixels(const SkPixmap&);
...
Review URL: https://codereview.chromium.org/1505333002
2015-12-09 11:36:59 -08:00
bsalomon
4a4f14ba3f
Split big rrect aa effect up into separate images
...
Needed to enlarge radii to surface bugs without exceeding max texture size on low end devices.
BUG=chromium:477684
Review URL: https://codereview.chromium.org/1508003008
2015-12-09 10:17:35 -08:00
caryclark
57eecc154e
Zero length lines may have caps, but do not need joins.
...
Check to see if the point is preceeded or followed
by a line with a computable tangent before adding the join.
R=reed@google.com
BUG=566075
Review URL: https://codereview.chromium.org/1504043002
2015-12-08 04:29:45 -08:00
senorblanco
d18b1b5adc
Add SkTileImageFilter sample to filterfastbounds GM.
...
NOTE: will affect pixel results for filterfastbounds GM.
BUG=skia:3194
Review URL: https://codereview.chromium.org/1500373004
2015-12-07 10:36:30 -08:00
reed
f65fb65814
add gm to exercise large sigmas
...
BUG=skia:4437
TBR=
Review URL: https://codereview.chromium.org/1503143002
2015-12-07 09:28:34 -08:00
senorblanco
a544eda5dd
Matrix convolution bounds fix; affectsTransparentBlack fixes.
...
Because the convolution kernel is (currently) applied in device space,
there's no way to know which object-space pixels will be touched. So
return false from canComputeFastBounds().
The results from the matrixconvolution GM were actually wrong, since
they were showing edge differences on the clip boundaries, where they
should really only show on crop boundaries. I added a crop to the GM
to keep the results the same (which are useful to test the different
convolution tile modes).
While I was at it, SkImageFilter::affectsTransparentBlack() was
inapplicable on most things except color filters, and its use on
leaf nodes was confusing. So I removed it, and made
SkImageFilter::canComputeFastBounds() virtual instead.
BUG=skia:4630
Review URL: https://codereview.chromium.org/1500923004
2015-12-07 07:48:34 -08:00
senorblanco
50c044b9ad
Revert of Matrix convolution bounds fix; affectsTransparentBlack fixes. (patchset #4 id:60001 of https://codereview.chromium.org/1500923004/ )
...
Reason for revert:
Introduced memory leak; pixel changes in Chrome.
Original issue's description:
> Matrix convolution bounds fix; affectsTransparentBlack fixes.
>
> Because the convolution kernel is (currently) applied in device space,
> there's no way to know which object-space pixels will be touched. So
> return false from canComputeFastBounds().
>
> The results from the matrixconvolution GM were actually wrong, since
> they were showing edge differences on the clip boundaries, where they
> should really only show on crop boundaries. I added a crop to the GM
> to keep the results the same (which are useful to test the different
> convolution tile modes).
>
> While I was at it, SkImageFilter::affectsTransparentBlack() was
> inapplicable on most things except color filters, and its use on
> leaf nodes was confusing. So I removed it, and made
> SkImageFilter::canComputeFastBounds() virtual instead.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8705ec80518ef551994b82ca5ccaeb0241d6adec
TBR=reed@google.com ,reed@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1497083005
2015-12-05 05:59:41 -08:00