Fix to allow building in -std=c++20 mode.
Various kinds of math with enums are deprecated, so switch to constexprs. Bug: chromium:1284275 Change-Id: I7ec0aa493b170538170f2a9f3262e7bed870c568 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536886 Commit-Queue: Peter Kasting <pkasting@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org> Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
20d0b4301a
commit
5d969e3dd9
@ -810,10 +810,10 @@ bool GrGenerateDistanceFieldFromPath(unsigned char* distanceField,
|
||||
|
||||
// adjust distance based on winding
|
||||
for (int row = 0; row < height; ++row) {
|
||||
enum DFSign {
|
||||
kInside = -1,
|
||||
kOutside = 1
|
||||
};
|
||||
using DFSign = int;
|
||||
constexpr DFSign kInside = -1;
|
||||
constexpr DFSign kOutside = 1;
|
||||
|
||||
int windingNumber = 0; // Winding number start from zero for each scanline
|
||||
for (int col = 0; col < width; ++col) {
|
||||
int idx = (row * width) + col;
|
||||
|
Loading…
Reference in New Issue
Block a user