-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 166dbd3. Reason for revert: illegal is not advanced, docs 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> TBR=mtklein@chromium.org,mtklein@google.com,brianosman@google.com Change-Id: I691c08092340a6273e442c0f098b844f7d0363ba No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/c/168581 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
- Loading branch information
Mike Klein
authored and
Skia Commit-Bot
committed
Nov 6, 2018
1 parent
4529cb5
commit f2b35e4
Showing
14 changed files
with
19 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters