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

Side by Side Diff: gm/textblob.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/texdata.cpp ('k') | gm/textbloblooper.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 2014 Google Inc. 2 * Copyright 2014 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 7
8 #include "gm.h" 8 #include "gm.h"
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 TextBlobGM(const char* txt) 69 TextBlobGM(const char* txt)
70 : fText(txt) { 70 : fText(txt) {
71 } 71 }
72 72
73 protected: 73 protected:
74 void onOnceBeforeDraw() override { 74 void onOnceBeforeDraw() override {
75 fTypeface.reset(sk_tool_utils::create_portable_typeface("serif", SkTypef ace::kNormal)); 75 fTypeface.reset(sk_tool_utils::create_portable_typeface("serif", SkTypef ace::kNormal));
76 SkPaint p; 76 SkPaint p;
77 p.setTypeface(fTypeface); 77 p.setTypeface(fTypeface);
78 size_t txtLen = strlen(fText); 78 size_t txtLen = strlen(fText);
79 int glyphCount = p.textToGlyphs(fText, txtLen, NULL); 79 int glyphCount = p.textToGlyphs(fText, txtLen, nullptr);
80 80
81 fGlyphs.append(glyphCount); 81 fGlyphs.append(glyphCount);
82 p.textToGlyphs(fText, txtLen, fGlyphs.begin()); 82 p.textToGlyphs(fText, txtLen, fGlyphs.begin());
83 } 83 }
84 84
85 SkString onShortName() override { 85 SkString onShortName() override {
86 return SkString("textblob"); 86 return SkString("textblob");
87 } 87 }
88 88
89 SkISize onISize() override { 89 SkISize onISize() override {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return builder.build(); 180 return builder.build();
181 } 181 }
182 182
183 SkTDArray<uint16_t> fGlyphs; 183 SkTDArray<uint16_t> fGlyphs;
184 SkAutoTUnref<SkTypeface> fTypeface; 184 SkAutoTUnref<SkTypeface> fTypeface;
185 const char* fText; 185 const char* fText;
186 typedef skiagm::GM INHERITED; 186 typedef skiagm::GM INHERITED;
187 }; 187 };
188 188
189 DEF_GM(return new TextBlobGM("hamburgefons");) 189 DEF_GM(return new TextBlobGM("hamburgefons");)
OLDNEW
« no previous file with comments | « gm/texdata.cpp ('k') | gm/textbloblooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698