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

Side by Side Diff: bench/MatrixConvolutionBench.cpp

Issue 1535353002: change all factories to return their base-class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 | « no previous file | gm/circles.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 2012 Google Inc. 2 * Copyright 2012 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 #include "Benchmark.h" 7 #include "Benchmark.h"
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkMatrixConvolutionImageFilter.h" 9 #include "SkMatrixConvolutionImageFilter.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 for (int i = 0; i < loops; i++) { 43 for (int i = 0; i < loops; i++) {
44 SkRect r = SkRect::MakeWH(rand.nextUScalar1() * 400, 44 SkRect r = SkRect::MakeWH(rand.nextUScalar1() * 400,
45 rand.nextUScalar1() * 400); 45 rand.nextUScalar1() * 400);
46 paint.setImageFilter(fFilter); 46 paint.setImageFilter(fFilter);
47 canvas->drawOval(r, paint); 47 canvas->drawOval(r, paint);
48 } 48 }
49 } 49 }
50 50
51 private: 51 private:
52 typedef Benchmark INHERITED; 52 typedef Benchmark INHERITED;
53 SkMatrixConvolutionImageFilter* fFilter; 53 SkImageFilter* fFilter;
54 SkString fName; 54 SkString fName;
55 }; 55 };
56 56
57 DEF_BENCH( return new MatrixConvolutionBench(SkMatrixConvolutionImageFilter::kCl amp_TileMode, true); ) 57 DEF_BENCH( return new MatrixConvolutionBench(SkMatrixConvolutionImageFilter::kCl amp_TileMode, true); )
58 DEF_BENCH( return new MatrixConvolutionBench(SkMatrixConvolutionImageFilter::kRe peat_TileMode, true); ) 58 DEF_BENCH( return new MatrixConvolutionBench(SkMatrixConvolutionImageFilter::kRe peat_TileMode, true); )
59 DEF_BENCH( return new MatrixConvolutionBench(SkMatrixConvolutionImageFilter::kCl ampToBlack_TileMode, true); ) 59 DEF_BENCH( return new MatrixConvolutionBench(SkMatrixConvolutionImageFilter::kCl ampToBlack_TileMode, true); )
60 DEF_BENCH( return new MatrixConvolutionBench(SkMatrixConvolutionImageFilter::kCl ampToBlack_TileMode, false); ) 60 DEF_BENCH( return new MatrixConvolutionBench(SkMatrixConvolutionImageFilter::kCl ampToBlack_TileMode, false); )
OLDNEW
« no previous file with comments | « no previous file | gm/circles.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698