aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLString.cpp
Commit message (Collapse)AuthorAge
* Re-re-land "added GrSkSLFP and converted DitherEffect to use it"Gravatar Ethan Nicholas2018-07-31
| | | | | | | | | | This reverts commit 6c48e4d11ce80fa5cfef56e13b2d5847fe94a7cc. Bug: skia: Change-Id: I7ee78990fc30eec545d1856e59eb6e0573089426 Reviewed-on: https://skia-review.googlesource.com/144348 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@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>
* 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>
* Revert "added GrSkSLFP and converted DitherEffect to use it"Gravatar Kevin Lubick2018-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit dfbfc738a9edfff7a9804253175e380c230f3d21. Reason for revert: Seems to be breaking DDL/ASAN bots Original change's description: > added GrSkSLFP and converted DitherEffect to use it > > Bug: skia: > Change-Id: I84b71165eab1712355f3c7669cee2d33d259f3df > Reviewed-on: https://skia-review.googlesource.com/124504 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,ethannicholas@google.com Change-Id: Ic4c3978aaba0391f2f8bb1316a456e3821a3a2f2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/135700 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* added GrSkSLFP and converted DitherEffect to use itGravatar Ethan Nicholas2018-06-18
| | | | | | | | Bug: skia: Change-Id: I84b71165eab1712355f3c7669cee2d33d259f3df Reviewed-on: https://skia-review.googlesource.com/124504 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* renamed SkSL's assert macrosGravatar Ethan Nicholas2018-06-12
| | | | | | | | | | | | | | Since SkSL needs to run outside of Skia, it was originally using its own ASSERT macro, which mapped to SkASSERT when inside of Skia. This is causing conflicts with one or two other ASSERT macros defined around Skia, so to avoid that I am switching SkSL over to just use Skia's standard naming for these macros. Bug: skia: Change-Id: I115435d7282da03d076c6080f7b13d1972b9eb9f Reviewed-on: https://skia-review.googlesource.com/134322 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Add missing include (to get std::min on MSVC)Gravatar Brian Osman2018-02-09
| | | | | | | Change-Id: I2ca5ef0df9276e740a78b08e6f51bcdb445fd29b Reviewed-on: https://skia-review.googlesource.com/105985 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* fixed inconsistent ordering of SkSL enumsGravatar Ethan Nicholas2018-01-08
| | | | | | | | Bug: skia: Change-Id: Ifa11117f804ee2dd233d4a2a0241e567aecc5307 Reviewed-on: https://skia-review.googlesource.com/92103 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* converted ConstColorProcessor to SkSLGravatar Ethan Nicholas2017-11-20
| | | | | | | | Bug: skia: Change-Id: Ic3b18f82c1ab940637fb26dec1cf376dd859b35d Reviewed-on: https://skia-review.googlesource.com/73720 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* preliminary SkSL Metal backendGravatar Ethan Nicholas2017-10-24
| | | | | | | | Bug: skia: Change-Id: I03e839fb4f1061bc6d1b1b72d54fd39ca7bd7b84 Reviewed-on: https://skia-review.googlesource.com/51245 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Switch to the new SkSL lexer.""Gravatar Ethan Nicholas2017-09-11
| | | | | | | | | | This reverts commit 358515491a0d6891e6a709688a30ad087df1beb1. Bug: skia: Change-Id: I013fac0ed83774d8ae7c6ee6819045cab37f5e97 Reviewed-on: https://skia-review.googlesource.com/45180 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Switch to the new SkSL lexer."Gravatar Ethan Nicholas2017-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c576e93d174f3106e072a2f506bca3990b541265. Reason for revert: ASAN failures Original change's description: > Switch to the new SkSL lexer. > > This completely replaces flex with a new in-house lexical analyzer generator, > which we have done for performance and memory usage reasons. Flex requires us > to copy strings every time we need the text of a token, whereas this new lexer > allows us to handle strings as a (non-null-terminated) pointer and length > everywhere, eliminating most string copies. > > Bug: skia: > Change-Id: I2add26efc9e20cb699520e82abcf713af3968aca > Reviewed-on: https://skia-review.googlesource.com/39780 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> TBR=bsalomon@google.com,ethannicholas@google.com Change-Id: If27b750a5f696d06a6bcffed12fe9f0598e084a6 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/44881 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Switch to the new SkSL lexer.Gravatar Ethan Nicholas2017-09-11
| | | | | | | | | | | | | | This completely replaces flex with a new in-house lexical analyzer generator, which we have done for performance and memory usage reasons. Flex requires us to copy strings every time we need the text of a token, whereas this new lexer allows us to handle strings as a (non-null-terminated) pointer and length everywhere, eliminating most string copies. Bug: skia: Change-Id: I2add26efc9e20cb699520e82abcf713af3968aca Reviewed-on: https://skia-review.googlesource.com/39780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Micro optimizations to SkSL parserGravatar Brian Osman2017-08-15
| | | | | | | | | | | | | | Some of these are pretty trivial, but a few really moved the needle. In total, this cut the time in the parser by about 10% in my profiling. The early returns from peek and checkNext are probably the biggest wins, everything else is mostly about cutting down on string copying. Bug: skia: Change-Id: I3da0a0cfbc557e8cef480cb3a7d301c2b3f8802a Reviewed-on: https://skia-review.googlesource.com/34720 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Switch SkSL to std::stringGravatar Brian Osman2017-08-14
| | | | | | | | | | | | | | On desktop, this saves just over 5% of the time in the SkSL compiler. As written, the code will now build either way, so it's much easier to switch back (or even have some platforms use SkString, if that's ever required). Bug: skia: Change-Id: I634f26a4f6fcb404e59bda6a5c6a21a9c6d73c0b Reviewed-on: https://skia-review.googlesource.com/34381 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Re-re-land sksl fragment processor supportGravatar Ethan Nicholas2017-06-29
| | | | | | | | | | This reverts commit 5ce397205528f82084fc650c2ce27d246c01da33. Bug: skia: Change-Id: I88260c90004610a1cf8ad1a87c2b4b222525bbb6 Reviewed-on: https://skia-review.googlesource.com/21108 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Re-land sksl fragment processor support"Gravatar Mike Klein2017-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c070939fd1a954b7a492bc30f0cf64a664b90181. Reason for revert: This has some knock-on effects in the generation of Android.bp from our GN files. See gn/gn_to_bp.py? We're seeing things like "tmp/tmpsBVycx/gen/" end up in the include search path in Android.bp, which obviously don't exist there... Original change's description: > Re-land sksl fragment processor support > > This reverts commit ed50200682e0de72c3abecaa4d5324ebcd1ed9f9. > > Bug: skia: > Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab > Reviewed-on: https://skia-review.googlesource.com/20965 > Reviewed-by: Ben Wagner <benjaminwagner@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> TBR=benjaminwagner@google.com,ethannicholas@google.com Change-Id: I502486b5405923b322429219f4cc396a45a14cea No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/20990 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Re-land sksl fragment processor supportGravatar Ethan Nicholas2017-06-27
| | | | | | | | | | This reverts commit ed50200682e0de72c3abecaa4d5324ebcd1ed9f9. Bug: skia: Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab Reviewed-on: https://skia-review.googlesource.com/20965 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "sksl fragment processor support"Gravatar Ethan Nicholas2017-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ccf59917d3fe7aaf59de714acfbd0596503f324f. Reason for revert: breaking iOS bots Original change's description: > sksl fragment processor support > > Bug: skia: > Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34 > Reviewed-on: https://skia-review.googlesource.com/17843 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Ben Wagner <benjaminwagner@google.com> > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,benjaminwagner@google.com,ethannicholas@google.com Change-Id: I0a33060c7c42c7b44c5c13d443ac42958291c2f1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/20962 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* sksl fragment processor supportGravatar Ethan Nicholas2017-06-27
| | | | | | | | | Bug: skia: Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34 Reviewed-on: https://skia-review.googlesource.com/17843 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* minor skslc bugfixesGravatar Ethan Nicholas2017-05-19
| | | | | | | | | | This fixes the attributes on sk_VertexID, and a backwards test on SkSL::String::startsWith and ::endsWith. Change-Id: Icfddfc8ca95454d8646a1771761685c2525b296e Reviewed-on: https://skia-review.googlesource.com/17398 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* switched skslc to_string strategy after repeated problems on AndroidGravatar Ethan Nicholas2017-03-31
| | | | | | | | | BUG=skia: Change-Id: I9e27d06351e4bfcd503882b2c604878b44b6e5cc Reviewed-on: https://skia-review.googlesource.com/11015 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* added missing <inttypes.h> includeGravatar Ethan Nicholas2017-03-31
| | | | | | | | Bug: skia: Change-Id: I24f556c791f5a8ca295f6dc88dbf5532a7a9f688 Reviewed-on: https://skia-review.googlesource.com/11008 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* skslc can now be compiled with no Skia dependencies, in preparation for its ↵Gravatar Ethan Nicholas2017-03-31
| | | | | | | | | | | | eventual This reverts commit 9bd301d640ff63c280b202c7dd00bc00a3315ff4. Bug: skia: Change-Id: I5ad3f77ef33aa5ce2fd27fe383c9339c571663a1 Reviewed-on: https://skia-review.googlesource.com/10964 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "skslc can now be compiled with no Skia dependencies, in preparation ↵Gravatar Ethan Nicholas2017-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for its eventual" This reverts commit f3333c89bf05fc602d9bf8e1e24547668c660383. Reason for revert: breaking the bots Original change's description: > skslc can now be compiled with no Skia dependencies, in preparation for its eventual > role in Skia's build process. > > This reverts commit bcf35f86d50b784b165de703b404998dd4299f6a. > > BUG=skia: > > Change-Id: Id0a12dfc4d804d69a3c6bf60fed37e89ee130f02 > Reviewed-on: https://skia-review.googlesource.com/10802 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Ben Wagner <benjaminwagner@google.com> > TBR=benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ic7b50d391d25b3870acffa9764cbafc7f5c3be89 Reviewed-on: https://skia-review.googlesource.com/10962 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* skslc can now be compiled with no Skia dependencies, in preparation for its ↵Gravatar Ethan Nicholas2017-03-31
| | | | | | | | | | | | | | | eventual role in Skia's build process. This reverts commit bcf35f86d50b784b165de703b404998dd4299f6a. BUG=skia: Change-Id: Id0a12dfc4d804d69a3c6bf60fed37e89ee130f02 Reviewed-on: https://skia-review.googlesource.com/10802 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
* Revert "skslc can now be compiled with no Skia dependencies, in preparation for"Gravatar Ethan Nicholas2017-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7833466da45bfa1e078427c4a6db94d41c5c1535. Reason for revert: Vulkan assertion failure Original change's description: > skslc can now be compiled with no Skia dependencies, in preparation for > its eventual role in Skia's build process. > > Bug: skia: > Change-Id: Iaa9933f4fc4a64bec60aa897c509a3513f457a78 > Reviewed-on: https://skia-review.googlesource.com/10282 > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > Reviewed-by: Ben Wagner <benjaminwagner@google.com> > TBR=egdaniel@google.com,benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ic64cac2395abb406116885ddd725f74a434c8c49 Reviewed-on: https://skia-review.googlesource.com/10758 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* skslc can now be compiled with no Skia dependencies, in preparation forGravatar Ethan Nicholas2017-03-30
its eventual role in Skia's build process. Bug: skia: Change-Id: Iaa9933f4fc4a64bec60aa897c509a3513f457a78 Reviewed-on: https://skia-review.googlesource.com/10282 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>