aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkUtils.h
Commit message (Collapse)AuthorAge
* Convert NULL and 0 to nullptr.Gravatar Ben Wagner2017-08-28
| | | | | | | | | | | | | | This was created by looking at warnings produced by clang's -Wzero-as-null-pointer-constant. This updates most issues in Skia code. However, there are places where GL and Vulkan want pointer values which are explicitly 0, external headers which use NULL directly, and possibly more uses in un-compiled sources (for other platforms). Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345 Reviewed-on: https://skia-review.googlesource.com/39521 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* factor out hexadecimal constants.Gravatar Hal Canary2017-06-19
| | | | | | | | | | Now we don't have to rely on the linker to de-duplicate so many gHex[] constants. Change-Id: Ia86d3a92648415afdb8d29499b4faded5ed05c7d Reviewed-on: https://skia-review.googlesource.com/20180 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* move sk_memset?? to SkOptsGravatar Mike Klein2017-05-23
| | | | | | | | | This lets the compiler generate AVX versions with wider writes. Change-Id: Ia63825e70c72bdb4d14bef97d8b4ea4be54c9d84 Reviewed-on: https://skia-review.googlesource.com/17715 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* move sk_memset16,32,64 out-of-lineGravatar Mike Klein2017-01-24
| | | | | | | | | | | | | This helps pick it out on profiles and when debugging. This will have a negligible impact on speed in most cases (small memsets are always fast, large memsets dwarf function call overhead), and clients like Chrome that use link-time optimization should see exactly zero impact. This does however affect code size: it makes libskia 43K smaller on my laptop. Change-Id: I55bdc75b7429a63024ab3b7d55dc1f886bde102a Reviewed-on: https://skia-review.googlesource.com/6589 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* SkUTF8_CountUnichars(s,l) and SkUTF8_NextUnichar(s,l) now safe.Gravatar Hal Canary2017-01-11
| | | | | | | | | | | | | Theory: We will accept blobs of data as utf-8 text without validation, but when it comes time to process it: count code poits or convert to code points, be careful to check for errors. TODO: SkTypeface::charsToGlyphs() needs to take a length. Change-Id: Id8110ab43dbffce96faffdda1e0bdaa39cad40e4 Reviewed-on: https://skia-review.googlesource.com/6849 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Herb Derby <herb@google.com>
* 4f linear gradient shader blittersGravatar fmalita2016-03-18
| | | | | | | | | | | | Add F16 specializations to support writing to half-float dests. Add color profile template arg across the board to support writing to sRGB dests. R=reed@google.com,mtklein@google.com,herb@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1808963005 Review URL: https://codereview.chromium.org/1808963005
* Move SkUtils.h to src/core.Gravatar bungeman2016-02-23
Review URL: https://codereview.chromium.org/1722703003