skia2/include
Mike Klein 3674336c33 Reland "make enum santizer fatal"
This is a reland of 166dbd3135

Since last attempt,
   - update SkPath::Direction docs
   - kIllegal is not an advanced blend mode

Original change's description:
> make enum santizer fatal
>
> This enum sanitizer checks that all the values of the enum we use fall
> within the range of the enumerated values.
>
> The main thing this helps point out is that the size of enum types in
> C++ need only be large enough to hold the largest declared value; larger
> values are undefined.  In practice, most enums are implemented as ints
> for compatibility with C, so while this hasn't pointed out anything
> egregiously broken, the sanitizer has found a couple possibly dangerous
> situations in our codebase.
>
> For most types using values outside the enum range, we can just
> explicitly size them to int.  This makes their de facto size de jure.
>
> But we need to actually make GrBlendEquation and GrBlendCoeff not store
> values outside their enumerated range.  They're packed into bitfields
> that really can't represent those (negative) values.  So for these I've
> added new kIllegal values to the enums, forcing us to deal with our
> once-silent illegal values a bit more explicitly.
>
> Change-Id: Ib617694cf1aaa83ae99289e9e760f49cb6393a2f
> Reviewed-on: https://skia-review.googlesource.com/c/168484
> Reviewed-by: Brian Osman <brianosman@google.com>

Cq-Include-Trybots: skia.primary:Housekeeper-PerCommit-Bookmaker,Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Debug-All-Android
Change-Id: Id93b80bbeae11872542c9b76715e3c3cb10609fd
Reviewed-on: https://skia-review.googlesource.com/c/168582
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-06 17:31:00 +00:00
..
android Alternate between two SkBitmaps in SkAnimatedImage 2018-05-23 20:49:42 +00:00
atlastext include: whitespace changes for clang-format 2018-09-19 14:54:57 +00:00
c expand imageinfo in C api, start on colorspace 2018-09-28 17:52:59 +00:00
codec Replace use of SkYUVSizeInfo with SkYUVASizeInfo 2018-10-30 15:00:34 +00:00
config remove unused parts of SkTypes.h 2018-06-08 23:53:57 +00:00
core Reland "make enum santizer fatal" 2018-11-06 17:31:00 +00:00
docs Add initial support for generating tagged PDFs. 2018-09-27 19:35:40 +00:00
effects [canvaskit] Add drawVertices API 2018-11-03 12:18:04 +00:00
encode Move SkNoncopyable to include/private. 2018-07-17 21:39:51 +00:00
gpu Reland "make enum santizer fatal" 2018-11-06 17:31:00 +00:00
pathops fixup winding contours 2018-08-17 14:01:51 +00:00
ports SkImageGeneratorCG.h to only expose factory method. 2018-09-19 21:20:35 +00:00
private Reland "make enum santizer fatal" 2018-11-06 17:31:00 +00:00
svg Add a SkWStream-based SkSVGCanvas factory 2017-09-19 20:33:19 +00:00
utils hide the SkPaint::Align enum entirely 2018-10-30 17:26:47 +00:00