caryclark
0449bcfb2f
add helper to create fancy underlines
...
Add a couple of utility functions to SkPaint that return the bounds
of glyphs between a pair of lines.
The common use case envisioned generates the edges of descenders
between the top and bottom bounds of an underline to allow computing
a stroke that skips those descenders.
The implementation stores a linked list in each glyph containing
the bounds of the lines parallel to the advance and the outermost
intersections within those bounds.
When the glyph cache is constructed, the glyph path is intersected
with the bounds and the extreme min and max values within the bounds
is added to an intercept.
Share the text to path iter to construct the data.
Make a half-hearted attempt to support vertical text; while the
vertical implementation is complete; surrounding code (e.g. paint
align) has short-comings with vertical.
R=fmalita@chromium.org , reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1654883003
Review URL: https://codereview.chromium.org/1654883003
2016-02-09 13:25:45 -08:00
reed
e712532988
implement more xfermodeproc4f and add GM
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1677293004
Review URL: https://codereview.chromium.org/1684623002
2016-02-09 11:59:24 -08:00
caryclark
f1d415188f
Add unit test to feed valid SVG sequences to make sure that
...
path strings can be parsed without returning an error.
Draw the output through Skia and SVG to make sure they are
parsed correctly.
R=fmalita@chromium.org
BUG=skia:4549
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1675053002
Review URL: https://codereview.chromium.org/1675053002
2016-02-09 10:30:22 -08:00
reed
d2ed622a2f
start experimenting with 64bit frame-buffers
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1680523002
Review URL: https://codereview.chromium.org/1680523002
2016-02-09 09:14:59 -08:00
fmalita
33ed3ad9f6
Relocate anisotropic mipmap logic to SkMipMap::extractLevel()
...
Pass a full x/y scale and defer the anisotropic heuristic to SkMipMap.
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1686563002
Review URL: https://codereview.chromium.org/1686563002
2016-02-09 08:20:19 -08:00
reed
3125565804
extend modecolorfilter to 4f
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1670063002
Review URL: https://codereview.chromium.org/1670063002
2016-02-08 12:56:57 -08:00
caryclark
52b64619d9
increase subdivision for very large cubics
...
Allow 512 subdivisions for hairline cubics instead of 64
to allow very large cubics to be properly approximated with
lines.
R=reed@google.com
BUG=339297
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1674813002
Review URL: https://codereview.chromium.org/1674813002
2016-02-05 13:59:31 -08:00
bsalomon
e63ffef624
Remove deferred clear from SkGpuDevice
...
Add combining to GrClearBatch
Fix issue with state tracking in GrGLGpu::createTestingOnlyBackendTexture
Add tests for clearing GPU SkSurfaces and add tests for GrDrawContext::clear().
Add comment that SkCanvas::flush will resolve the RT in the GPU case.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1658823002
Review URL: https://codereview.chromium.org/1658823002
2016-02-05 07:17:34 -08:00
reed
f7cdb06d62
extend compose-colorfilter to 4f
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1664663003
Review URL: https://codereview.chromium.org/1664663003
2016-02-04 11:35:27 -08:00
robertphillips
ffad53aa75
Add an avoidXfermode GM to exercise coverage
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1663133003
Review URL: https://codereview.chromium.org/1663133003
2016-02-03 10:46:01 -08:00
reed
ef5252e48f
extend gm to test aa[] parameter on xfer4f procs
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1663643002
Review URL: https://codereview.chromium.org/1663643002
2016-02-03 09:47:46 -08:00
robertphillips
afb188de27
Add gpu implementation of SkAvoidXfermode
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1658623002
TBR=bsalomon@google.com
Committed: https://skia.googlesource.com/skia/+/15691a055db9b68c9b48f589e48d8a85888cf83f
Review URL: https://codereview.chromium.org/1658623002
2016-02-03 09:42:49 -08:00
mtklein
f16e2a2e92
Revert of Add gpu implementation of SkAvoidXfermode (patchset #10 id:170001 of https://codereview.chromium.org/1658623002/ )
...
Reason for revert:
shader compilation failures
error C1008: undefined variable "null"
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/4064/steps/dm/logs/stdio
Original issue's description:
> Add gpu implementation of SkAvoidXfermode
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1658623002
>
> TBR=bsalomon@google.com
>
> Committed: https://skia.googlesource.com/skia/+/15691a055db9b68c9b48f589e48d8a85888cf83f
TBR=egdaniel@google.com ,bsalomon@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/1663093002
2016-02-03 06:42:16 -08:00
robertphillips
15691a055d
Add gpu implementation of SkAvoidXfermode
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1658623002
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/1658623002
2016-02-03 05:20:09 -08:00
senorblanco
afc7cce5d6
Fix for rounded-rect clips with filters.
...
Don't use the base canvas size to limit raster of complex clips, since
the top canvas size may actually be larger (e.g., a blur filter which
expands the clip bounds to accommodate filter margins). Use the top
canvas bounds instead.
BUG=skia:4879,471212
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1657333002
Review URL: https://codereview.chromium.org/1657333002
2016-02-02 18:44:16 -08:00
bsalomon
f267c1efe7
Add ability to extract YUV planes from SkImage
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1513393002
Review URL: https://codereview.chromium.org/1513393002
2016-02-01 13:16:14 -08:00
senorblanco
6404981b0c
Fix zero-sized blur with crop rect.
...
Neither the GPU nor CPU paths were correctly handling the crop rect
in this case.
NOTE: this change adds a new test case to the imageblurcropped GM, so
it will have to be rebaselined.
BUG=skia:4876
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1657773002
Review URL: https://codereview.chromium.org/1657773002
2016-02-01 10:32:42 -08:00
reed
395eabeb0e
float components in xfermodes
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623483002
TBR=mtklein
Review URL: https://codereview.chromium.org/1634273002
2016-01-30 18:52:31 -08:00
caryclark
70e6d6074a
add new tests
...
These tests are for upcoming changes to optimize
the path edge list.
TBR=reed@google.com
BUG=573166
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1651573002
Review URL: https://codereview.chromium.org/1651573002
2016-01-30 10:11:21 -08:00
bsalomon
8e74f80ca1
Add SkImage factory method that forces image to be resolved to a texture.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1631053003
Review URL: https://codereview.chromium.org/1631053003
2016-01-30 10:01:40 -08:00
djsollen
f2b340fc88
Consolidate SK_CRASH and sk_throw into SK_ABORT
...
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1648343003
Review URL: https://codereview.chromium.org/1648343003
2016-01-29 08:51:04 -08:00
robertphillips
2a1d401bf2
Move SkAvoidXfermode over from Android
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1649503002
Review URL: https://codereview.chromium.org/1649503002
2016-01-29 08:44:17 -08:00
reed
fbc1e296b2
starter procs for blending with pm4f
...
curr/maxrss loops min median mean max stddev samples config bench
8/8 MB 4 87.1µs 91µs 89.8µs 92µs 2% ▇▇▇▇█▇▅▁▁▁ nonrendering xfer4f_srcover_N_opaque_linear
9/9 MB 2 196µs 196µs 215µs 383µs 27% ▁▁▁▁█▁▁▁▁▁ nonrendering xfer4f_srcover_N_opaque_srgb
9/9 MB 1 313µs 313µs 313µs 313µs 0% ▁▄▅▅▅▂████ nonrendering xfer4f_srcover_N_alpha_linear
9/9 MB 1 580µs 580µs 582µs 602µs 1% ▁▁▁▁▁▁▂▁▁█ nonrendering xfer4f_srcover_N_alpha_srgb
9/9 MB 23 13.1µs 13.1µs 13.1µs 13.1µs 0% ▆▄▄█▂▂▂▁▂▁ nonrendering xfer4f_srcover_1_opaque_linear
9/9 MB 23 13.2µs 13.2µs 13.2µs 13.2µs 0% █▄▂▁▃▁▂▂▂▂ nonrendering xfer4f_srcover_1_opaque_srgb
9/9 MB 2 178µs 183µs 183µs 185µs 1% ▇▇▇█▇▇▇▇▇▁ nonrendering xfer4f_srcover_1_alpha_linear
9/9 MB 1 517µs 517µs 517µs 517µs 0% ▇█▄▃▄▁▂▁▂▄ nonrendering xfer4f_srcover_1_alpha_srgb
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1642703003
TBR=
landing now so these incremental types/functions can be used to collaborate with herb's work. nothing is active at this point
Review URL: https://codereview.chromium.org/1642703003
2016-01-29 05:22:59 -08:00
robertphillips
727b7d27af
Add gpu backend for SkPixelXorXfermode
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1631873002
Review URL: https://codereview.chromium.org/1631873002
2016-01-26 12:07:13 -08:00
senorblanco
eae84c2e0e
Image filters: fix srcOffset handling in asFragmentProcessor() path.
...
Filters such as SkMatrixConvolutionImageFilter which use the
asFragmentProcessor() path were not correctly handling srcOffset.
It is correctly applied to the bounds, but the srcRect and dstRect
were computed from the pre-offset bounds.
The fix is to move them to just above where they're used in drawing.
Note: this change adds a new test case to the imagefiltersgraph GM,
so it will have to be rebaselined post-landing.
BUG=skia:4855
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1637443003
Review URL: https://codereview.chromium.org/1637443003
2016-01-26 08:41:03 -08:00
robertphillips
64b0f5f957
Remove SkLerpXfermode
...
This relies on the Chromium CL https://codereview.chromium.org/1610573004/ (Replace use of SkLerpXfermode with SkArithmeticMode)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1611633002
Review URL: https://codereview.chromium.org/1611633002
2016-01-25 14:19:56 -08:00
robertphillips
914bd435a8
Fix memory leak in pixelxorxfermode GM
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1633773002
TBR=jvanverth@google.com
Review URL: https://codereview.chromium.org/1633773002
2016-01-25 11:34:16 -08:00
robertphillips
37771c349e
Add GM for SkPixelXorXfermode
...
This is in preparation for adding a gpu implementation
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1601743009
Review URL: https://codereview.chromium.org/1601743009
2016-01-25 08:39:08 -08:00
caryclark
fc75253c82
fix arcto exception handling
...
To match SVG behavior,
draw a line when either radius is zero,
or when the end point equals the start point.
Update the GM to include these tests, and
take the scale used to test it on a highres display.
R=fmalita@chromium.org
BUG=skia:4849
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1627423002
Review URL: https://codereview.chromium.org/1627423002
2016-01-25 05:39:04 -08:00
caryclark
55d49053d1
Add svg path arcto
...
The arcto() used by SVG in Chrome and Android is ported here, using conics
instead of cubics. The logic is a direct transposition of the WebKit code.
The attached GM includes SVG that draws the same as Skia.
R=reed@google.com
BUG=skia:3959
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1613303002
Review URL: https://codereview.chromium.org/1613303002
2016-01-23 05:07:04 -08:00
reed
d4eaa25caf
add GM to exercise duplicate color-stops
...
BUG=skia:4841
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1620423002
TBR=
Review URL: https://codereview.chromium.org/1620423002
2016-01-22 10:35:26 -08:00
benjaminwagner
1c2729c8bb
Add SK_SUPPORT_LEGACY_DRAWFILTER guard around calls to SkCanvas::(get|set)DrawFilter.
...
Fixes Google3 dm build. (Can't enable SK_INTERNAL for Google3 dm without enabling it for all dependents.)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1626543002
Review URL: https://codereview.chromium.org/1626543002
2016-01-22 09:45:14 -08:00
djsollen
aa97a84404
Revert of Consolidate SK_CRASH and sk_throw into SK_ABORT (patchset #5 id:80001 of https://codereview.chromium.org/1610823002/ )
...
Reason for revert:
Chrome is calling SK_CRASH
Original issue's description:
> Consolidate SK_CRASH and sk_throw into SK_ABORT
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1610823002
>
> Committed: https://skia.googlesource.com/skia/+/4c5cd7d527ed29aabfa72aa47b23a4496eeda357
TBR=reed@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/1620333002
2016-01-22 06:50:25 -08:00
djsollen
4c5cd7d527
Consolidate SK_CRASH and sk_throw into SK_ABORT
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1610823002
Review URL: https://codereview.chromium.org/1610823002
2016-01-22 06:04:55 -08:00
bungeman
f6c7107d03
Expose API for gx font variation axes.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1590223003
Review URL: https://codereview.chromium.org/1590223003
2016-01-21 14:17:47 -08:00
senorblanco
00502373c8
Fix bounds computations for SkDisplacementMapEffect with negative scale.
...
BUG=skia:4835
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1616663003
Review URL: https://codereview.chromium.org/1616663003
2016-01-21 09:55:47 -08:00
caryclark
1a7eb26664
resolution dependent path measure
...
When a dash is drawn through a canvas with a scaled up
matrix, path measure needs the pixel resolution through
the matrix to construct the dash with sufficient
resolution.
Pass the resolution through to path measure.
Replicate chrome bug in skia GM.
R=reed@google.com
BUG=530095
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1608353002
Review URL: https://codereview.chromium.org/1608353002
2016-01-21 07:07:02 -08:00
bsalomon
dfe3e50522
Make colorimagefilter GM not crash when resource path not specified
...
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1619723002
BUG=skia:
Review URL: https://codereview.chromium.org/1619723002
2016-01-21 06:44:09 -08:00
caryclark
2b39ffc9d2
add arc circle gap gm
...
The circle and arc don't line up because
the circle uses conics and arc uses
quadratics.
TBR=reed@google.com
BUG=578885
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1606263002
Review URL: https://codereview.chromium.org/1606263002
2016-01-20 07:46:05 -08:00
bsalomon
e179a9167f
Texturing support for RECTANGLE textures.
...
Uses textureSize() to unnormalize texture coords when reading from a RECTANGLE texture. Because of this we also require a later GLSL version to use rectangle textures (1.40).
Note that this causes a issue with the bicubic effect. The texture coords seem to have poor precision and the result is ugly. textureSize() is intended as a workaround until effects can be updated to handle unnormalized coords themselves.
Updates places where we were looking for OpenGL version 3.2 for rectangle support. It was actually added in 3.1.
BUG=skia:3868
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1594483003
Review URL: https://codereview.chromium.org/1594483003
2016-01-20 06:18:10 -08:00
senorblanco
1ea67a31c5
Fix SkAlphaThresholdFilter bounds handling.
...
SkAlphaThresholdFilter was always allocating a mask texture
of the same size as the source texture. In addition to
potentially wasting VRAM, this could cause the mask to be
offset from the source texture, if the resulting bounds
were a different size than the source texture.
The fix is to allocate a mask texture only as large as the
bounds, and to offset it to the bounds origin on draw.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1609573002
Review URL: https://codereview.chromium.org/1609573002
2016-01-19 08:50:18 -08:00
caryclark
b6474dd1a5
fix circular dashing
...
Path measure cannot use the same code approach for quadratics
and cubics. Subdividing cubics repeatedly does not result in
subdivided t values, e.g. a quarter circle cubic divided in
half twice does not have a t value equivalent to 1/4.
Instead, always compute the cubic segment from a pair of
t values.
When finding the length of the cubic through recursive measures,
it is enough to carry the point at a given t to the next
subdivision.
(Chrome suppression has landed already.)
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1602153002
Review URL: https://codereview.chromium.org/1602153002
2016-01-19 08:07:50 -08:00
reed
67b09bf6b7
use pixmaps in mipmap api
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1598803002
Review URL: https://codereview.chromium.org/1598803002
2016-01-16 18:50:35 -08:00
reed
32e0b4a34a
use triangle filter for odd dimensions in mip-levels
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1592473002
Review URL: https://codereview.chromium.org/1592473002
2016-01-15 13:17:08 -08:00
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