skia2/include
Mike Klein e72e773ad0 remove SkTCast
SkTCast is functionally equivalent to reinterpret_cast.

The comment about SkTCast helping to avoid strict alising issues is not
true.  Dereferencing a pointer cast to a pointer of an unrelated type is
always undefined, even if smuggled through a union like in SkTCast.

To really avoid aliasing issues, you need to make a union[1] of the two
value types, or better, memcpy between values.  I've had to fix
MatrixText.cpp where switching to reinterpret_cast actually let Clang
notice and warn that we're exploiting undefined behavior, and
GrSwizzle.h and SkCamera.cpp caught by GCC.

I've switched SkTLList over to use SkAlignedSTStorage, which seems
to help convince some GCC versions that fObj is used in a sound way.

[1] The union punning trick is non-standard in C++, but GCC and MSVC
both explicitly support it.  I believe Clang does not officially
explicitly support it, but probably does quietly for GCC compatibility.

Change-Id: I71822e82c962f9aaac8be24d3c0f39f4f8b05026
Reviewed-on: https://skia-review.googlesource.com/134947
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-06-18 17:22:18 +00:00
..
android Alternate between two SkBitmaps in SkAnimatedImage 2018-05-23 20:49:42 +00:00
atlastext Revert "Move op memory storage to GrContext" 2018-06-15 15:59:45 +00:00
c C API: document sk_matrix_t 2017-03-21 18:04:34 +00:00
codec Remove ColorCodecBench 2018-05-23 15:20:21 +00:00
config remove unused parts of SkTypes.h 2018-06-08 23:53:57 +00:00
core remove SkTCast 2018-06-18 17:22:18 +00:00
effects rebase 2018-06-08 20:36:53 +00:00
encode Revert "Add an Option for orientation on JPEG encodes" 2017-10-18 18:09:47 +00:00
gpu Remove string.h from SkTypes.h 2018-06-15 20:32:05 +00:00
pathops Remove trailing whitespace. 2017-10-09 21:20:34 +00:00
ports Remove non-smart SkFontConfigInterface::SetGlobal. 2018-05-15 19:42:13 +00:00
private remove SkTCast 2018-06-18 17:22:18 +00:00
svg Add a SkWStream-based SkSVGCanvas factory 2017-09-19 20:33:19 +00:00
utils Revert "Revert "SkTypes: extract SkTo"" 2018-06-14 14:55:17 +00:00
views [Viewer] Preserve gesture transformation matrix on slide/backend change 2018-01-05 18:18:39 +00:00