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

Side by Side Diff: gm/glyph_pos_align.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/glyph_pos.cpp ('k') | gm/gm_expectations.h » ('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 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 18 matching lines...) Expand all
29 SkISize onISize() override { return SkISize::Make(kWidth, kHeight); } 29 SkISize onISize() override { return SkISize::Make(kWidth, kHeight); }
30 30
31 void onDraw(SkCanvas* canvas) override { 31 void onDraw(SkCanvas* canvas) override {
32 canvas->clear(SK_ColorBLACK); 32 canvas->clear(SK_ColorBLACK);
33 33
34 SkPaint paint; 34 SkPaint paint;
35 paint.setTextSize(kTextHeight); 35 paint.setTextSize(kTextHeight);
36 paint.setFakeBoldText(true); 36 paint.setFakeBoldText(true);
37 const SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE }; 37 const SkColor colors[] = { SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE };
38 const SkPoint pts[] = {{0, 0}, {kWidth, kHeight}}; 38 const SkPoint pts[] = {{0, 0}, {kWidth, kHeight}};
39 SkAutoTUnref<SkShader> grad(SkGradientShader::CreateLinear(pts, colors, NULL, 39 SkAutoTUnref<SkShader> grad(SkGradientShader::CreateLinear(pts, colors, nullptr,
40 SK_ARRAY_COUN T(colors), 40 SK_ARRAY_COUN T(colors),
41 SkShader::kMi rror_TileMode)); 41 SkShader::kMi rror_TileMode));
42 paint.setShader(grad); 42 paint.setShader(grad);
43 43
44 44
45 paint.setTextAlign(SkPaint::kRight_Align); 45 paint.setTextAlign(SkPaint::kRight_Align);
46 drawTestCase(canvas, "Right Align", kTextHeight, paint); 46 drawTestCase(canvas, "Right Align", kTextHeight, paint);
47 47
48 paint.setTextAlign(SkPaint::kCenter_Align); 48 paint.setTextAlign(SkPaint::kCenter_Align);
49 drawTestCase(canvas, "Center Align", 4 * kTextHeight, paint); 49 drawTestCase(canvas, "Center Align", 4 * kTextHeight, paint);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 ////////////////////////////////////////////////////////////////////////////// 88 //////////////////////////////////////////////////////////////////////////////
89 89
90 static GM* GlyphPosAlignFactory(void*) { 90 static GM* GlyphPosAlignFactory(void*) {
91 return new GlyphPosAlignGM(); 91 return new GlyphPosAlignGM();
92 } 92 }
93 93
94 static GMRegistry reg(GlyphPosAlignFactory); 94 static GMRegistry reg(GlyphPosAlignFactory);
95 95
96 } 96 }
OLDNEW
« no previous file with comments | « gm/glyph_pos.cpp ('k') | gm/gm_expectations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698