skia2/include
Kevin Lubick 68d6ff9222 [includes] Reduce IWYU exports from SkTypes.h
SkTypes.h was found exporting <stddef.h> and <stdint.h>.
Thus if a Skia file includes SkTypes.h, it did not need
to include either of those files to use things like
size_t or uint8_t respectively. [1]

This also resulted in strange IWYU warnings like:
warning: size_t is defined in "include/core/SkTypes.h", which isn't directly #included.

Thus, this CL removes those additional exports, and as a result,
adds many more includes of <cstddef> and <cstdint>.

The second change this CL is to not use the default IWYU
mappings which are hard-coded into IWYU [2]. These defaults
are valid, but make suggestions for the C version of
headers and not the C++ ones (i.e. <stddef.h> over <cstddef>).

To make these recommendations align better with our preferred
style (the C++ ones), we use IWYU with --no_default_mappings
and then have to expand our existing mappings to better deal
with how IWYU would resolve some of these headers.

[1] https://codereview.chromium.org/1207893002/#msg49
[2] 4c0f396159/iwyu_include_picker.cc (L1221-L1234)

Change-Id: Iafebe190f8f3e86f252147b9f538c182bcc34af4
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555516
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-07-06 14:52:55 +00:00
..
android [bazel] Add "skia_internal" target that exposes private API for tests/tools. 2022-06-02 11:23:50 +00:00
c [bazel] Add fixes for G3 2022-05-31 19:50:47 +00:00
codec [bazel] Add "skia_internal" target that exposes private API for tests/tools. 2022-06-02 11:23:50 +00:00
config [bazel] Add "skia_internal" target that exposes private API for tests/tools. 2022-06-02 11:23:50 +00:00
core [includes] Reduce IWYU exports from SkTypes.h 2022-07-06 14:52:55 +00:00
docs [bazel] Add "skia_internal" target that exposes private API for tests/tools. 2022-06-02 11:23:50 +00:00
effects Add SkRuntimeEffect flag indicating half-precision uniforms. 2022-06-28 17:11:31 +00:00
encode [bazel] Add "skia_internal" target that exposes private API for tests/tools. 2022-06-02 11:23:50 +00:00
gpu [Graphite] Store Task Graph on Recording. 2022-06-29 20:42:49 +00:00
pathops [bazel] Add "skia_internal" target that exposes private API for tests/tools. 2022-06-02 11:23:50 +00:00
ports [bazel] Add "skia_internal" target that exposes private API for tests/tools. 2022-06-02 11:23:50 +00:00
private Add StrikePinner::assertValid() to diagnose cache missing problem 2022-07-01 13:01:21 +00:00
sksl [includes] Reduce IWYU exports from SkTypes.h 2022-07-06 14:52:55 +00:00
svg [bazel] Add "skia_internal" target that exposes private API for tests/tools. 2022-06-02 11:23:50 +00:00
third_party Make copy of skcms checkout in //modules/skcms 2022-06-30 12:05:13 +00:00
utils [includes] Reduce IWYU exports from SkTypes.h 2022-07-06 14:52:55 +00:00
BUILD.bazel Make copy of skcms checkout in //modules/skcms 2022-06-30 12:05:13 +00:00
OWNERS Add Bazel folks as owners to BUILD.bazel files 2021-11-09 14:24:54 +00:00