Change-Id: I7c672ff6b8eb95ec8c1123a5bfdb202e1644f494
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259281
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Drop unnecessary () in `const char* (*fText)`. Sure, whatever.
Then a couple tweaks where we use strncpy():
In one case in SkICC.cpp, GCC warns us we're passing sizeof(dst) as
the copy count, which can be error prone because you may miss a
terminating nul. I believe the existing strncpy() behavior is what
we want here, so I've stifled this and left a note. We don't really
want a terminating nul... we want a zero fill of the remaining dst.
On the other side of that if-statment in that same function, GCC
warns that we've passed exactly sizeof(src) as the copy count when
writing the calculated description prefix, which again might be
buggy due to a missed terminating nul. Seemed like memcpy() was the
way to go here for that prefix. Ultimately we check to make sure we
wrote every single destination byte.
Over in SkPDFMetadata.cpp, strncpy() is concerned once again that
we're copying strlen(src) and thus omitting the terminating nul. As
usual we don't want that terminating nul, so switch to memcpy() to
make that explicit.
I'm starting to think strncpy() is too helpful to reason about sanely.
Change-Id: I1bcd5f4e406ca388c1c236c5f3ee531bf1737705
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257408
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Current strategy: everything from the top
Things to look at first are the manual changes:
- added tools/rewrite_includes.py
- removed -Idirectives from BUILD.gn
- various compile.sh simplifications
- tweak tools/embed_resources.py
- update gn/find_headers.py to write paths from the top
- update gn/gn_to_bp.py SkUserConfig.h layout
so that #include "include/config/SkUserConfig.h" always
gets the header we want.
No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This is a reland of fde841de44
Original change's description:
> Simplify SkTypeface::charsToGlyphs API to require UTF32 input
>
> Change-Id: I486713c496c40103eef13fa6068ac4d69e32f606
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207865
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: I5162c93b3ea6146d09334545744b791d993397b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/208679
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
This reverts commit fde841de44.
Reason for revert: used in headless on google3, need to add a guard
Original change's description:
> Simplify SkTypeface::charsToGlyphs API to require UTF32 input
>
> Change-Id: I486713c496c40103eef13fa6068ac4d69e32f606
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207865
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
TBR=bungeman@google.com,herb@google.com,reed@google.com
Change-Id: I1d28ed5c31deaa76aa3c4b627454b0ad3356a6fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/208800
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>