skia2/src
bungeman afd7c74972 Remove SK_OFFSETOF from SkTypes, clean up offsetof usage.
The motivation for this was to remove SK_OFFSETOF from SkTypes, but
this CL is mostly about cleaning up our use of offsetof generally.

SK_OFFSETOF is removed to SkTypes and added to the two places it is
actually used (for the non standard behavior of finding the offset of
fields in types which are not standard layout).

Older versions of gcc required POD for offsetof to be used without
warning. Newer versions require the more relaxed standard layout.
Now that we no longer build on older versions of gcc, remove the
old warning suppressions.

PODMatrix is renamed to AggregateMatrix. SkMatrix is already POD
(trivial and standard layout). The PODMatrix name implies that the
POD-ness is needed for the offsetof, but it is actually the aggregate
attribute which is needed for compile time constant initialization.
This makes it more obvious that this can be revisited after we can
rely on constexpr constructors.

This also adds skstd::declval since this allows removal of existing
awkward code which casts a constant to a pointer to find the size of
a field.

TBR=reed@google.com
No API change, only removes unused macro.

Review URL: https://codereview.chromium.org/1309523003
2015-08-25 12:05:55 -07:00
..
animator Remove SK_OFFSETOF from SkTypes, clean up offsetof usage. 2015-08-25 12:05:55 -07:00
c C API: add radial, sweep, and two-point conical gradient shaders 2015-08-12 07:37:34 -07:00
codec Update giflib to 5.1.1 (AOSP hash) 2015-08-24 12:00:15 -07:00
core Remove SK_OFFSETOF from SkTypes, clean up offsetof usage. 2015-08-25 12:05:55 -07:00
device/xps change asABitmap to isABitmap on shader 2015-08-19 11:46:38 -07:00
doc SkPDF: allow PDF module to be disabled in DM and SampleApp 2015-08-11 10:30:12 -07:00
effects Return failure if getInputResultsGPU fails in SkXfermodeImageFilter 2015-08-21 08:24:22 -07:00
fonts Add BW masks to random scaler context 2015-08-01 10:33:40 -07:00
gpu Fix for distance field draw large glyph as paths 2015-08-25 12:05:50 -07:00
image SkImage method for detecting lazy decoding 2015-08-20 08:47:26 -07:00
images Use static_assert instead of SK_COMPILE_ASSERT. 2015-08-20 07:57:52 -07:00
lazy SkImage method for detecting lazy decoding 2015-08-20 08:47:26 -07:00
opts SkColorCubeFilter: require alpha == 0xFF. 2015-08-19 18:56:50 -07:00
pathops fix pathops fuzz failures 2015-08-18 07:12:44 -07:00
pdf SkPDF: Memory improvements for PDF Streams 2015-08-20 08:09:37 -07:00
pipe flag to use const& instead of const* for src-rect 2015-08-06 10:02:53 -07:00
ports Use static_assert instead of SK_COMPILE_ASSERT. 2015-08-20 07:57:52 -07:00
sfnt Use static_assert instead of SK_COMPILE_ASSERT. 2015-08-20 07:57:52 -07:00
svg Use static_assert instead of SK_COMPILE_ASSERT. 2015-08-20 07:57:52 -07:00
utils Update debugger print out of drawImageRect information 2015-08-24 08:27:38 -07:00
views Use static_assert instead of SK_COMPILE_ASSERT. 2015-08-20 07:57:52 -07:00
xml [SVGDevice] Text whitespace unittest 2015-02-20 13:54:40 -08:00