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

Unified Diff: gm/pixelsnap.cpp

Issue 1257773002: rename portable_typeface_always to portable_typeface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unncessary change to path test Created 5 years, 5 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 | « gm/imageblur2.cpp ('k') | gm/poly2poly.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/pixelsnap.cpp
diff --git a/gm/pixelsnap.cpp b/gm/pixelsnap.cpp
index 8a513f3ca5409725def3c39ea2bb0c08a6d62c3a..cae501b54ccddae61349f8db4a220edff9ede3f9 100644
--- a/gm/pixelsnap.cpp
+++ b/gm/pixelsnap.cpp
@@ -43,33 +43,31 @@ protected:
labelPaint.setAntiAlias(true);
labelPaint.setColor(SK_ColorWHITE);
labelPaint.setTextSize(SkIntToScalar(kLabelTextSize));
+ sk_tool_utils::set_portable_typeface(&labelPaint);
SkPaint linePaint;
linePaint.setColor(SK_ColorWHITE);
- // Drawing labels is useful for debugging, but bad for baselining (x-platform txt diffs).
- if (false) {
- // Draw row labels
- canvas->save();
- canvas->translate(0, SkIntToScalar(kLabelOffsetY));
- for (int i = 0; i <= kSubPixelSteps; ++i) {
- offset.printf("%d", i);
- canvas->drawText(offset.c_str(), offset.size(),
- 0, i * kTrans + labelPaint.getTextSize(),
- labelPaint);
- }
- canvas->restore();
-
- // Draw col labels
- canvas->save();
- canvas->translate(SkIntToScalar(kLabelOffsetX), 0);
- for (int i = 0; i <= kSubPixelSteps; ++i) {
- offset.printf("%d", i);
- canvas->drawText(offset.c_str(), offset.size(),
- i * SkIntToScalar(kTrans), labelPaint.getTextSize(),
- labelPaint);
- }
- canvas->restore();
- }
+ // Draw row labels
+ canvas->save();
+ canvas->translate(0, SkIntToScalar(kLabelOffsetY));
+ for (int i = 0; i <= kSubPixelSteps; ++i) {
+ offset.printf("%d", i);
+ canvas->drawText(offset.c_str(), offset.size(),
+ 0, i * kTrans + labelPaint.getTextSize(),
+ labelPaint);
+ }
+ canvas->restore();
+
+ // Draw col labels
+ canvas->save();
+ canvas->translate(SkIntToScalar(kLabelOffsetX), 0);
+ for (int i = 0; i <= kSubPixelSteps; ++i) {
+ offset.printf("%d", i);
+ canvas->drawText(offset.c_str(), offset.size(),
+ i * SkIntToScalar(kTrans), labelPaint.getTextSize(),
+ labelPaint);
+ }
+ canvas->restore();
canvas->translate(SkIntToScalar(kLabelOffsetX), SkIntToScalar(kLabelOffsetY));
« no previous file with comments | « gm/imageblur2.cpp ('k') | gm/poly2poly.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698