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

Unified Diff: src/core/SkEdge.h

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (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/core/SkEdge.h
diff --git a/src/core/SkEdge.h b/src/core/SkEdge.h
index ea7c84f78d2ea122aa14f3cd4e16d1aae5f2d7e0..091223631fed4b4058a6ed93d59a5de638701999 100644
--- a/src/core/SkEdge.h
+++ b/src/core/SkEdge.h
@@ -89,19 +89,11 @@ int SkEdge::setLine(const SkPoint& p0, const SkPoint& p1, int shift) {
SkFDot6 x0, y0, x1, y1;
{
-#ifdef SK_SCALAR_IS_FLOAT
float scale = float(1 << (shift + 6));
x0 = int(p0.fX * scale);
y0 = int(p0.fY * scale);
x1 = int(p1.fX * scale);
y1 = int(p1.fY * scale);
-#else
- shift = 10 - shift;
- x0 = p0.fX >> shift;
- y0 = p0.fY >> shift;
- x1 = p1.fX >> shift;
- y1 = p1.fY >> shift;
-#endif
}
int winding = 1;
« src/core/SkCanvas.cpp ('K') | « src/core/SkCubicClipper.cpp ('k') | src/core/SkEdge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698