skia2/include/gpu
Mike Klein 166dbd3135 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>
2018-11-06 15:39:50 +00:00
..
gl Add GrGLInterface support for sampler objects and GrGLCaps detection. 2018-10-16 20:30:58 +00:00
mock Remove texel buffer support. 2018-07-13 00:45:54 +00:00
mtl added Metal support to GrBackendSurface 2018-06-29 13:32:17 +00:00
vk Add ability for an SkDevice to handle the drawing of an SkDrawable. 2018-10-19 15:21:54 +00:00
GrBackendDrawableInfo.h Add ability for an SkDevice to handle the drawing of an SkDrawable. 2018-10-19 15:21:54 +00:00
GrBackendSemaphore.h Move GrBackend enum to enum class. 2018-10-12 14:01:58 +00:00
GrBackendSurface.h Move GrBackend enum to enum class. 2018-10-12 14:01:58 +00:00
GrBlend.h make enum santizer fatal 2018-11-06 15:39:50 +00:00
GrConfig.h eliminate SK_BUILD_FOR_WIN32 2018-01-26 19:52:04 +00:00
GrContext.h Move GrBackend enum to enum class. 2018-10-12 14:01:58 +00:00
GrContextOptions.h Move GrBackend enum to enum class. 2018-10-12 14:01:58 +00:00
GrDriverBugWorkarounds.h Reland "Add driver bug workarounds to GrCaps" 2018-05-14 23:46:49 +00:00
GrDriverBugWorkaroundsAutogen.h Add disable_texture_storage workaround 2018-08-22 23:56:23 +00:00
GrGpuResource.h Remove purging of GPU resources based on flush counts. 2018-09-10 13:11:07 +00:00
GrRenderTarget.h Remove SkSafeSetNull. 2018-07-12 20:59:20 +00:00
GrResourceKey.h ccpr: Use SkMessageBus for thread-safe eviction of cache entries 2018-10-19 00:25:20 +00:00
GrSamplerState.h Rework GrSamplerParams to be more compact and use its own wrap mode enum. 2017-09-07 16:58:31 +00:00
GrSurface.h Make GrTextureProxy store a GrTextureType. 2018-07-30 19:32:13 +00:00
GrTexture.h Use GrTextureType to determine highest supported filter 2018-08-01 17:24:52 +00:00
GrTypes.h make enum santizer fatal 2018-11-06 15:39:50 +00:00