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

Unified Diff: src/core/SkPaint.cpp

Issue 510433002: remove (unused) scale parameter from measureText (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused field from struct Created 6 years, 4 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
« no previous file with comments | « samplecode/SampleMeasure.cpp ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPaint.cpp
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 954680b8dcb8a5eed5fb1eabac8139a8b1b1d6d8..d19efb0aa456bec8b00824df1a96afeb617eba97 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -1100,8 +1100,7 @@ SkScalar SkPaint::measure_text(SkGlyphCache* cache,
return Sk48Dot16ToScalar(x);
}
-SkScalar SkPaint::measureText(const void* textData, size_t length,
- SkRect* bounds, SkScalar zoom) const {
+SkScalar SkPaint::measureText(const void* textData, size_t length, SkRect* bounds) const {
const char* text = (const char*)textData;
SkASSERT(text != NULL || length == 0);
@@ -1109,13 +1108,7 @@ SkScalar SkPaint::measureText(const void* textData, size_t length,
const SkPaint& paint = canon.getPaint();
SkScalar scale = canon.getScale();
- SkMatrix zoomMatrix, *zoomPtr = NULL;
- if (zoom) {
- zoomMatrix.setScale(zoom, zoom);
- zoomPtr = &zoomMatrix;
- }
-
- SkAutoGlyphCache autoCache(paint, NULL, zoomPtr);
+ SkAutoGlyphCache autoCache(paint, NULL, NULL);
SkGlyphCache* cache = autoCache.getCache();
SkScalar width = 0;
« no previous file with comments | « samplecode/SampleMeasure.cpp ('k') | tests/PaintTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698