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

Unified Diff: src/utils/win/SkDWriteGeometrySink.cpp

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium Created 7 years, 1 month 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
« no previous file with comments | « src/utils/SkPathUtils.cpp ('k') | src/views/SkTouchGesture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/win/SkDWriteGeometrySink.cpp
diff --git a/src/utils/win/SkDWriteGeometrySink.cpp b/src/utils/win/SkDWriteGeometrySink.cpp
index a12b514f7efc6b0c492d82abb67ddf9cc2bcc350..b7ef88ba3b654923881d3ca8b1939be0487928c0 100644
--- a/src/utils/win/SkDWriteGeometrySink.cpp
+++ b/src/utils/win/SkDWriteGeometrySink.cpp
@@ -65,7 +65,7 @@ void STDMETHODCALLTYPE SkDWriteGeometrySink::SetSegmentFlags(D2D1_PATH_SEGMENT v
}
void STDMETHODCALLTYPE SkDWriteGeometrySink::BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) {
- fPath->moveTo(SkFloatToScalar(startPoint.x), SkFloatToScalar(startPoint.y));
+ fPath->moveTo(startPoint.x, startPoint.y);
if (figureBegin == D2D1_FIGURE_BEGIN_HOLLOW) {
SkDEBUGFAIL("Invalid D2D1_FIGURE_BEGIN value.");
}
@@ -73,7 +73,7 @@ void STDMETHODCALLTYPE SkDWriteGeometrySink::BeginFigure(D2D1_POINT_2F startPoin
void STDMETHODCALLTYPE SkDWriteGeometrySink::AddLines(const D2D1_POINT_2F *points, UINT pointsCount) {
for (const D2D1_POINT_2F *end = &points[pointsCount]; points < end; ++points) {
- fPath->lineTo(SkFloatToScalar(points->x), SkFloatToScalar(points->y));
+ fPath->lineTo(points->x, points->y);
}
}
@@ -121,12 +121,12 @@ void STDMETHODCALLTYPE SkDWriteGeometrySink::AddBeziers(const D2D1_BEZIER_SEGMEN
{ beziers->point3.x, beziers->point3.y }, };
Quadratic quadratic;
if (check_quadratic(cubic, quadratic)) {
- fPath->quadTo(SkFloatToScalar(quadratic[1].x), SkFloatToScalar(quadratic[1].y),
- SkFloatToScalar(quadratic[2].x), SkFloatToScalar(quadratic[2].y));
+ fPath->quadTo(quadratic[1].x, quadratic[1].y,
+ quadratic[2].x, quadratic[2].y);
} else {
- fPath->cubicTo(SkFloatToScalar(beziers->point1.x), SkFloatToScalar(beziers->point1.y),
- SkFloatToScalar(beziers->point2.x), SkFloatToScalar(beziers->point2.y),
- SkFloatToScalar(beziers->point3.x), SkFloatToScalar(beziers->point3.y));
+ fPath->cubicTo(beziers->point1.x, beziers->point1.y,
+ beziers->point2.x, beziers->point2.y,
+ beziers->point3.x, beziers->point3.y);
}
prevPt = beziers->point3;
}
« no previous file with comments | « src/utils/SkPathUtils.cpp ('k') | src/views/SkTouchGesture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698