aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkUnitMappers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/SkUnitMappers.cpp')
-rw-r--r--src/utils/SkUnitMappers.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/utils/SkUnitMappers.cpp b/src/utils/SkUnitMappers.cpp
index 5976e9de52..f86a4542db 100644
--- a/src/utils/SkUnitMappers.cpp
+++ b/src/utils/SkUnitMappers.cpp
@@ -8,6 +8,7 @@
#include "SkUnitMappers.h"
#include "SkFlattenableBuffers.h"
+
SkDiscreteMapper::SkDiscreteMapper(int segments) {
if (segments < 2) {
fSegments = 0;
@@ -17,7 +18,7 @@ SkDiscreteMapper::SkDiscreteMapper(int segments) {
segments = 0xFFFF;
}
fSegments = segments;
- fScale = SK_Fract1 / (segments - 1);
+ fScale = (1 << 30) / (segments - 1);
}
}