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

Side by Side Diff: bench/BlurImageFilterBench.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 | « bench/BitmapBench.cpp ('k') | bench/BlurRectBench.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 "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkBlurImageFilter.h" 9 #include "SkBlurImageFilter.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 void onDraw(const int loops, SkCanvas* canvas) override { 45 void onDraw(const int loops, SkCanvas* canvas) override {
46 SkPaint paint; 46 SkPaint paint;
47 static const SkScalar kX = 0; 47 static const SkScalar kX = 0;
48 static const SkScalar kY = 0; 48 static const SkScalar kY = 0;
49 const SkRect bmpRect = SkRect::MakeXYWH(kX, kY, 49 const SkRect bmpRect = SkRect::MakeXYWH(kX, kY,
50 SkIntToScalar(fCheckerboard.widt h()), 50 SkIntToScalar(fCheckerboard.widt h()),
51 SkIntToScalar(fCheckerboard.heig ht())); 51 SkIntToScalar(fCheckerboard.heig ht()));
52 const SkImageFilter::CropRect cropRect = 52 const SkImageFilter::CropRect cropRect =
53 SkImageFilter::CropRect(bmpRect.makeInse t(10.f, 10.f)); 53 SkImageFilter::CropRect(bmpRect.makeInse t(10.f, 10.f));
54 const SkImageFilter::CropRect* crop = fIsCropped ? &cropRect : NULL; 54 const SkImageFilter::CropRect* crop = fIsCropped ? &cropRect : nullptr;
55 55
56 paint.setImageFilter(SkBlurImageFilter::Create(fSigmaX, fSigmaY, NULL, c rop))->unref(); 56 paint.setImageFilter(SkBlurImageFilter::Create(fSigmaX, fSigmaY, nullptr , crop))->unref();
57 57
58 for (int i = 0; i < loops; i++) { 58 for (int i = 0; i < loops; i++) {
59 canvas->drawBitmap(fCheckerboard, kX, kY, &paint); 59 canvas->drawBitmap(fCheckerboard, kX, kY, &paint);
60 } 60 }
61 } 61 }
62 62
63 private: 63 private:
64 void make_checkerboard() { 64 void make_checkerboard() {
65 const int w = fIsSmall ? FILTER_WIDTH_SMALL : FILTER_WIDTH_LARGE; 65 const int w = fIsSmall ? FILTER_WIDTH_SMALL : FILTER_WIDTH_LARGE;
66 const int h = fIsSmall ? FILTER_HEIGHT_LARGE : FILTER_HEIGHT_LARGE; 66 const int h = fIsSmall ? FILTER_HEIGHT_LARGE : FILTER_HEIGHT_LARGE;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 DEF_BENCH(return new BlurImageFilterBench(0, BLUR_SIGMA_LARGE, false, true);) 111 DEF_BENCH(return new BlurImageFilterBench(0, BLUR_SIGMA_LARGE, false, true);)
112 DEF_BENCH(return new BlurImageFilterBench(0, BLUR_SIGMA_SMALL, false, true);) 112 DEF_BENCH(return new BlurImageFilterBench(0, BLUR_SIGMA_SMALL, false, true);)
113 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_MINI, BLUR_SIGMA_MINI, true , true);) 113 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_MINI, BLUR_SIGMA_MINI, true , true);)
114 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_MINI, BLUR_SIGMA_MINI, fals e, true);) 114 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_MINI, BLUR_SIGMA_MINI, fals e, true);)
115 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_SMALL, BLUR_SIGMA_SMALL, tr ue, true);) 115 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_SMALL, BLUR_SIGMA_SMALL, tr ue, true);)
116 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_SMALL, BLUR_SIGMA_SMALL, fa lse, true);) 116 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_SMALL, BLUR_SIGMA_SMALL, fa lse, true);)
117 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_LARGE, BLUR_SIGMA_LARGE, tr ue, true);) 117 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_LARGE, BLUR_SIGMA_LARGE, tr ue, true);)
118 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_LARGE, BLUR_SIGMA_LARGE, fa lse, true);) 118 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_LARGE, BLUR_SIGMA_LARGE, fa lse, true);)
119 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_HUGE, BLUR_SIGMA_HUGE, true , true);) 119 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_HUGE, BLUR_SIGMA_HUGE, true , true);)
120 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_HUGE, BLUR_SIGMA_HUGE, fals e, true);) 120 DEF_BENCH(return new BlurImageFilterBench(BLUR_SIGMA_HUGE, BLUR_SIGMA_HUGE, fals e, true);)
OLDNEW
« no previous file with comments | « bench/BitmapBench.cpp ('k') | bench/BlurRectBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698