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

Side by Side Diff: gm/mipmap.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/matrixconvolution.cpp ('k') | gm/modecolorfilters.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 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkImage.h" 10 #include "SkImage.h"
(...skipping 27 matching lines...) Expand all
38 SkString str; 38 SkString str;
39 str.printf("scale %g %g", dst.width() / img->width(), dst.height() / img->he ight()); 39 str.printf("scale %g %g", dst.width() / img->width(), dst.height() / img->he ight());
40 // canvas->drawText(str.c_str(), str.size(), 300, 100, paint); 40 // canvas->drawText(str.c_str(), str.size(), 300, 100, paint);
41 41
42 canvas->translate(20, 20); 42 canvas->translate(20, 20);
43 for (int i = 0; i < 4; ++i) { 43 for (int i = 0; i < 4; ++i) {
44 paint.setFilterQuality(SkFilterQuality(i)); 44 paint.setFilterQuality(SkFilterQuality(i));
45 canvas->drawImageRect(img, dst, &paint); 45 canvas->drawImageRect(img, dst, &paint);
46 canvas->translate(0, 20); 46 canvas->translate(0, 20);
47 } 47 }
48 canvas->drawImage(img, 20, 20, NULL); 48 canvas->drawImage(img, 20, 20, nullptr);
49 } 49 }
50 50
51 class MipMapGM : public skiagm::GM { 51 class MipMapGM : public skiagm::GM {
52 public: 52 public:
53 MipMapGM() {} 53 MipMapGM() {}
54 54
55 protected: 55 protected:
56 SkString onShortName() override { return SkString("mipmap"); } 56 SkString onShortName() override { return SkString("mipmap"); }
57 57
58 SkISize onISize() override { return SkISize::Make(400, 200); } 58 SkISize onISize() override { return SkISize::Make(400, 200); }
59 59
60 void onDraw(SkCanvas* canvas) override { 60 void onDraw(SkCanvas* canvas) override {
61 test_mip(canvas); 61 test_mip(canvas);
62 } 62 }
63 63
64 private: 64 private:
65 typedef skiagm::GM INHERITED; 65 typedef skiagm::GM INHERITED;
66 }; 66 };
67 DEF_GM( return new MipMapGM; ) 67 DEF_GM( return new MipMapGM; )
68 68
OLDNEW
« no previous file with comments | « gm/matrixconvolution.cpp ('k') | gm/modecolorfilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698