The hack was added to make analytic ambient shadows match the geometric
ones exactly. Removing it does produce a slight difference, but it's
only visible at full black values (and then, only slightly) and this
makes room to pass a blend parameter for falloff.
Also fixes an issue with filling out arcs in the shadow tesselator.
Bug: skia:7486
Change-Id: If78d0104df7e18f4320c1658af75576f6a4a8c73
Reviewed-on: https://skia-review.googlesource.com/122580
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
The strike cache and the glpyh cache have been friends
for a long time. Untangle this twisted relationship.
BUG=skia:7515
Change-Id: Ie77393f6923e9886ec90ff7a60a1200e78319937
Reviewed-on: https://skia-review.googlesource.com/122084
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
BUG=skia:7515
Change-Id: Ic1580d4752d51a62df5427a28f843bc7b3181797
Reviewed-on: https://skia-review.googlesource.com/122020
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Adds support for spot shadow outlines. Since filling the penumbra still
needs to be done, this code is disabled for now.
Bug: skia:
Change-Id: I3369eb13832b47ad16dd29ce7c7d6a1a10b39aeb
Reviewed-on: https://skia-review.googlesource.com/22363
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Removes fCurrAnchorPoint, and various other cleanups. fCurrAnchorPoint
was originally added because points were expected to be written directly
to mapped GPU buffers, which is not going to happen anymore.
Bug: skia:
Change-Id: Icaf8d09dae218f58c19a2f368f3cd281e285e2dd
Reviewed-on: https://skia-review.googlesource.com/119984
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Add a check to see that the close path generated line
is horizontal or vertical when determining that path
is a rect.
Also change several tests to defer their initialization
to reduce debugging interference.
R=brianosman@google.com,robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: I4a081ee4ffd3558b499a7a1aede2d6232059715e
Reviewed-on: https://skia-review.googlesource.com/120081
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Handles weighted triangles from the tessellator instead with a
"kWeightedTriangles" PrimitiveType.
Bug: skia:
Change-Id: I8a6f7b4205e1b3d6f340a30f3e90079ec44b8b6d
Reviewed-on: https://skia-review.googlesource.com/119202
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
SK_IGNORE_TO_STRING is not defined anywhere.
The same effect can be had by using a modern
linker.
Removing it simplifies bookmaker and makes
our includes easier to understand.
R=robertphillips@google.comTBR=reed@google.com
Bug: skia:6898
Change-Id: Ib716f5ef1b42a7fbda0df43ece212d1b7c40289f
Reviewed-on: https://skia-review.googlesource.com/118963
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Renames GrCCCoverageProcessor::RenderPass to PrimitiveType and handles
corners as subpasses instead. Various touchups to coverage processors
now that the overhaul is complete. This change should be strictly a
refactor.
Bug: skia:
Change-Id: I52852463330d5ec71fae7e19fadccd9ede8b2c16
Reviewed-on: https://skia-review.googlesource.com/116169
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Change-Id: I17a695c64be0e2081ad4937b23038b7ce88ae293
Reviewed-on: https://skia-review.googlesource.com/115988
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
The 3x3 inverse grew unstable on small curves with large coordinates,
not to mention being inefficient. This fixes many bad pixels on the
chalkboard.
Also begins scaling curve gradients by the AA bloat, in order to match
triangle edges more closely and visualize curve AA in the ccpr sample.
Bug: skia:
Change-Id: I0f7da2e7599d4d5c458b3dd307185679dc78bb50
Reviewed-on: https://skia-review.googlesource.com/115527
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
A change currently in progress would break these test files since they
aren't including what they use. Make them include what they use so they
don't break in the future.
Change-Id: I25d8d57631706dec0d0197b3759c6c18a0fe3aa0
Reviewed-on: https://skia-review.googlesource.com/114465
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Modifies triangle corner shaders to just approximate their coverage with
linear values that ramp to zero at bloat vertices outside the triangle.
For the vertex backend, since corners now have the same fragment shader
as the rest of the triangle, we fold them in with the other steps and
draw triangles in a single pass.
The geometry backend still draws triangles in two passes, as there is
not an apparent performance advantage in combining them.
Updates SampleCCPRGeometry to better visualize this new geometry by
clearing to black and drawing with SkBlendMode::kPlus.
Bug: skia:
Change-Id: Idf8df8ff715dfab7ac91a07b914f65c08e46010b
Reviewed-on: https://skia-review.googlesource.com/113287
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Holding off on removing definition until android cleans
up its code.
Change-Id: I19cce13d6d1f10f172770a926966761686bc7d6a
Reviewed-on: https://skia-review.googlesource.com/113168
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This reverts commit df04ce2949.
Reason for revert: Going to revisit AAA quality
Original change's description:
> ccpr: Draw curves in a single pass
>
> Throws out the complicated MSAA curve corner shaders, and instead just
> ramps coverage to zero at bloat vertices that fall outside the curve.
>
> Updates SampleCCPRGeometry to better visualize this new geometry by
> clearing to black and drawing with SkBlendMode::kPlus.
>
> Bug: skia:
> Change-Id: Ibe86cbc741d8b015127b10dd43e3b52e7cb35732
> Reviewed-on: https://skia-review.googlesource.com/112626
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com
Change-Id: I014baa60b248d870717f5ee8794e0bed66da86e6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/113181
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 622650a194.
Reason for revert: Going to try to improve AAA quality on curve corners
Original change's description:
> ccpr: Simplify triangle corners
>
> Modifies triangle corner shaders to just approximate their coverage with
> linear values that ramp to zero at bloat vertices outside the triangle.
>
> For the vertex backend, since corners now have the same fragment shader
> as the rest of the triangle, we fold them in with the other steps and
> draw triangles in a single pass.
>
> The geometry backend still draws triangles in two passes, as there is
> not an apparent performance advantage in combining them.
>
> Bug: skia:
> Change-Id: Ib4a89d793a3c706f734d0271875c8a3e5c87c49b
> Reviewed-on: https://skia-review.googlesource.com/112632
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com
Change-Id: I45e7b9d7d7f8452b28bd54ca1e90a1f046cb2462
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/113180
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Modifies triangle corner shaders to just approximate their coverage with
linear values that ramp to zero at bloat vertices outside the triangle.
For the vertex backend, since corners now have the same fragment shader
as the rest of the triangle, we fold them in with the other steps and
draw triangles in a single pass.
The geometry backend still draws triangles in two passes, as there is
not an apparent performance advantage in combining them.
Bug: skia:
Change-Id: Ib4a89d793a3c706f734d0271875c8a3e5c87c49b
Reviewed-on: https://skia-review.googlesource.com/112632
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Throws out the complicated MSAA curve corner shaders, and instead just
ramps coverage to zero at bloat vertices that fall outside the curve.
Updates SampleCCPRGeometry to better visualize this new geometry by
clearing to black and drawing with SkBlendMode::kPlus.
Bug: skia:
Change-Id: Ibe86cbc741d8b015127b10dd43e3b52e7cb35732
Reviewed-on: https://skia-review.googlesource.com/112626
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Updates the geometry shader backend to match the vertex backend and draw
triangle rasters together with their their edges in a single draw call.
This gives a performance boost as well as cleaning up some API
awkwardness.
This is one step toward the final goal of drawing ccpr primitives in a single
pass.
Bug: skia:
Change-Id: I2723692d02b9e39ca5dc5d9e022b528a051988ab
Reviewed-on: https://skia-review.googlesource.com/112104
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
A mechanical bulk move just to get these out of the public API.
TBR=bsalomon@google.com
Change-Id: I813efbd54a09dd448275697c0e50947753a5cfd3
Reviewed-on: https://skia-review.googlesource.com/112262
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:7263
Change-Id: Ifb70212e369ed783bd03a6ff2a540a8f46282595
Reviewed-on: https://skia-review.googlesource.com/109388
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:7263
Change-Id: I90fcc35e8d070b324287139ebecc3d15dbec0137
Reviewed-on: https://skia-review.googlesource.com/109164
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:
Change-Id: If8d2f46b8f27fefc3a0f983eb649654e0fb4afcb
Reviewed-on: https://skia-review.googlesource.com/108685
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
To try to reduce memory usage, the atlas will look for space in
the earliest created pages and then invalidate plots in the latest
page to try to move those plots into an earlier one. The problem
was that the available space was not being evicted, so we kept loading
data back into the latest page.
Bug: skia:
Change-Id: Ic8668f6f66bf1153dbcb5edae7622fa9edfa71dd
Reviewed-on: https://skia-review.googlesource.com/98801
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This increases CPU work, but reduces overdraw on the GPU as compared to
Redbook fanning.
TBR=bsalomon@google.com
Change-Id: I396b887075d4422531908c2361ee1e26f076d5c3
Reviewed-on: https://skia-review.googlesource.com/107141
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 4138c972ef.
Reason for revert: broke android flutter build
Original change's description:
> ccpr: Tessellate fans for very large and/or simple paths
>
> This increases CPU work, but reduces overdraw on the GPU as compared to
> Redbook fanning.
>
> Bug: skia:
> Change-Id: I47239c964261e0014a94266a71223eab0597bfb8
> Reviewed-on: https://skia-review.googlesource.com/105203
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com
Change-Id: I98b5c10b97c3fa603de5122d9bb47ca07659242c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/106620
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
This increases CPU work, but reduces overdraw on the GPU as compared to
Redbook fanning.
Bug: skia:
Change-Id: I47239c964261e0014a94266a71223eab0597bfb8
Reviewed-on: https://skia-review.googlesource.com/105203
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: b/63908092
Rather than keeping track of the time and whether the animation is
running, leave that up to the client. Offer a single method to decode
the next frame, allowing the client to stay one frame ahead.
Change-Id: I546013e32e3a0874181b0dce1349bbec07aaadd4
Reviewed-on: https://skia-review.googlesource.com/101544
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Instead of a flat animator space, introduce animator groups.
This allows us to encapsulate layer animators and only dispatch ticks
when their owning layer is active.
TBR=
Change-Id: I1fc8a55abf68a712b71969bb1a11275dbe54c236
Reviewed-on: https://skia-review.googlesource.com/101201
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
On certain iOS devices half has a mantissa of only 10 bits, which is not
enough to perform the floating point trickery to get the lower bits
out of the "texture coordinates". Instead we use int if available, and
float if not available.
Also re-enables multitexturing for iOS and adds a sample which
stresses the issue, and a version of fontcache that tests multitexturing.
Bug: skia:7285
Change-Id: Ia541b6a418c1860c941071750ceb26459eb846ea
Reviewed-on: https://skia-review.googlesource.com/99800
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>