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

Side by Side Diff: gm/fontscalerdistortable.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/fontscaler.cpp ('k') | gm/gammatext.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 2015 Google Inc. 2 * Copyright 2015 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 "Resources.h" 8 #include "Resources.h"
9 #include "SkFixed.h" 9 #include "SkFixed.h"
10 #include "SkFontDescriptor.h" 10 #include "SkFontDescriptor.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 p.setAntiAlias(true); 68 p.setAntiAlias(true);
69 SkRect r; 69 SkRect r;
70 r.set(x - SkIntToScalar(3), SkIntToScalar(15), 70 r.set(x - SkIntToScalar(3), SkIntToScalar(15),
71 x - SkIntToScalar(1), SkIntToScalar(280)); 71 x - SkIntToScalar(1), SkIntToScalar(280));
72 canvas->drawRect(r, p); 72 canvas->drawRect(r, p);
73 } 73 }
74 74
75 for (int ps = 6; ps <= 22; ps++) { 75 for (int ps = 6; ps <= 22; ps++) {
76 paint.setTextSize(SkIntToScalar(ps)); 76 paint.setTextSize(SkIntToScalar(ps));
77 canvas->drawText(text, textLen, x, y, paint); 77 canvas->drawText(text, textLen, x, y, paint);
78 y += paint.getFontMetrics(NULL); 78 y += paint.getFontMetrics(nullptr);
79 } 79 }
80 } 80 }
81 canvas->translate(0, SkIntToScalar(360)); 81 canvas->translate(0, SkIntToScalar(360));
82 paint.setSubpixelText(true); 82 paint.setSubpixelText(true);
83 } 83 }
84 } 84 }
85 85
86 private: 86 private:
87 typedef GM INHERITED; 87 typedef GM INHERITED;
88 }; 88 };
89 89
90 ////////////////////////////////////////////////////////////////////////////// 90 //////////////////////////////////////////////////////////////////////////////
91 91
92 static GM* MyFactory(void*) { return new FontScalerDistortableGM; } 92 static GM* MyFactory(void*) { return new FontScalerDistortableGM; }
93 static GMRegistry reg(MyFactory); 93 static GMRegistry reg(MyFactory);
94 94
95 } 95 }
OLDNEW
« no previous file with comments | « gm/fontscaler.cpp ('k') | gm/gammatext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698