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

Unified Diff: src/core/SkPaint.cpp

Issue 1683743005: Simple cleanups related to SkFixed. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 10 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/core/SkPaint.cpp
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index cea3d0fc8dde623e16bfa8a538166438a43ea264..49e3a5ab9c2b4987c0136b3bb78de24d8ac4617f 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -1028,7 +1028,7 @@ size_t SkPaint::breakText(const void* textD, size_t length, SkScalar maxWidth,
SkMeasureCacheProc glyphCacheProc = paint.getMeasureCacheProc(false);
const int xyIndex = paint.isVerticalText() ? 1 : 0;
// use 64bits for our accumulator, to avoid overflowing 16.16
- Sk48Dot16 max = SkScalarToFixed(maxWidth);
+ Sk48Dot16 max = SkScalarTo48Dot16(maxWidth);
reed1 2016/02/11 21:43:44 Wow, this seems like a bug bug. Is/was there a tes
dogben 2016/02/11 21:53:13 The previous code was actually fine, assuming maxW
reed1 2016/02/11 22:22:59 So we could write a test that measures a big strin
dogben 2016/02/12 02:35:24 Oh! For some reason I was thinking that was the wi
Sk48Dot16 width = 0;
SkAutoKern autokern;

Powered by Google App Engine
This is Rietveld 408576698