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

Side by Side Diff: gm/fontscaler.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « gm/fontmgr.cpp ('k') | gm/fontscalerdistortable.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "gm.h" 7 #include "gm.h"
8 #include "SkTypeface.h" 8 #include "SkTypeface.h"
9 9
10 namespace skiagm { 10 namespace skiagm {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 p.setAntiAlias(true); 66 p.setAntiAlias(true);
67 SkRect r; 67 SkRect r;
68 r.set(x - SkIntToScalar(3), SkIntToScalar(15), 68 r.set(x - SkIntToScalar(3), SkIntToScalar(15),
69 x - SkIntToScalar(1), SkIntToScalar(280)); 69 x - SkIntToScalar(1), SkIntToScalar(280));
70 canvas->drawRect(r, p); 70 canvas->drawRect(r, p);
71 } 71 }
72 72
73 for (int ps = 6; ps <= 22; ps++) { 73 for (int ps = 6; ps <= 22; ps++) {
74 paint.setTextSize(SkIntToScalar(ps)); 74 paint.setTextSize(SkIntToScalar(ps));
75 canvas->drawText(text, textLen, x, y, paint); 75 canvas->drawText(text, textLen, x, y, paint);
76 y += paint.getFontMetrics(NULL); 76 y += paint.getFontMetrics(nullptr);
77 } 77 }
78 } 78 }
79 canvas->translate(0, SkIntToScalar(360)); 79 canvas->translate(0, SkIntToScalar(360));
80 paint.setSubpixelText(true); 80 paint.setSubpixelText(true);
81 } 81 }
82 } 82 }
83 83
84 private: 84 private:
85 typedef GM INHERITED; 85 typedef GM INHERITED;
86 }; 86 };
87 87
88 ////////////////////////////////////////////////////////////////////////////// 88 //////////////////////////////////////////////////////////////////////////////
89 89
90 static GM* MyFactory(void*) { return new FontScalerGM; } 90 static GM* MyFactory(void*) { return new FontScalerGM; }
91 static GMRegistry reg(MyFactory); 91 static GMRegistry reg(MyFactory);
92 92
93 } 93 }
OLDNEW
« no previous file with comments | « gm/fontmgr.cpp ('k') | gm/fontscalerdistortable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698