aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPathRendererChain.cpp
Commit message (Collapse)AuthorAge
* Add kAAHairline to GpuPathRenderersGravatar Chris Dalton2018-07-27
| | | | | | | | | | | | With the upcoming ccpr stroking, this will no longer be the only path renderer that can handle hairlines. Bug: skia: Change-Id: I45b30ccd578bee1388a3a07a234af76a19768de6 Reviewed-on: https://skia-review.googlesource.com/142272 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Add kAAHairline to GpuPathRenderers"Gravatar Ben Wagner2018-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 880b9d302fadd6449a511b8664682f16cde7dd9c. Reason for revert: Appears to be breaking serialization. See https://ci.chromium.org/raw/build/logs.chromium.org/skia/20180718T201711.486335899Z_000000000077bbff/+/annotations Original change's description: > Add kAAHairline to GpuPathRenderers > > With the upcoming ccpr stroking, this will no longer be the only path > renderer that can handle hairlines. > > Bug: skia: > Change-Id: Idf2543f053c8603c80fcd647ca18ffd9860a85f3 > Reviewed-on: https://skia-review.googlesource.com/142246 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=brianosman@google.com,csmartdalton@google.com Change-Id: I1967c2cf6b1f1307270bf62bb04130cdf84317b7 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/142280 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Add kAAHairline to GpuPathRenderersGravatar Chris Dalton2018-07-18
| | | | | | | | | | | With the upcoming ccpr stroking, this will no longer be the only path renderer that can handle hairlines. Bug: skia: Change-Id: Idf2543f053c8603c80fcd647ca18ffd9860a85f3 Reviewed-on: https://skia-review.googlesource.com/142246 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* ccpr: Enable ccpr by defaultGravatar Chris Dalton2018-06-25
| | | | | | | | | | | | | | | | | | | Now that the path cache is implemented, we can use ccpr everywhere. Modifies ccpr to not cache unless the "fAllowPathMaskCaching" context option is enabled. Adds a small condition to skip complicated paths with more vertices than pixels, simply so we don't regress a couple testcases. Updates skpbench to do three draws before starting the timer, in order to prime the cache. Bug: skia: Change-Id: Ic3a0a2bdad8a22ff6431e77fa4da2b54d6bb9aba Reviewed-on: https://skia-review.googlesource.com/137207 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make GrCaps and GrShaderCaps private.Gravatar Brian Salomon2018-05-11
| | | | | | | | | Moves getCaps() from GrContext to GrContextPriv and removes unused refCaps(). Change-Id: Ic6a8951b656c0d1b2773eae73bff8e88af819866 Reviewed-on: https://skia-review.googlesource.com/127389 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove the MSAA path rendererGravatar Chris Dalton2018-04-25
| | | | | | | | Bug: skia: Change-Id: Ib18bede613c8d27fd6326f655dc2d638e35870ff Reviewed-on: https://skia-review.googlesource.com/123726 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "ccpr: Don't preempt the convex path renderer"Gravatar Chris Dalton2018-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1804b3528c53f52664d9d344950f38e62bf7a71f. Reason for revert: Didn't help Original change's description: > ccpr: Don't preempt the convex path renderer > > It seems to perform better on RRects from web pages. > > Bug: skia:7825 > Change-Id: Ibecf33849c6d14e7486d9de740b1cc42f274080f > Reviewed-on: https://skia-review.googlesource.com/122626 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=brianosman@google.com,csmartdalton@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia:7825 Change-Id: I06ca833c09f43f4e01989699c88610ae2ef72516 Reviewed-on: https://skia-review.googlesource.com/123381 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* ccpr: Don't preempt the convex path rendererGravatar Chris Dalton2018-04-19
| | | | | | | | | | It seems to perform better on RRects from web pages. Bug: skia:7825 Change-Id: Ibecf33849c6d14e7486d9de740b1cc42f274080f Reviewed-on: https://skia-review.googlesource.com/122626 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Hide GrPixelConfig in SkSurfaceCharacterizationGravatar Robert Phillips2018-04-04
| | | | | | | | TBR=bsalomon@google.com Change-Id: Ifc38d0ca2b18128d27c187f789461fea62d1edae Reviewed-on: https://skia-review.googlesource.com/117440 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "vulkan: Blacklist MSAA path renderer on Qualcomm drivers"Gravatar Chris Dalton2018-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 03616574024a7f321e885e5ab6fc575746573109. Reason for revert: Caused more bad golds than it fixed Original change's description: > vulkan: Blacklist MSAA path renderer on Qualcomm drivers > > Bug: skia:7758 > Change-Id: I96b5c259352949d67f5e0263a7164cdce54b3269 > Reviewed-on: https://skia-review.googlesource.com/117152 > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=djsollen@google.com,egdaniel@google.com,csmartdalton@google.com Change-Id: I80714a4cba7d495bc6ad89616b6c5f6eb8492bdb No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7758 Reviewed-on: https://skia-review.googlesource.com/117340 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* vulkan: Blacklist MSAA path renderer on Qualcomm driversGravatar Chris Dalton2018-03-29
| | | | | | | | | Bug: skia:7758 Change-Id: I96b5c259352949d67f5e0263a7164cdce54b3269 Reviewed-on: https://skia-review.googlesource.com/117152 Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Move resourceProvider accessor to GrContextPriv (take 2)Gravatar Robert Phillips2018-01-16
| | | | | | | | TBR=bsalomon@google.com Change-Id: I3fd46ebfad0d04b8a2bfa6190f81308f3a6be620 Reviewed-on: https://skia-review.googlesource.com/95121 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Move resourceProvider accessor to GrContextPriv"Gravatar Hal Canary2018-01-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1f9ed8501b0007846b3032f4bfc38aee98c175a1. Reason for revert: 1. breaking android roll 2. breaking Build-Debian9-Clang-arm-Release-Android_API26 Original change's description: > Move resourceProvider accessor to GrContextPriv > > Change-Id: I5cddd620a7ec4b006b7359864ede58e9d4dd684e > Reviewed-on: https://skia-review.googlesource.com/94340 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I20b2d267c0925f20453b635663654967199a1197 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/94964 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Move resourceProvider accessor to GrContextPrivGravatar Robert Phillips2018-01-16
| | | | | | | | Change-Id: I5cddd620a7ec4b006b7359864ede58e9d4dd684e Reviewed-on: https://skia-review.googlesource.com/94340 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Setup CCPR testing with GrMockContextGravatar Chris Dalton2017-11-06
| | | | | | | | | | | Beefs up the mock context to be able to support CCPR, sets up a framework for testing CCPR with the mock context, and adds a new test. Bug: skia: Change-Id: If95f92726f7b1a7f52ad04ca8126551f58ea8032 Reviewed-on: https://skia-review.googlesource.com/67980 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Enable CCPR for volatile pathsGravatar Chris Dalton2017-10-17
| | | | | | | | | | Enables for volatile paths and when path mask caching is disabled. Bug: skia: Change-Id: I644b17f2a4f77a4ddf85265f520599499c0800cf Reviewed-on: https://skia-review.googlesource.com/60481 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Enable coverage counting path rendering except on Android framework"Gravatar Chris Dalton2017-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 196efbf71cdd9a64b807e5e869cd45da5a66ac36. Reason for revert: 1k SKPs GPU bot fails, perf regressions to look into. Original change's description: > Enable coverage counting path rendering except on Android framework > > Android framework will come after collecting a bit more data. > > Bug: skia: > Change-Id: I6f4738e457f09c976b8bf282153ca75160a1d91c > Reviewed-on: https://skia-review.googlesource.com/55563 > Commit-Queue: Chris Dalton <csmartdalton@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,csmartdalton@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: I3f1a7022414ccec80541772d9912065fa4efd74e Reviewed-on: https://skia-review.googlesource.com/57300 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Enable coverage counting path rendering except on Android frameworkGravatar Chris Dalton2017-10-07
| | | | | | | | | | Android framework will come after collecting a bit more data. Bug: skia: Change-Id: I6f4738e457f09c976b8bf282153ca75160a1d91c Reviewed-on: https://skia-review.googlesource.com/55563 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Enable coverage counting path rendering on non-Android"Gravatar Jim Van Verth2017-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c739b7260a36ed4f9ea803991909a438629ca1d2. Reason for revert: Turning tree red. Original change's description: > Enable coverage counting path rendering on non-Android > > Bug: skia: > Change-Id: Ife4c4378bf4323fb4a58fecfade09320ebc28026 > Reviewed-on: https://skia-review.googlesource.com/53000 > Reviewed-by: Derek Sollenberger <djsollen@google.com> > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=djsollen@google.com,csmartdalton@google.com,reed@google.com Change-Id: I89ef472a95320ff21684ca697295cd8b3939322e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/53522 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Enable coverage counting path rendering on non-AndroidGravatar Chris Dalton2017-09-29
| | | | | | | | | Bug: skia: Change-Id: Ife4c4378bf4323fb4a58fecfade09320ebc28026 Reviewed-on: https://skia-review.googlesource.com/53000 Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Shrink GrDrawOpAtlases when no longer needed, take 2.Gravatar Jim Van Verth2017-09-26
| | | | | | | | Bug: skia:3550 Change-Id: Id483a76b9edcf29f7ea0aad0dd8946a3655ba8f2 Reviewed-on: https://skia-review.googlesource.com/50600 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Revert "Shrink GrDrawOpAtlases when no longer needed"Gravatar Jim Van Verth2017-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7cf59526c9b1ab3682e875d449200e51f3b6ff32. Reason for revert: Red red bots... it's tearing me apart... Original change's description: > Shrink GrDrawOpAtlases when no longer needed > > Bug: skia:3550 > Change-Id: I7b09aa2b0fd22ed99694f32f9f395392ef80e238 > Reviewed-on: https://skia-review.googlesource.com/49901 > Commit-Queue: Jim Van Verth <jvanverth@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I8331ec79b0796e1f75d7cc53b9753f886aea7fcd No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:3550 Reviewed-on: https://skia-review.googlesource.com/50220 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Shrink GrDrawOpAtlases when no longer neededGravatar Jim Van Verth2017-09-22
| | | | | | | | | Bug: skia:3550 Change-Id: I7b09aa2b0fd22ed99694f32f9f395392ef80e238 Reviewed-on: https://skia-review.googlesource.com/49901 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Improve heuristics for when to use ccprGravatar Chris Dalton2017-09-12
| | | | | | | | | | | | | Gives the convex and tessellating renderers first claim on larger paths, and the distance field renderer first claim on complex, non-volatile paths. This also requires plumbing the clip bounds through GrPathRenderer::CanDrawPathArgs. Bug: skia: Change-Id: I16e1d35ad5ee63251e33f113b1579cbba60456da Reviewed-on: https://skia-review.googlesource.com/42224 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Improve GrPathRendererChain heuristicsGravatar Chris Dalton2017-09-07
| | | | | | | | | | | | Changes GrPathRenderer::canDrawPath to return a 'CanDrawPath' enum, which contains a new kAsBackup value that means "I'm better than SW, but give the path renderers below me a chance first." Bug: skia: Change-Id: Ia339567800a3127e61b9beaed19504cd504f18af Reviewed-on: https://skia-review.googlesource.com/43761 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Improve GrPathRendererChain heuristics"Gravatar Chris Dalton2017-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 60f42494f5d45c38e260ce089cdddfb600f799b2. Reason for revert: breaking gold Original change's description: > Improve GrPathRendererChain heuristics > > Changes GrPathRenderer::canDrawPath to return a 'CanDrawPath' enum, > which contains a new kAsBackup value that means "I'm better than SW, > but give the path renderers below me a chance first." > > Bug: skia: > Change-Id: I45aac5462ca1bc0bc839eb1c315db9493901a07e > Reviewed-on: https://skia-review.googlesource.com/42222 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=jvanverth@google.com,bsalomon@google.com,brianosman@google.com,csmartdalton@google.com,senorblanco@google.com Change-Id: I46020dbd56b6f6b88668894285b9b7b80f89b9a2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/43780 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Improve GrPathRendererChain heuristicsGravatar Chris Dalton2017-09-07
| | | | | | | | | | | | | Changes GrPathRenderer::canDrawPath to return a 'CanDrawPath' enum, which contains a new kAsBackup value that means "I'm better than SW, but give the path renderers below me a chance first." Bug: skia: Change-Id: I45aac5462ca1bc0bc839eb1c315db9493901a07e Reviewed-on: https://skia-review.googlesource.com/42222 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Move several GrContextOptions fields behind GR_TEST_UTILSGravatar Brian Osman2017-08-30
| | | | | | | | Bug: skia: Change-Id: I35bc08ad72fb94d8e47fe342d314c4496b954226 Reviewed-on: https://skia-review.googlesource.com/40881 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Make AA hairline renderer non-optionalGravatar Brian Osman2017-08-30
| | | | | | | Change-Id: I0d4166a4e9ea894f479755f9f7137c5941cf8a22 Reviewed-on: https://skia-review.googlesource.com/41081 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Always include the default path renderer in the chainGravatar Brian Osman2017-08-29
| | | | | | | | | | | | | This (plus SW) ensures that we can always draw any path. Changed the path renderer command line flags so that 'default' means everything but CCPR, and 'All' really means 'every path renderer'. Bug: skia: Change-Id: I2801d1c50ab939f23efb4600e0f90e6add2891b7 Reviewed-on: https://skia-review.googlesource.com/40221 Reviewed-by: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Coverage counting path rendererGravatar Chris Dalton2017-07-14
| | | | | | | | | | | | | | | Initial implementation of a GPU path renderer that draws antialiased paths by counting coverage in an offscreen buffer. Initially disabled until it has had time to soak. Bug: skia: Change-Id: I003d8cfdf8dc62641581b5ea2dc4f0aa00108df6 Reviewed-on: https://skia-review.googlesource.com/21541 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Update minimum non-ES OpenGL spec to 2.0.Gravatar Brian Salomon2017-05-08
| | | | | | | | | | | As a consequence of removing support for GLs lacking separate stencil settings our effective minimum GL version is 2.0. This formalizes that by explicitly failing if the version in the version string is lower. As a consequence we will always have wrapping stencil operations available. Bug: skia: Change-Id: Ibe302f72a063dbadc773bda811cc0d0f6c08c61a Reviewed-on: https://skia-review.googlesource.com/15610 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Remove support for GLs without separate stencil.Gravatar Brian Salomon2017-05-08
| | | | | | | | | | | As a consequence we no longer need GrDrawFace. This effectively raises the minimum bar for non-ES OpenGL to 2.0 as there is no extension that adds the GL 2.0 separate stencil functionality. GL_ATI_separate_stencil is close but it does not have glStencilMaskSeparate. Bug: skia: Change-Id: I36d17a69400c8beeacb6dab8d8c5c3317814cfe4 Reviewed-on: https://skia-review.googlesource.com/15603 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Rename GrAADistanceFieldPathRenderer to GrSmallPathRendererGravatar Jim Van Verth2017-03-16
| | | | | | | | | Also disables use of small distance fields in Android framework. Change-Id: I1ba40ce85aa34d067608587e1fbe1d42e8a42868 Reviewed-on: https://skia-review.googlesource.com/9731 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Remove PLS path rendererGravatar Brian Salomon2017-03-06
| | | | | | | Change-Id: Ib727b0749a5a7da95832970e79804417e8b6a247 Reviewed-on: https://skia-review.googlesource.com/9300 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add path renderer options to viewer GUIGravatar Brian Osman2017-03-01
| | | | | | | | | | BUG=skia: Change-Id: I248ba081f0229d7fcf2071009076acc88b80b076 Reviewed-on: https://skia-review.googlesource.com/9088 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add the ability to enable/disable GPU path renderersGravatar csmartdalton2017-02-22
| | | | | | | | | | | | | | Adds a bitfield to GrContextOptions that masks out path renderers. Adds commandline flags support to set this bitfield in tools apps. Removes GrGLInterfaceRemoveNVPR since we can now accomplish the same thing in the context options. BUG=skia: Change-Id: Icf2a4df36374b3ba2f69ebf0db56e8aedd6cf65f Reviewed-on: https://skia-review.googlesource.com/8786 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Quality and performance fixes for AA tessellating path renderer."Gravatar Stephan White2017-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d4b21552481a6d313dfa9bc14b624c9ec94b56ce. Reason for revert: accidentally added some unwanted changes Original change's description: > Quality and performance fixes for AA tessellating path renderer. > > Use quads rather than triangles for the edge geometry. This allows > us to perform a simpler edge categorization (see below). It also > improves performance by reducing the number of edges processed during > the simplify and tessellate steps. > > Label AA edges as three types: inner, outer, and connector. This > results in correct alpha values for intersected edges, even when > the top or bottom vertex has been merged with a vertex on edges > of different types. > > Changed the "collinear edges" sample from the concavepaths GM for a > "fast-foward" shape, which more clearly shows the problem being fixed > here. (The collinearity from the "collinear edges" was actually being > removed earlier up the stack, causing the path to become convex and > not exercise the concave path renderers anyway.) > > NOTE: this will cause changes in the "concavepaths" GM results, and > minor pixel diffs in a number of other tests. > > BUG=660893 > > Change-Id: Ide49374d6d173404c7223f7316dd439df1435787 > Reviewed-on: https://skia-review.googlesource.com/6427 > Commit-Queue: Stephan White <senorblanco@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=bsalomon@google.com,senorblanco@chromium.org,reviews@skia.org BUG=660893 NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I06a36e397645bfc42442a5a9e7c27328f6048ab9 Reviewed-on: https://skia-review.googlesource.com/6428 Commit-Queue: Stephan White <senorblanco@chromium.org> Reviewed-by: Stephan White <senorblanco@chromium.org>
* Quality and performance fixes for AA tessellating path renderer.Gravatar Stephen White2017-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use quads rather than triangles for the edge geometry. This allows us to perform a simpler edge categorization (see below). It also improves performance by reducing the number of edges processed during the simplify and tessellate steps. Label AA edges as three types: inner, outer, and connector. This results in correct alpha values for intersected edges, even when the top or bottom vertex has been merged with a vertex on edges of different types. Changed the "collinear edges" sample from the concavepaths GM for a "fast-foward" shape, which more clearly shows the problem being fixed here. (The collinearity from the "collinear edges" was actually being removed earlier up the stack, causing the path to become convex and not exercise the concave path renderers anyway.) NOTE: this will cause changes in the "concavepaths" GM results, and minor pixel diffs in a number of other tests. BUG=660893 Change-Id: Ide49374d6d173404c7223f7316dd439df1435787 Reviewed-on: https://skia-review.googlesource.com/6427 Commit-Queue: Stephan White <senorblanco@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* move src/gpu/batches -> src/gpu/opsGravatar Brian Salomon2016-12-16
| | | | | | | Change-Id: I6410eae41f051ce38bef6f38d670924c3483c325 Reviewed-on: https://skia-review.googlesource.com/6163 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Remove antialias axis from GrPathRendererChain::DrawTypeGravatar Brian Salomon2016-12-13
| | | | | | | Change-Id: I910ef57027059c3c7dd780ba9de40363c201e174 Reviewed-on: https://skia-review.googlesource.com/5728 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Merge GrGLSLCaps into GrShaderCapsGravatar Brian Salomon2016-11-29
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5121 Change-Id: If8d13638f80f42161cbc766a2666c5789e5772c8 Reviewed-on: https://skia-review.googlesource.com/5121 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add optional sw generated path coverage mask cachingGravatar bsalomon2016-09-21
| | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335343008 All the bots except the painfully slow windows compiler have finished so, NOTRY=true Review-Url: https://codereview.chromium.org/2335343008
* Add GrContextOptions flag to disable distance field path renderer.Gravatar bsalomon2016-09-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339213002 Review-Url: https://codereview.chromium.org/2339213002
* Disable MSAAPathRender for Android Framework buildsGravatar robertphillips2016-09-01
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2298613005 Review-Url: https://codereview.chromium.org/2298613005
* Screenspace AA tessellated GPU path rendering.Gravatar senorblanco2016-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an approach to antialiased concave path rendering on the GPU without using MSAA. It uses GrTessellator to extract boundary contours from the given path, then inflates by half a pixel in screen space each direction, then renders the result with zero alpha on the outer contour and one alpha on in the inner contour. This requires two passes through the tessellation code: one to extract the boundaries, then one to tessellate the result. This gives approximately a 3X improvement on the IE chalkboard demo in non-MSAA mode, a 30-40% improvement on MotionMark's "Fill Paths", and a ~3X improvement on MotionMark's "canvas arcTo segments". It works best for large, simple paths, so there's currently a limit of 10 verbs in the onCanDrawPath() check. This dovetails nicely with the distance field path renderer's support for small, detailed (and cached) paths. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1152733009 NOTRY=true Review-Url: https://codereview.chromium.org/1152733009
* Revert of Screenspace AA tessellated path rendering. (patchset #37 id:730001 ↵Gravatar senorblanco2016-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/1152733009/ ) Reason for revert: Causing asserts in GLPrograms test on Mac. Original issue's description: > Screenspace AA tessellated GPU path rendering. > > This is an approach to antialiased concave path rendering > on the GPU without using MSAA. It uses GrTessellator to > extract boundary contours from the given path, then > inflates by half a pixel in screen space each direction, > then renders the result with zero alpha on the outer > contour and one alpha on in the inner contour. This > requires two passes through the tessellation code: one > to extract the boundaries, then one to tessellate the > result. > > This gives approximately a 3X improvement on the IE > chalkboard demo in non-MSAA mode, a 30-40% improvement > on MotionMark's "Fill Paths", and a ~3X improvement on > MotionMark's "canvas arcTo segments". > > It works best for large, simple paths, so there's currently > a limit of 10 verbs in the onCanDrawPath() check. This > dovetails nicely with the distance field path renderer's > support for small, detailed (and cached) paths. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1152733009 > > Committed: https://skia.googlesource.com/skia/+/9992bdef8ae97b3e5b109d278ccfab84c66bcbf0 TBR=bsalomon@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/2299683002
* Screenspace AA tessellated GPU path rendering.Gravatar senorblanco2016-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is an approach to antialiased concave path rendering on the GPU without using MSAA. It uses GrTessellator to extract boundary contours from the given path, then inflates by half a pixel in screen space each direction, then renders the result with zero alpha on the outer contour and one alpha on in the inner contour. This requires two passes through the tessellation code: one to extract the boundaries, then one to tessellate the result. This gives approximately a 3X improvement on the IE chalkboard demo in non-MSAA mode, a 30-40% improvement on MotionMark's "Fill Paths", and a ~3X improvement on MotionMark's "canvas arcTo segments". It works best for large, simple paths, so there's currently a limit of 10 verbs in the onCanDrawPath() check. This dovetails nicely with the distance field path renderer's support for small, detailed (and cached) paths. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1152733009 Review-Url: https://codereview.chromium.org/1152733009
* Use GrShape in GrPathRenderer.Gravatar bsalomon2016-06-24
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2081383006 Review-Url: https://codereview.chromium.org/2081383006
* Replace GrStrokeInfo with GrStyle.Gravatar bsalomon2016-05-10
| | | | | | | | | A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002 Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f Review-Url: https://codereview.chromium.org/1957363002