aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ccpr/GrCCPRCoverageOp.cpp
Commit message (Collapse)AuthorAge
* CCPR: Don't use instanced draw calls with geometry shadersGravatar Chris Dalton2017-12-11
| | | | | | | | | | | | It isn't necessary for the vertex shader to know all the points because everything happens in the geometry shader. It's simpler to use regular vertex arrays instead. Bug: skia: Change-Id: I7bf83180476fbe0ab01492611cd72e72b3f7d4f2 Reviewed-on: https://skia-review.googlesource.com/82881 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* CCPR: Combine loops and serpentines back into a single shaderGravatar Chris Dalton2017-12-08
| | | | | | | | Bug: skia: Change-Id: I945471ccd2580a2d39afd9c80acb8d9e5e196435 Reviewed-on: https://skia-review.googlesource.com/82460 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* CCPR: Eliminate texel buffersGravatar Chris Dalton2017-12-05
| | | | | | | | | | | | | | | | | | Points cost 8 bytes and indices cost 4. If a point is accessed twice, it's a wash whether we duplicate it or index. This change eliminates texel buffers by duplicating points across instance arrays. This reduces our dependence on extensions as well as getting rid of our indirect memory access pattern in vertex shaders. As a result of this change, memory usage by GPU buffers will only be a fraction larger at worst, and slightly better at best. Bug: skia: Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD Change-Id: I3c7f03772edd4f850d5fdd7b55552647335c1b52 Reviewed-on: https://skia-review.googlesource.com/79185 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add analytic clip FPs that read from the CCPR atlasGravatar Chris Dalton2017-12-05
| | | | | | | | Bug: skia:7190 Change-Id: Ie31d368f52910e6917efdeb1b024370b06fc11ee Reviewed-on: https://skia-review.googlesource.com/77160 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* CCPR: Transform path points before parsingGravatar Chris Dalton2017-11-27
| | | | | | | | | | | | | | | Transforms a path's points into a local buffer up front, rather than transforming as we parse. This hopefully gets better vector performance as well as allowing us to skip the transformation step for paths that are known to be in device space already. Introduces a test for parsing empty paths and does general cleanup. Bug: skia:7190 Change-Id: Ib86d2ffcdef6fa3ec66f6d9ad4b10c0b6d44c0dc Reviewed-on: https://skia-review.googlesource.com/74621 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Convert geometry shaders to operate in Skia device spaceGravatar Chris Dalton2017-10-25
| | | | | | | | | | | | | Defers the transformation to normalized window coordinates until after the geometry shader. Merges vertex and a geometry shader builders into a single compilation unit with a common base class. Updates CCPR geometry shaders accordingly. Bug: skia: Change-Id: If93c90e978b1fdc7120febd05cfb05810fd496b5 Reviewed-on: https://skia-review.googlesource.com/62980 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Refactor CCPR coverage shaders for a vertex implGravatar Chris Dalton2017-10-16
| | | | | | | | | | | | | Decouples geometry generation and analytic coverage. This paves the way for a vertex shader implementation. TBR=egdaniel@google.com Bug: skia: Change-Id: I2a183401bfe70b9f14b9b1cf035de6020a2135fa Reviewed-on: https://skia-review.googlesource.com/60103 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Refactor CCPR coverage shaders for a vertex impl"Gravatar Eric Boren2017-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e501033bbdc9143848edde3c3e3b7282169bc11e. Reason for revert: Broke several bots Original change's description: > Refactor CCPR coverage shaders for a vertex impl > > Decouples geometry generation and analytic coverage. This paves the > way for a vertex shader implementation. > > Bug: skia: > Change-Id: I23b79d4397db22bd8fc063b8dfca58ab00037292 > Reviewed-on: https://skia-review.googlesource.com/59200 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,csmartdalton@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: I314bf03fa6cbeceb1c527d4d9464147b2e8464c6 Reviewed-on: https://skia-review.googlesource.com/59821 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Eric Boren <borenet@google.com>
* Refactor CCPR coverage shaders for a vertex implGravatar Chris Dalton2017-10-15
| | | | | | | | | | | Decouples geometry generation and analytic coverage. This paves the way for a vertex shader implementation. Bug: skia: Change-Id: I23b79d4397db22bd8fc063b8dfca58ab00037292 Reviewed-on: https://skia-review.googlesource.com/59200 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* CCPR: Avoid left shifts on negative numbersGravatar Chris Dalton2017-10-03
| | | | | | | | | | (ASAN doesn't like them.) Bug: skia: Change-Id: Id28d3ea9cabc9895cb097eae3e437f557178fe1c Reviewed-on: https://skia-review.googlesource.com/54180 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* CCPR: Handle very large pathsGravatar Chris Dalton2017-09-28
| | | | | | | | Bug: skia:7073 Change-Id: Iec4276703d56c14a8bdd8c34ac37fa2e6af02d0c Reviewed-on: https://skia-review.googlesource.com/52502 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* CCPR: Remove kCombinedTriangleHullsAndEdgesGravatar Chris Dalton2017-09-26
| | | | | | | | | | | | | | Removes the mode that generates edge and hull geometry simultaneously from the geometry shader. Perf was hit and miss and it's not compatible with vertex shaders. We can revisit if geometry shaders still show promise on some platforms after a vertex shader impl is finished. Bug: skia: Change-Id: I984231e9a5bb60fe31d3ba280c7390a74aa5bc27 Reviewed-on: https://skia-review.googlesource.com/51300 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* CCPR: Remove cubic insets and MSAA bordersGravatar Chris Dalton2017-09-05
| | | | | | | | | | | | | | | Avoids the need for MSAA cubic borders by chopping up the cubic geometry and crossing the inflections points and loop intersections with lines and quadratic(s) instead. This allows us to render the remaining cubic segments with simple hulls and analytic AA, giving better image quality and performance. Bug: skia: Change-Id: If371229f575ee0286c325c230a116d602a9d38ce Reviewed-on: https://skia-review.googlesource.com/41883 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* CCPR: Rewrite path parsingGravatar Chris Dalton2017-09-05
Creates a GrCCPRGeometry class that chops contours up into simple segments that ccpr can render, and rewrites the GPU buffer creation to be able to handle arbitrary lengths of ccpr geometry. Bug: skia: Change-Id: Iaa173a02729e177b0ed7ef7fbb9195d349be689d Reviewed-on: https://skia-review.googlesource.com/41963 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>