Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: src/utils/SkUnitMappers.cpp

Issue 113873008: remove unused SkFixed and SkFract functions (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/utils/SkUnitMappers.cpp
diff --git a/src/utils/SkUnitMappers.cpp b/src/utils/SkUnitMappers.cpp
index 5976e9de52ed5c3c9e1a2bd098932632efc3f583..f86a4542db8cd3957a224d8bb0d374b562c240c2 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);
}
}

Powered by Google App Engine
This is Rietveld 408576698