aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/gpu.gni
Commit message (Collapse)AuthorAge
...
* ccpr: Make curve corners more seamlessGravatar Chris Dalton2018-04-06
| | | | | | | | | | | | | | | Interpolates the acual curve's local coverage values from the corner box vertices, rather than an approximation based on the tangent. Clamps curve segment total coverage values above 0. This prevents us from using negative coverage (which is obviously wrong) when the curve approximation function is slightly inaccurate. Moves GrCCTriangleShader.h into GrCCCoverageProcessor.cpp. Bug: skia: Change-Id: I95de8e940c1508d4a359f5f802c3a688f2b84094 Reviewed-on: https://skia-review.googlesource.com/119066 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Remove path ranges from gpu.Gravatar Ben Wagner2018-03-29
| | | | | | | | | | These appear to have been added to handle glyph paths with nvpr and no longer appear to be used. Change-Id: Id75e2e85ab837a5808e7641873d217c844cd827c Reviewed-on: https://skia-review.googlesource.com/117103 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove legacy GrContext factories function and supporting code/types.Gravatar Brian Salomon2018-03-23
| | | | | | | Change-Id: I437a4a0a58bf70ea1b8b0659b099a2af2bfa64fe Reviewed-on: https://skia-review.googlesource.com/116197 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* move blur impl into coreGravatar Mike Reed2018-03-12
| | | | | | | | | | | | | | | | Ever since we added drawShadow to the public api, blurs have necessarily part of the core. This CL just formalizes that. This should also allow us to have builds that exclude all of /effects (for code size) and still be valid. Will follow-up with a change to deprecate SkBlurMaskFilter and SkBlurQuality (both no longer needed). Bug: skia: Change-Id: Ifbbd8b47a30a0386d215726b67bcf1e8b84fb8f5 Reviewed-on: https://skia-review.googlesource.com/113713 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* ccpr: Simplify triangle cornersGravatar Chris Dalton2018-03-09
| | | | | | | | | | | | | | | | | | | | | 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>
* Add ability to uninstantiate lazy proxies after every flush.Gravatar Greg Daniel2018-03-08
| | | | | | | | | Bug: skia: Change-Id: Id32540cda54a9c5e3e6cb721776699be3cc8ac1a Reviewed-on: https://skia-review.googlesource.com/113263 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Split GrDDL- & GrDirect- Contexts into their own filesGravatar Robert Phillips2018-03-08
| | | | | | | | | Following up on an prior CLs TODO Change-Id: I99397d4ffa5cc67b39726900f48b399e38fdbdd9 Reviewed-on: https://skia-review.googlesource.com/113201 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "ccpr: Simplify triangle corners"Gravatar Chris Dalton2018-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 622650a1949f9a68793ac895d9fbadee7177d860. 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>
* ccpr: Simplify triangle cornersGravatar Chris Dalton2018-03-08
| | | | | | | | | | | | | | | | | | 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>
* Fission GrAtlasGlyphCache in two (take 2)Gravatar Robert Phillips2018-03-01
| | | | | | | | | | | | | | | | | | | | | Reland all the things This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager. The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager) and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation time and provides access to the proxies backing the atlases. The full GrAtlasManager is only available at flush time and allows instantiation of the proxies and uploading to them. In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the GrAtlasManager in the main thread. This future atlas manager will have had all of its GrDrawOpAtlases created (but not instantiated) so there should be no race conditions. TBR=jvanverth@google.com Change-Id: I05c6cd8d301bf2decca39765e5cae62993d9da04 Reviewed-on: https://skia-review.googlesource.com/111362 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Revert "Fission GrAtlasGlyphCache in two"Gravatar Robert Phillips2018-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit acf17904d6286f2a63a5d895541804d0ea1be646. Reason for revert: Chrome Original change's description: > Fission GrAtlasGlyphCache in two > > This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager. > > The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager) > and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation > time and provides access to the proxies backing the atlases. The full GrAtlasManager is > only available at flush time and allows instantiation of the proxies and uploading to them. > > In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the > GrAtlasManager in the main thread. This future atlas manager will have had all of its > GrDrawOpAtlases created (but not instantiated) so there should be no race conditions. > > Change-Id: I9967d3a4116af50128f390c5039a712b8cd4db08 > Reviewed-on: https://skia-review.googlesource.com/108001 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I7c760ea1a9f041a310b96d552aa1497ee5902cd8 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/111040 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fission GrAtlasGlyphCache in twoGravatar Robert Phillips2018-02-27
| | | | | | | | | | | | | | | | | | This CL splits the old GrAtlasGlyphCache into a GrAtlasGlyphCache and an GrAtlasManager. The GrAtlasManager itself is split into a rather limited base class (GrRestrictedAtlasManager) and the all powerful GrAtlasManager. The GrRestrictedAtlasManager is available at op creation time and provides access to the proxies backing the atlases. The full GrAtlasManager is only available at flush time and allows instantiation of the proxies and uploading to them. In the DDL world all of the DDL Contexts will receive a GrRestrictedAtlasManager-version of the GrAtlasManager in the main thread. This future atlas manager will have had all of its GrDrawOpAtlases created (but not instantiated) so there should be no race conditions. Change-Id: I9967d3a4116af50128f390c5039a712b8cd4db08 Reviewed-on: https://skia-review.googlesource.com/108001 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Remove unused class GrDDLGpuGravatar Brian Salomon2018-02-08
| | | | | | | | Change-Id: I66c0bb988e187cb6be43b2d2a726023b0bb25b69 Reviewed-on: https://skia-review.googlesource.com/105764 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove GrStencilAndCoverTextContextGravatar Robert Phillips2018-02-07
| | | | | | | | TBR=bsalomon@google.com Change-Id: Ibbb26e2ba74df43c3156f95bea258cda998500cb Reviewed-on: https://skia-review.googlesource.com/105260 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Revert "Revert "move GrColor.h to private, IWYU""Gravatar Mike Reed2018-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 63cc29304a65039feaf27842d587ed16de010b0d. Reason for revert: pdfium updated Original change's description: > Revert "move GrColor.h to private, IWYU" > > This reverts commit e602f395813aab8242afad356008b8e79911adbb. > > Reason for revert: Breaks PDFIUM > > Original change's description: > > move GrColor.h to private, IWYU > > > > Bug: skia: > > Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e > > Reviewed-on: https://skia-review.googlesource.com/104160 > > Commit-Queue: Mike Reed <reed@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,reed@google.com > > Change-Id: Ifaa50f8771fa1ca8bc152270efdb1fe27f7210f2 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/104440 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,reed@google.com Change-Id: I22fa5c0e0628b5c1f3b5f13879c7d1a4528cc93a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/104561 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "move GrColor.h to private, IWYU"Gravatar Brian Salomon2018-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e602f395813aab8242afad356008b8e79911adbb. Reason for revert: Breaks PDFIUM Original change's description: > move GrColor.h to private, IWYU > > Bug: skia: > Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e > Reviewed-on: https://skia-review.googlesource.com/104160 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,reed@google.com Change-Id: Ifaa50f8771fa1ca8bc152270efdb1fe27f7210f2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/104440 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* move GrColor.h to private, IWYUGravatar Mike Reed2018-02-06
| | | | | | | | Bug: skia: Change-Id: I0f0dabd7cc54cb7786f53bd6da0c0c012375037e Reviewed-on: https://skia-review.googlesource.com/104160 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Implement GPU/OpList DDLsGravatar Robert Phillips2018-02-01
| | | | | | | | | | This relies on https://skia-review.googlesource.com/c/skia/+/102101 (Add SkSurface_Gpu::MakeWrappedRenderTarget method) landing first TBR=bsalomon@google.com Change-Id: I4d2d66af5800407f638ef32d7b19ce49084bd4e4 Reviewed-on: https://skia-review.googlesource.com/102263 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Extract a GrCCPathParser class that is decoupled from atlas opsGravatar Chris Dalton2018-01-18
| | | | | | | | | | | Allows coverage counts ultimately to be drawn either to an atlas or directly to the framebuffer. Bug: skia: Change-Id: I6cc07fce562c223381b89586d19ae98298bafe4d Reviewed-on: https://skia-review.googlesource.com/96083 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* CCPR: Rename GrCCPR* -> GrCC*Gravatar Chris Dalton2018-01-08
| | | | | | | | | | | Also runs clang-format on the files that don't have special shader builder styling. Bug: skia: Change-Id: I4a67569a7c8472acfb9200644c913844a92e3b2d Reviewed-on: https://skia-review.googlesource.com/92083 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add GrProxyProviderGravatar Robert Phillips2018-01-08
| | | | | | | | | This pulls all the proxy tracking & creation functionality out of the GrResourceCache and GrResourceProvider and consolidates it in the GrProxyProvider. Change-Id: I7256f7c544319a70c1bd93dd5a9ccbe5fa0a544f Reviewed-on: https://skia-review.googlesource.com/91501 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Add GrResourceProviderPriv and expose GrGpu in itGravatar Greg Daniel2018-01-05
| | | | | | | | Bug: skia: Change-Id: Iad965ecf33c9dc75c4f068d547698d973f52eb94 Reviewed-on: https://skia-review.googlesource.com/91440 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Reland "CCPR: Initial semi-optimized vertex shader Impl"Gravatar Chris Dalton2018-01-04
| | | | | | | | | | | | | | | | | | | | This is a reland of e3877ce5ceb7842b61d54bebcc51864e5787a2bc Original change's description: > CCPR: Initial semi-optimized vertex shader Impl > > TBR=bsalomon@google.com > > Bug: skia: > Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c > Reviewed-on: https://skia-review.googlesource.com/89120 > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> Bug: skia: Change-Id: I1d194853540e64df9c7b55ceb388a5d2f32bc258 Reviewed-on: https://skia-review.googlesource.com/90963 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "CCPR: Initial semi-optimized vertex shader Impl"Gravatar Chris Dalton2017-12-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e3877ce5ceb7842b61d54bebcc51864e5787a2bc. Reason for revert: Intel crashing again Original change's description: > CCPR: Initial semi-optimized vertex shader Impl > > TBR=bsalomon@google.com > > Bug: skia: > Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c > Reviewed-on: https://skia-review.googlesource.com/89120 > Reviewed-by: Chris Dalton <csmartdalton@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,brianosman@google.com,csmartdalton@google.com Change-Id: I2485db30397958722a07c5992c748ab69365ebb6 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/89300 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* CCPR: Initial semi-optimized vertex shader ImplGravatar Chris Dalton2017-12-22
| | | | | | | | | | TBR=bsalomon@google.com Bug: skia: Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c Reviewed-on: https://skia-review.googlesource.com/89120 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* converted YUVEffect to SkSLGravatar Ethan Nicholas2017-12-22
| | | | | | | | Bug: skia: Change-Id: I1875e44417a0a583c4f35ee4d46856a34ba55245 Reviewed-on: https://skia-review.googlesource.com/88580 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "CCPR: Initial semi-optimized vertex shader Impl"Gravatar Brian Osman2017-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a8f6aef13d0592305e05baf19ee724f31a53b466. Reason for revert: Looks to failing on ANGLE bots Original change's description: > CCPR: Initial semi-optimized vertex shader Impl > > Bug: skia: > Change-Id: If22f47a3b945ce7336f8e609c2e0c911f09e1d18 > Reviewed-on: https://skia-review.googlesource.com/86820 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: Ic5a73434cba4246a72790db2c27d06e7a50f389a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/88220 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* CCPR: Initial semi-optimized vertex shader ImplGravatar Chris Dalton2017-12-20
| | | | | | | | Bug: skia: Change-Id: If22f47a3b945ce7336f8e609c2e0c911f09e1d18 Reviewed-on: https://skia-review.googlesource.com/86820 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* converted GrRRectBlurEffect to SkSLGravatar Ethan Nicholas2017-12-20
| | | | | | | | Bug: skia: Change-Id: Ifd192db07e02d69d445277a361760ce4a452f603 Reviewed-on: https://skia-review.googlesource.com/87441 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* converted GrMagnifierEffect to SkSLGravatar Ethan Nicholas2017-12-13
| | | | | | | | Bug: skia: Change-Id: I6dc14ac66d5b911117e71fa23fef49a897082781 Reviewed-on: https://skia-review.googlesource.com/71342 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add stubbed out GrContextGravatar Robert Phillips2017-12-13
| | | | | | | | | | | | This CL mainly just: stores the GrContextOptions in GrContextThreadSafeProxy (so they can be passed on to a stubbed out GrContext) adds a method to create a stubbed out GrContext that has a GrStubGpu - the stubbed out GrContext isn't quite ready for prime time yet Change-Id: I31be6763640e406c5963e6f0714489ac358339e4 Reviewed-on: https://skia-review.googlesource.com/79601 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Add GrGLMakeNativeInterface factory that returns sk_sp<const GrGLInterface>.Gravatar Brian Salomon2017-12-11
| | | | | | | | | | | | | | | Removes the concept of a configurable "default" interface and makes the default always be the "native" interface. Also removes unused functions: GrGLInterfaceAddTestDebugMarker and GrGLInterface::NewClone. Keeps around legacy GrGLCreateNativeInterface() until clients can be weened. Change-Id: I4a3bdafa8cf8c68ed13318393abd55686b045ccb Reviewed-on: https://skia-review.googlesource.com/83000 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove instanced renderingGravatar Brian Salomon2017-12-08
| | | | | | | Change-Id: I4219b1d23a647b849ee41fe71b53e1c45edfc3f4 Reviewed-on: https://skia-review.googlesource.com/82241 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Brian Salomon <bsalomon@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>
* Revert "Revert "Add Atlas Text interface for rendering SDF glyphs.""Gravatar Brian Salomon2017-11-19
| | | | | | | | | | This reverts commit 9c2202ffc22b4293b48a4edeafa1b5d2bab8bb83. Bug: skia: Change-Id: I482ddf74f8e40d3d0908c840ba5c6ff981ccefbd Reviewed-on: https://skia-review.googlesource.com/73345 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Add Atlas Text interface for rendering SDF glyphs."Gravatar Greg Daniel2017-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 39631f3df172feb385527a5d125bc53b0bded7e6. Reason for revert: break google3 rool Original change's description: > Add Atlas Text interface for rendering SDF glyphs. > > This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU > backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The > client issues text draws to potentially multiple targets and then the client flushes. The > client then gets commands from Skia with data to put into a texture atlas and vertices to > draw that reference the texture. The client is responsible for creating the texture, uploading > the SDF data to the texture, and drawing the vertices provided by Skia. > > Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3 > Reviewed-on: https://skia-review.googlesource.com/59360 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I4aad0c99e645b476fd8ba25731f2a10e8802bb25 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/73420 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add Atlas Text interface for rendering SDF glyphs.Gravatar Brian Salomon2017-11-17
| | | | | | | | | | | | | | This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The client issues text draws to potentially multiple targets and then the client flushes. The client then gets commands from Skia with data to put into a texture atlas and vertices to draw that reference the texture. The client is responsible for creating the texture, uploading the SDF data to the texture, and drawing the vertices provided by Skia. Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3 Reviewed-on: https://skia-review.googlesource.com/59360 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* converted Premul / Unpremul to SkSLGravatar Ethan Nicholas2017-11-17
| | | | | | | | Bug: skia: Change-Id: I4944badbb530e17b9ff7cca389f943e0b5982e01 Reviewed-on: https://skia-review.googlesource.com/72983 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* converted GrAARectEffect to SkSLGravatar Ethan Nicholas2017-11-16
| | | | | | | | Bug: skia: Change-Id: I08254806fe7cb97dab21c5625aa16dd34aea9468 Reviewed-on: https://skia-review.googlesource.com/72120 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Don't use analytic clip FPs when drawing to stencilGravatar Chris Dalton2017-11-07
| | | | | | | | | | | | | It doesn't make sense to multiply by coverage when drawing to stencil. This could theoretically work with FPs that discard and/or modify the sample mask, but for the time being an analytic FP means one that calculates a coverage value. Bug: skia:7190 Change-Id: I44140a5823f8683ec08244bdf9d369f51fa05dd9 Reviewed-on: https://skia-review.googlesource.com/68362 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Revert "Don't use analytic clip FPs when drawing to stencil"Gravatar Chris Dalton2017-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4c92d4aa3ed653afdff9996b90a1139ed1dc9420. Reason for revert: Chromecast bot failure Original change's description: > Don't use analytic clip FPs when drawing to stencil > > It doesn't make sense to multiply by coverage when drawing to stencil. > This could theoretically work with FPs that discard and/or modify > the sample mask, but for the time being an analytic FP means one that > calculates a coverage value. > > Bug: skia:7190 > Change-Id: Ic40cf6c19c377cba80bad458993582f5cc07022a > Reviewed-on: https://skia-review.googlesource.com/67423 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Chris Dalton <csmartdalton@google.com> TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com Change-Id: Ie5bd4852c201e47daee0920f5644141bee2d8a46 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7190 Reviewed-on: https://skia-review.googlesource.com/68400 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Don't use analytic clip FPs when drawing to stencilGravatar Chris Dalton2017-11-07
| | | | | | | | | | | | | It doesn't make sense to multiply by coverage when drawing to stencil. This could theoretically work with FPs that discard and/or modify the sample mask, but for the time being an analytic FP means one that calculates a coverage value. Bug: skia:7190 Change-Id: Ic40cf6c19c377cba80bad458993582f5cc07022a Reviewed-on: https://skia-review.googlesource.com/67423 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* converted LumaColorFilterEffect to skslGravatar Ethan Nicholas2017-11-07
| | | | | | | | Bug: skia: Change-Id: I208984ec9ad357249ee1b2fe28477f1450b4b69d Reviewed-on: https://skia-review.googlesource.com/67848 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make GrAtlasTextBlob return to caller when a flush is required during subrun ↵Gravatar Brian Salomon2017-11-07
| | | | | | | | | | | | | | | | | | | tessellation. The old code used a helper object in the tessellation code that called flush() on GrAtlasTextOp. A confusing aspect of this was that the pre-flush vertex data generated for the sub run was copied to the op's vertex buffer after flush() had already recorded the draw that read the data. The new code adds a tessellator nested helper class to GrAtlasTextBlob. The helper exits early if a flush is required, the op performs the flush, and then the helper is invoked again until tessellation is complete. This also changes the blob object to use char* instead of unsigned char* for its vertex pointers. Change-Id: I31bed251435f13b2172e6f5829ba437b882dd44d Reviewed-on: https://skia-review.googlesource.com/67856 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Remove deferred upload types from GrDrawOp.h.Gravatar Brian Salomon2017-10-30
| | | | | | | | | This is motivated by exposing these to an upcoming atlas text rendering API that doesn't use ops. Change-Id: Id034dd43d13bc96fe1350fc6d8f699477bb74a05 Reviewed-on: https://skia-review.googlesource.com/65060 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Re-land "converted OverdrawColorFilter to SkSL"Gravatar Ethan Nicholas2017-10-26
| | | | | | | | | | This reverts commit 2d3cac58fcc8f2d398a421b0341c36479a6ba324. Bug: skia: Change-Id: I6607d419f6b30c3e17b52ec5ce67d489bd1ad1dc Reviewed-on: https://skia-review.googlesource.com/64080 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "converted OverdrawColorFilter to SkSL"Gravatar Ethan Nicholas2017-10-25
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8aa4dc9052a64d84cfd0a4330910057bd37b6bf7. Reason for revert: strncmp getting mad Original change's description: > converted OverdrawColorFilter to SkSL > > Bug: skia: > Change-Id: Idcc0502758df1e60ed131a168b5c9a65a4d834a1 > Reviewed-on: https://skia-review.googlesource.com/63840 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,ethannicholas@google.com Change-Id: Ib78d7c878c4597918d059bddb4d61f6a7f59a511 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/63561 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* converted OverdrawColorFilter to SkSLGravatar Ethan Nicholas2017-10-25
| | | | | | | | Bug: skia: Change-Id: Idcc0502758df1e60ed131a168b5c9a65a4d834a1 Reviewed-on: https://skia-review.googlesource.com/63840 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@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>
* Add GrColorSpaceInfo and use in place of GrRenderTargetContext in paint ↵Gravatar Brian Salomon2017-10-24
| | | | | | | | | | | conversion. This moves us closer to making GrAtlasTextContext and related classes usable without a GrRenderTargetContext. Change-Id: Ife52d69a3f925e23da88043acb4d8dc9f672a025 Reviewed-on: https://skia-review.googlesource.com/63304 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>