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

Side by Side Diff: gm/pictureimagefilter.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/picture.cpp ('k') | gm/pictureshader.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 2013 Google Inc. 2 * Copyright 2013 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 "SkPictureImageFilter.h" 10 #include "SkPictureImageFilter.h"
11 #include "SkPictureRecorder.h" 11 #include "SkPictureRecorder.h"
12 12
13 // This GM exercises the SkPictureImageFilter ImageFilter class. 13 // This GM exercises the SkPictureImageFilter ImageFilter class.
14 14
15 class PictureImageFilterGM : public skiagm::GM { 15 class PictureImageFilterGM : public skiagm::GM {
16 public: 16 public:
17 PictureImageFilterGM() { 17 PictureImageFilterGM() {
18 } 18 }
19 19
20 protected: 20 protected:
21 SkString onShortName() override { 21 SkString onShortName() override {
22 return SkString("pictureimagefilter"); 22 return SkString("pictureimagefilter");
23 } 23 }
24 24
25 void makePicture() { 25 void makePicture() {
26 SkPictureRecorder recorder; 26 SkPictureRecorder recorder;
27 SkCanvas* canvas = recorder.beginRecording(100, 100, NULL, 0); 27 SkCanvas* canvas = recorder.beginRecording(100, 100, nullptr, 0);
28 canvas->clear(SK_ColorBLACK); 28 canvas->clear(SK_ColorBLACK);
29 SkPaint paint; 29 SkPaint paint;
30 paint.setAntiAlias(true); 30 paint.setAntiAlias(true);
31 sk_tool_utils::set_portable_typeface(&paint); 31 sk_tool_utils::set_portable_typeface(&paint);
32 paint.setColor(0xFFFFFFFF); 32 paint.setColor(0xFFFFFFFF);
33 paint.setTextSize(SkIntToScalar(96)); 33 paint.setTextSize(SkIntToScalar(96));
34 const char* str = "e"; 34 const char* str = "e";
35 canvas->drawText(str, strlen(str), SkIntToScalar(20), SkIntToScalar(70), paint); 35 canvas->drawText(str, strlen(str), SkIntToScalar(20), SkIntToScalar(70), paint);
36 fPicture.reset(recorder.endRecording()); 36 fPicture.reset(recorder.endRecording());
37 } 37 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 103
104 private: 104 private:
105 SkAutoTUnref<SkPicture> fPicture; 105 SkAutoTUnref<SkPicture> fPicture;
106 typedef GM INHERITED; 106 typedef GM INHERITED;
107 }; 107 };
108 108
109 /////////////////////////////////////////////////////////////////////////////// 109 ///////////////////////////////////////////////////////////////////////////////
110 110
111 DEF_GM( return new PictureImageFilterGM; ) 111 DEF_GM( return new PictureImageFilterGM; )
OLDNEW
« no previous file with comments | « gm/picture.cpp ('k') | gm/pictureshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698