aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Rename MakeAsTextDraw to MakeFromTextGravatar Herb Derby2018-07-27
| | | | | | | | | Change-Id: I3fbb4d27b728e5fc5ecec9fc9d9e215dd5a83359 Reviewed-on: https://skia-review.googlesource.com/144123 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Cary Clark <caryclark@google.com> Auto-Submit: Herb Derby <herb@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* sksl: Add a "sk_Clockwise" built-inGravatar Chris Dalton2018-07-27
| | | | | | | | | | | This allows us to identify clockwise-winding triangles, in terms of Skia device space, in all backends and with all render target origins. Bug: skia: Change-Id: I220e1c459e0129d1cc4dee6458ef94277fbedd21 Reviewed-on: https://skia-review.googlesource.com/142662 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Fix TSAN bug in TransferPixelsTestGravatar Robert Phillips2018-07-27
| | | | | | | Change-Id: I067d9e86d00ab6bfa91e2d22725b26315a3ec348 Reviewed-on: https://skia-review.googlesource.com/144026 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Hide SkTextBlob::GlyphPositioning from public APIGravatar Florin Malita2018-07-27
| | | | | | | | | | | | | Make private, add corresponding SkTextBlobRunIterator enum. Also move SkTextBlobRunIterator to SkTextBlobPriv.h. Change-Id: If3e0beabb0e8484b1ac73c6fc0827e920ca1f93b Reviewed-on: https://skia-review.googlesource.com/142501 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
* Reland "Go back to cleaning up MIP levels on texture export rather than ↵Gravatar Brian Salomon2018-07-27
| | | | | | | | | | | | | | | | | | | | | | | | assuming dirty on texture import." This is a reland of 01d6fc9d8415e400a7eac95518356ecf341aa5cb Chrome layout tests have been suppressed so this shouldn't block a Skia roll. Original change's description: > Go back to cleaning up MIP levels on texture export rather than assuming dirty > on texture import. > > Bug: skia:8155 > Change-Id: I23399f442d52c73906829132f798eda260b6d4ae > Reviewed-on: https://skia-review.googlesource.com/143291 > Auto-Submit: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> Bug: skia:8155 Change-Id: Ia3843b66c2453daf15e566b7ecf890c2ff4aed22 Reviewed-on: https://skia-review.googlesource.com/143960 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* const all the thingsGravatar Herb Derby2018-07-27
| | | | | | | | | | | Having the glyph run list be const as it passes through the stack means that future change can't be introduced in the device code that changes behavior. Try to force all text changes into the SkGylphRun system. Change-Id: I9412bc094c7adb8554887c725a6264af306e1d42 Reviewed-on: https://skia-review.googlesource.com/143702 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* GrTessellator: fix for collinear edge merging.Gravatar Stephen White2018-07-26
| | | | | | | | | | | | | | | | In some cases, two edges can be collinear when tested on one side (e.g., left top vs right edge), but non-collinear when tested on the other (e.g., right top vs left edge). We were actually merging based on one criterion, but assserting based on the other. The safest fix is to merge if either condition is true, and then assert that both conditions are false. Bug: 866319 Change-Id: Ia1be330caf62f6d7961746752f73993ca098d0a3 Reviewed-on: https://skia-review.googlesource.com/143501 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* add explicit accessor for sRGB singleton colorspacesGravatar Mike Klein2018-07-25
| | | | | | | | | | | | | | SkColorSpace::MakeSRGB().get() is scary, and causes more ref/unref pairs than strictly necessary for these singletons. This time the implementation is still in SkColorSpace.cpp, so these should really work as singletons. Change-Id: I40f2942c8dcde3040663a04c4f5330aca90868ae Reviewed-on: https://skia-review.googlesource.com/143305 Auto-Submit: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Revert "Go back to cleaning up MIP levels on texture export rather than ↵Gravatar Mike Klein2018-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assuming dirty" This reverts commit 01d6fc9d8415e400a7eac95518356ecf341aa5cb. Reason for revert: layout tests. Original change's description: > Go back to cleaning up MIP levels on texture export rather than assuming dirty > on texture import. > > Bug: skia:8155 > Change-Id: I23399f442d52c73906829132f798eda260b6d4ae > Reviewed-on: https://skia-review.googlesource.com/143291 > Auto-Submit: Brian Salomon <bsalomon@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=bsalomon@google.com,brianosman@google.com Change-Id: Ice4cb4e253e52d67eb8bd6e2a12ccc844b7bfa8d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:8155 Reviewed-on: https://skia-review.googlesource.com/143380 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* fonts: Don't recompute device descs on glyph cache hit.Gravatar Khushal2018-07-25
| | | | | | | | | | | | | | | Testing using serialization PaintOpPerfTest, this had the following improvement in serialization speed: Before: ~515,000 ops/s After: ~600,000 ops/s R=herb@google.com Change-Id: Iefd80467ea4ff7cc88e8ca1f431883502d249857 Reviewed-on: https://skia-review.googlesource.com/142972 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
* SkUtils: remove some versions of UTF routines.Gravatar Hal Canary2018-07-25
| | | | | | | Change-Id: Ib1f776ae472117c23d2145253adf25fceb412b32 Reviewed-on: https://skia-review.googlesource.com/143111 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Go back to cleaning up MIP levels on texture export rather than assuming dirtyGravatar Brian Salomon2018-07-25
| | | | | | | | | | | on texture import. Bug: skia:8155 Change-Id: I23399f442d52c73906829132f798eda260b6d4ae Reviewed-on: https://skia-review.googlesource.com/143291 Auto-Submit: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* handle failing pathop testsGravatar Cary Clark2018-07-24
| | | | | | | | | | | | | | | Some tests isolated from GrShapes_arcs do not fail gracefully, so make sure errors are properly handled. TBR=reed@google.com Bug: skia: Change-Id: Ia8c9903e64ef755ec11c398df3e5d258ca1f5f8b Reviewed-on: https://skia-review.googlesource.com/143112 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>
* Clean up bitmap pathGravatar Herb Derby2018-07-24
| | | | | | | Change-Id: If149194fd86f14bea289ad68262ea99cbbc398b6 Reviewed-on: https://skia-review.googlesource.com/142817 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Reland "Reland "Add some optimizations to PolyUtils""Gravatar Jim Van Verth2018-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of 946c37057f2618af7eda34fd6d2dd8625a9e9b61 Original change's description: > Reland "Add some optimizations to PolyUtils" > > This is a reland of 8bb0db3d07450880d346d808018708416c928657 > > Original change's description: > > Add some optimizations to PolyUtils > > > > * Switch inset/offset code to use a linked list rather than an array > > * Use std::set to store active edge list for IsSimplePolygon rather than array > > * Pre-alloc the priority queue for IsSimplePolygon > > * When adding radial curves, expand the array all at once rather than pushing > > one at a time. > > > > Bug: skia: > > Change-Id: I692f8c29c500c41ec1d1be39d924d8a752676bf4 > > Reviewed-on: https://skia-review.googlesource.com/140787 > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > Commit-Queue: Jim Van Verth <jvanverth@google.com> > > Bug: skia: > Change-Id: I3f5d42cfb941deab2b28bed020b37ce199e91d3d > Reviewed-on: https://skia-review.googlesource.com/142200 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> Bug: skia: Change-Id: I598d4be9108d009d0f885cfa72bf9197fc286b3a Reviewed-on: https://skia-review.googlesource.com/142920 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* SkPDF: only draw text with SkglyphRunsGravatar Hal Canary2018-07-23
| | | | | | | Change-Id: I24e79c73a9c65a5d6a974bf52b0d0aee21be07db Reviewed-on: https://skia-review.googlesource.com/142695 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Convert remote glyph cache to use glyp runsGravatar Herb Derby2018-07-20
| | | | | | | Change-Id: I763a3570ff6b970cfcbf172d786370c77a0db0d7 Reviewed-on: https://skia-review.googlesource.com/142507 Reviewed-by: Khusal Sagar <khushalsagar@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Reland "Don't require mips in GrTextureProducer if texture is 1x1."Gravatar Greg Daniel2018-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c861eee3a6f1f93ad3df27b8be94f44b245bd128. Reason for revert: Relanding with fix for gray8 not copyable Original change's description: > Revert "Don't require mips in GrTextureProducer if texture is 1x1." > > This reverts commit 5191fd7555d34225ef771ad4cac65bcbbb50a89c. > > Reason for revert: breaking angle > > Original change's description: > > Don't require mips in GrTextureProducer if texture is 1x1. > > > > Bug: chromium:862921 > > Change-Id: I5f3584ad36e160a5a09d0a37e31e147155076b4d > > Reviewed-on: https://skia-review.googlesource.com/142586 > > Reviewed-by: Brian Osman <brianosman@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com > > Change-Id: Iaef7a56b061cb41f4c75ec20d8df77d3e52b194d > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:862921 > Reviewed-on: https://skia-review.googlesource.com/142600 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com Change-Id: I52378fa43efe2fdf583335f5fa8aa5b04a68ae2f Bug: chromium:862921 Reviewed-on: https://skia-review.googlesource.com/142760 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Don't require mips in GrTextureProducer if texture is 1x1."Gravatar Greg Daniel2018-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5191fd7555d34225ef771ad4cac65bcbbb50a89c. Reason for revert: breaking angle Original change's description: > Don't require mips in GrTextureProducer if texture is 1x1. > > Bug: chromium:862921 > Change-Id: I5f3584ad36e160a5a09d0a37e31e147155076b4d > Reviewed-on: https://skia-review.googlesource.com/142586 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com Change-Id: Iaef7a56b061cb41f4c75ec20d8df77d3e52b194d No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:862921 Reviewed-on: https://skia-review.googlesource.com/142600 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Don't require mips in GrTextureProducer if texture is 1x1.Gravatar Greg Daniel2018-07-19
| | | | | | | | | Bug: chromium:862921 Change-Id: I5f3584ad36e160a5a09d0a37e31e147155076b4d Reviewed-on: https://skia-review.googlesource.com/142586 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Reland "Revert "added GrSkSLFP and converted DitherEffect to use it""Gravatar Ethan Nicholas2018-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 97ae0c89025dfd791047f5701e57d58da37c125c. Reason for revert: Breaking ANGLE. Original change's description: > Revert "Revert "added GrSkSLFP and converted DitherEffect to use it"" > > This reverts commit f2030783094e502fb74221077a5ee7cb41287fe4. > > Bug: skia: > Change-Id: Icaaa8b3ea652a8f126bfbcc788a360493a7ebe3e > Reviewed-on: https://skia-review.googlesource.com/137391 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com,ethannicholas@google.com Change-Id: I65d6d2707fceab0a99121c528d1b848d23e34bfa No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/142588 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* implemented onWritePixels and related tests for metal gpu backendGravatar Timothy Liang2018-07-19
| | | | | | | | Bug: skia: Change-Id: Iab8bc8611a9de8afcf0eaeb58a8ef46fdc38d4f1 Reviewed-on: https://skia-review.googlesource.com/140571 Commit-Queue: Timothy Liang <timliang@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "added GrSkSLFP and converted DitherEffect to use it""Gravatar Ethan Nicholas2018-07-19
| | | | | | | | | | This reverts commit f2030783094e502fb74221077a5ee7cb41287fe4. Bug: skia: Change-Id: Icaaa8b3ea652a8f126bfbcc788a360493a7ebe3e Reviewed-on: https://skia-review.googlesource.com/137391 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* remove unused serialization in textblobGravatar Cary Clark2018-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SKTextBlob serialization code that is tested by Skia is unused by Chrome. The serialization code that is used by Chrome is untested by Skia. Remove the unused code; test the used code. The code path introduced nearly a year ago, likely for slimming paint, attempts to make text blobs smarter by allowing the reuse of typefaces. Maybe there needs to be a Chrome bug / feature request to use this? If if turns out there is no interest to do so, This CL aligns used interfaces with tests. R=reed@google.com,fmalita@google.com,bungeman@google.com Bug: skia:6818 Change-Id: I9b3ec0c326495322986ba26f20f901bcb208be73 Reviewed-on: https://skia-review.googlesource.com/141542 Reviewed-by: Cary Clark <caryclark@skia.org> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>
* Revert "Reland "Add some optimizations to PolyUtils""Gravatar Ben Wagner2018-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 946c37057f2618af7eda34fd6d2dd8625a9e9b61. Reason for revert: strict weak ordering: ((__x LT __y) && (__y LT __x)) != false Original change's description: > Reland "Add some optimizations to PolyUtils" > > This is a reland of 8bb0db3d07450880d346d808018708416c928657 > > Original change's description: > > Add some optimizations to PolyUtils > > > > * Switch inset/offset code to use a linked list rather than an array > > * Use std::set to store active edge list for IsSimplePolygon rather than array > > * Pre-alloc the priority queue for IsSimplePolygon > > * When adding radial curves, expand the array all at once rather than pushing > > one at a time. > > > > Bug: skia: > > Change-Id: I692f8c29c500c41ec1d1be39d924d8a752676bf4 > > Reviewed-on: https://skia-review.googlesource.com/140787 > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > Commit-Queue: Jim Van Verth <jvanverth@google.com> > > Bug: skia: > Change-Id: I3f5d42cfb941deab2b28bed020b37ce199e91d3d > Reviewed-on: https://skia-review.googlesource.com/142200 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Ie8cdf2375613c51dedaf0d11125d6d22d88821df No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/142281 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Fix explicit allocation bugGravatar Robert Phillips2018-07-18
| | | | | | | Change-Id: I9866f563e02b2ab290cc46ede05f8eda21f6d3b2 Reviewed-on: https://skia-review.googlesource.com/142163 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Reland "Add some optimizations to PolyUtils"Gravatar Jim Van Verth2018-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of 8bb0db3d07450880d346d808018708416c928657 Original change's description: > Add some optimizations to PolyUtils > > * Switch inset/offset code to use a linked list rather than an array > * Use std::set to store active edge list for IsSimplePolygon rather than array > * Pre-alloc the priority queue for IsSimplePolygon > * When adding radial curves, expand the array all at once rather than pushing > one at a time. > > Bug: skia: > Change-Id: I692f8c29c500c41ec1d1be39d924d8a752676bf4 > Reviewed-on: https://skia-review.googlesource.com/140787 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> Bug: skia: Change-Id: I3f5d42cfb941deab2b28bed020b37ce199e91d3d Reviewed-on: https://skia-review.googlesource.com/142200 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Reland "implemented metal gpu backend texture upload testing"Gravatar Timothy Liang2018-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a80a012456a95a6996a8901268ec34ed0cc3aecb. Reason for revert: Fix bot failure. Original change's description: > Revert "implemented metal gpu backend texture upload testing" > > This reverts commit 36848f6b30ddaca461c98e13b9976b2c449ca547. > > Reason for revert: Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-All-Android_CCPR failing. > > Original change's description: > > implemented metal gpu backend texture upload testing > > > > Bug: skia: > > Change-Id: Ia3af58a0710f7f9792b37682a3cc45dd14282b71 > > Reviewed-on: https://skia-review.googlesource.com/140248 > > Commit-Queue: Timothy Liang <timliang@google.com> > > Reviewed-by: Greg Daniel <egdaniel@google.com> > > TBR=egdaniel@google.com,ethannicholas@google.com,timliang@google.com > > Change-Id: Idf40fc78b82aec1efbcc64221b6d2bbf63353960 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/141182 > Reviewed-by: Timothy Liang <timliang@google.com> > Commit-Queue: Timothy Liang <timliang@google.com> Bug: skia: Change-Id: Ib8c5b2e0cf9de25c11c14741a32846bcc874d712 Reviewed-on: https://skia-review.googlesource.com/141183 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Timothy Liang <timliang@google.com>
* MakeAsDrawText for SkTextBlobGravatar Herb Derby2018-07-17
| | | | | | | | | Change-Id: I04ebca6b318e0654cc1e598aa323cfb9a21e5a5e Reviewed-on: https://skia-review.googlesource.com/141960 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Add some optimizations to PolyUtils"Gravatar Jim Van Verth2018-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8bb0db3d07450880d346d808018708416c928657. Reason for revert: Breaking Google3. Original change's description: > Add some optimizations to PolyUtils > > * Switch inset/offset code to use a linked list rather than an array > * Use std::set to store active edge list for IsSimplePolygon rather than array > * Pre-alloc the priority queue for IsSimplePolygon > * When adding radial curves, expand the array all at once rather than pushing > one at a time. > > Bug: skia: > Change-Id: I692f8c29c500c41ec1d1be39d924d8a752676bf4 > Reviewed-on: https://skia-review.googlesource.com/140787 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: Ie8afecd899fa9bd79d22fdf46ec82a0c9e94e893 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/141980 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Add some optimizations to PolyUtilsGravatar Jim Van Verth2018-07-17
| | | | | | | | | | | | | | * Switch inset/offset code to use a linked list rather than an array * Use std::set to store active edge list for IsSimplePolygon rather than array * Pre-alloc the priority queue for IsSimplePolygon * When adding radial curves, expand the array all at once rather than pushing one at a time. Bug: skia: Change-Id: I692f8c29c500c41ec1d1be39d924d8a752676bf4 Reviewed-on: https://skia-review.googlesource.com/140787 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Restore SkLightingShader and associated classesGravatar Robert Phillips2018-07-17
| | | | | | | | | This reverts https://skia-review.googlesource.com/c/skia/+/31140 (Remove SkLightingShader and associated classes) and updates the classes to ToT Change-Id: I3b1df1704cca8907aa00f081a7e93339b65ad4fa Reviewed-on: https://skia-review.googlesource.com/141545 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* added byte and ubyte types to SKSLGravatar Ruiqi Mao2018-07-17
| | | | | | | | | | | created new GMs for skinning Bug: skia: Change-Id: I15fb2bd02fba8beb6dd2dd3f3716da016ea92192 Reviewed-on: https://skia-review.googlesource.com/140241 Commit-Queue: Ruiqi Mao <ruiqimao@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
* Remove SkRefDict.Gravatar Ben Wagner2018-07-16
| | | | | | | | | It is unused. Remove it. Change-Id: If62a93a58d21bfccd6df112e92a709bff4d11c97 Reviewed-on: https://skia-review.googlesource.com/141566 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* GrTessellator: collinear edges during sanitize.Gravatar Stephen White2018-07-16
| | | | | | | | | | | | When three collinear edges occur during the sanitize_contours() pass, their vertices may not yet have been discovered to be coincident. So we must do the vertex comparison by point, rather than by pointer. Bug: 860655 Change-Id: I89dc7526905bb5473206661348fee431371731a0 Reviewed-on: https://skia-review.googlesource.com/141523 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* Revert "implemented metal gpu backend texture upload testing"Gravatar Timothy Liang2018-07-13
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 36848f6b30ddaca461c98e13b9976b2c449ca547. Reason for revert: Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-All-Android_CCPR failing. Original change's description: > implemented metal gpu backend texture upload testing > > Bug: skia: > Change-Id: Ia3af58a0710f7f9792b37682a3cc45dd14282b71 > Reviewed-on: https://skia-review.googlesource.com/140248 > Commit-Queue: Timothy Liang <timliang@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,ethannicholas@google.com,timliang@google.com Change-Id: Idf40fc78b82aec1efbcc64221b6d2bbf63353960 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/141182 Reviewed-by: Timothy Liang <timliang@google.com> Commit-Queue: Timothy Liang <timliang@google.com>
* implemented metal gpu backend texture upload testingGravatar Timothy Liang2018-07-13
| | | | | | | | Bug: skia: Change-Id: Ia3af58a0710f7f9792b37682a3cc45dd14282b71 Reviewed-on: https://skia-review.googlesource.com/140248 Commit-Queue: Timothy Liang <timliang@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "update SkColor4f::FromColor() to preserve transfer function"Gravatar Robert Phillips2018-07-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9e229233a67b36a508d3c753a5b93a022369c5f7. Reason for revert: See if blocking Android roll Original change's description: > update SkColor4f::FromColor() to preserve transfer function > > This kills off some sRGB tables, > and lots of call sites can now use SkColor4f::FromColor(). > > It doesn't seem important to keep this test. > > Change-Id: Ia79ec8ace45e80bbc7a1e33f560f59289e61b2fb > Reviewed-on: https://skia-review.googlesource.com/141046 > Commit-Queue: Mike Klein <mtklein@chromium.org> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: I9d76e4ccf8a101853a7404abb33bdab9e0c64c25 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/141181 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Introduce text blob processing but don't wire it upGravatar Herb Derby2018-07-13
| | | | | | | | | | | Have all the old code paths start using lists in preparation for introducing text blobs. Change-Id: I65cc02ee3da63bc3c9492db78a08b0eee3b1f931 Reviewed-on: https://skia-review.googlesource.com/141081 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* GrTessellator: missing intersection rewind fix.Gravatar Stephen White2018-07-13
| | | | | | | | | | | | | | | Some "missing" intersections (see https://skia.googlesource.com/skia/+/89042d5f13a56d6b663657aa58f17593123a344e) cause the active edge list to go out of order. In that case, we need to rewind the active list, just as we do before edge splitting for regular intersections. BUG=860453 Change-Id: I1f7b32157a73b427a4fd94c14c1eb440f26c0743 Reviewed-on: https://skia-review.googlesource.com/141038 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
* Remove texel buffer support.Gravatar Brian Salomon2018-07-13
| | | | | | | Change-Id: Ia6f21afe714208979a5bc384e436b28ea2b9a297 Reviewed-on: https://skia-review.googlesource.com/141051 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Move to using pointers in simplifyDraw*Gravatar Herb Derby2018-07-12
| | | | | | | | | | Move to using pointers into buffers. This will allow multiple runs from blobs to share buffers. Change-Id: I6ebed2e490c5fe71077ddc921ead145ce17c5ebd Reviewed-on: https://skia-review.googlesource.com/141049 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Replace nearly all kRespect with kIgnoreGravatar Brian Osman2018-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | - Encoders and decoders always assume kIgnore. - They are less opinionated about F16 and color space, we just trust the color space that's passed in, and put that directly in the image (no sRGB encoding). - SkBitmap and SkPixmap read/write pixels functions were defaulting to kResepct, those are now always kIgnore. - Many other bits of plumbing are simplified, and I added a default of kIgnore to SkImage::makeColorSpace, so we can phase out that argument entirely. - Still need to add defaults to other public APIs that take SkTransferFunctionBehavior. - This makes gold think that we've dramatically changed the contents of all F16 images, but that's because it doesn't understand the (now linear) color space that's embedded. Once we triage them all once, they will work fine (and they'll look perfect in the browser). Bug: skia: Change-Id: I62fa090f96cae1b67d181ce14bd91f34ff2ed747 Reviewed-on: https://skia-review.googlesource.com/140570 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Use simple buffers instead of vectorsGravatar Herb Derby2018-07-12
| | | | | | | | | | Start using simple buffers, these will be used for multiple runs latter on. Change-Id: Iab0559d5a47eb5e54254a985051d5d25a91be69f Reviewed-on: https://skia-review.googlesource.com/140791 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* update SkColor4f::FromColor() to preserve transfer functionGravatar Mike Klein2018-07-12
| | | | | | | | | | | | This kills off some sRGB tables, and lots of call sites can now use SkColor4f::FromColor(). It doesn't seem important to keep this test. Change-Id: Ia79ec8ace45e80bbc7a1e33f560f59289e61b2fb Reviewed-on: https://skia-review.googlesource.com/141046 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
* Add SkTypeface::getVariationDesignParametersGravatar Ben Wagner2018-07-12
| | | | | | | | | This adds a way for users to query the axis parameters for a typeface. Change-Id: Idc2ac0d84bc7ae2ca484ae410cba5b01883418e5 Reviewed-on: https://skia-review.googlesource.com/137706 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Update SRGBReadWritePixelsTest again, to only test opaque colorsGravatar Brian Osman2018-07-12
| | | | | | | | | | | | | | | | With our new world (never doing linear blending), the read-back conversion from premul sRGB to premul linear no longer produces the same answer. By always using opaque pixels, the existing check functions in this test can continue to verify that the sRGB <-> linear conversion is happening correctly during read/write, independent of any color space transformation (which is now altering the outcome). Bug: skia: Change-Id: Id8e28b3bc4b9674043bd870a39d229207ccdc6d7 Reviewed-on: https://skia-review.googlesource.com/140987 Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove SK_LEGACY_GPU_PIXEL_OPS testsGravatar Brian Osman2018-07-12
| | | | | | | | | | Bug: skia: Change-Id: I12ba9199845a43c8e070454093b744eed272a548 Reviewed-on: https://skia-review.googlesource.com/140981 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* In RGBA444TextureTest, use valid premul colorsGravatar Brian Osman2018-07-12
| | | | | | | | | | | | | | | In both the 565 and 4444 tests, we use a repeating pattern of two 16-bit values. Neither of these were valid premul colors in 4444, and the first one (FF00) had zero alpha. With upcoming changes to format conversion, that may need to be unpremul'd and premul'd during readPixels, causing this test to fail. Change-Id: Idbf0f8162d6f68ca2b70ede8c48f788f4379d414 Reviewed-on: https://skia-review.googlesource.com/140799 Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Use new SkGlyphIDSet - v3Gravatar Herb Derby2018-07-12
| | | | | | | | | | | | | v1 - had problems with msan and unintialized glyphs. v2 - had problems with typefaces with no glyphs in them This adds a check to make sure there are glyphs in the font when going to uniquify. Change-Id: Id27fa4578be33da1e468b4652db19740ddcadfc6 Reviewed-on: https://skia-review.googlesource.com/140785 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>