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

Side by Side Diff: gm/bitmapsource2.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/bitmapshader.cpp ('k') | gm/blend.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 "SkBitmapSource.h" 9 #include "SkBitmapSource.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void onDraw(SkCanvas* canvas) override { 59 void onDraw(SkCanvas* canvas) override {
60 SkRect srcRect = SkRect::MakeLTRB(0, 0, 60 SkRect srcRect = SkRect::MakeLTRB(0, 0,
61 SkIntToScalar(kImageSize), SkIntToScal ar(kImageSize)); 61 SkIntToScalar(kImageSize), SkIntToScal ar(kImageSize));
62 SkRect dstRect = SkRect::MakeLTRB(0.75f, 0.75f, 225.75f, 225.75f); 62 SkRect dstRect = SkRect::MakeLTRB(0.75f, 0.75f, 225.75f, 225.75f);
63 63
64 SkAutoTUnref<SkImageFilter> filter(SkBitmapSource::Create(fBM, srcRect, dstRect, fFilter)); 64 SkAutoTUnref<SkImageFilter> filter(SkBitmapSource::Create(fBM, srcRect, dstRect, fFilter));
65 65
66 SkPaint p; 66 SkPaint p;
67 p.setImageFilter(filter); 67 p.setImageFilter(filter);
68 68
69 canvas->saveLayer(NULL, &p); 69 canvas->saveLayer(nullptr, &p);
70 canvas->restore(); 70 canvas->restore();
71 } 71 }
72 72
73 private: 73 private:
74 static const int kImageSize = 503; 74 static const int kImageSize = 503;
75 75
76 SkString fSuffix; 76 SkString fSuffix;
77 SkFilterQuality fFilter; 77 SkFilterQuality fFilter;
78 SkBitmap fBM; 78 SkBitmap fBM;
79 79
80 typedef GM INHERITED; 80 typedef GM INHERITED;
81 }; 81 };
82 82
83 ////////////////////////////////////////////////////////////////////////////// 83 //////////////////////////////////////////////////////////////////////////////
84 84
85 DEF_GM(return new BitmapSourceGM("none", kNone_SkFilterQuality);) 85 DEF_GM(return new BitmapSourceGM("none", kNone_SkFilterQuality);)
86 DEF_GM(return new BitmapSourceGM("low", kLow_SkFilterQuality);) 86 DEF_GM(return new BitmapSourceGM("low", kLow_SkFilterQuality);)
87 DEF_GM(return new BitmapSourceGM("med", kMedium_SkFilterQuality);) 87 DEF_GM(return new BitmapSourceGM("med", kMedium_SkFilterQuality);)
88 DEF_GM(return new BitmapSourceGM("high", kHigh_SkFilterQuality);) 88 DEF_GM(return new BitmapSourceGM("high", kHigh_SkFilterQuality);)
89 } 89 }
OLDNEW
« no previous file with comments | « gm/bitmapshader.cpp ('k') | gm/blend.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698