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

Unified Diff: src/ports/SkFontHost_mac.cpp

Issue 1824733002: For *ToFixed, in debug mode, assert that the value is in range. (Closed) Base URL: https://skia.googlesource.com/skia@scalar-pin-to-fixed
Patch Set: Created 4 years, 9 months 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/ports/SkFontHost_mac.cpp
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp
index 69f660c8f1554c1626d0780e28a98888248a619c..7dba792863979de00549a750d0a934d79c5176d5 100644
--- a/src/ports/SkFontHost_mac.cpp
+++ b/src/ports/SkFontHost_mac.cpp
@@ -1042,8 +1042,8 @@ void SkScalerContext_Mac::generateMetrics(SkGlyph* glyph) {
&cgGlyph, &cgAdvance, 1);
}
cgAdvance = CGSizeApplyAffineTransform(cgAdvance, fTransform);
- glyph->fAdvanceX = SkFloatToFixed_Check(cgAdvance.width);
- glyph->fAdvanceY = -SkFloatToFixed_Check(cgAdvance.height);
+ glyph->fAdvanceX = SkFloatToFixed(cgAdvance.width);
+ glyph->fAdvanceY = -SkFloatToFixed(cgAdvance.height);
// The following produces skBounds in SkGlyph units (pixels, y down),
// or returns early if skBounds would be empty.
« include/core/SkFixed.h ('K') | « src/effects/gradients/SkTwoPointConicalGradient.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698