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

Side by Side Diff: bench/BlurImageFilterBench.cpp

Issue 1379853003: Fix for nexus 5 crashing in GL benches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 2 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/BitmapScaleBench.cpp ('k') | bench/CodecBench.h » ('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 17 matching lines...) Expand all
28 fIsSmall(small), fIsCropped(cropped), fInitialized(false), fSigmaX(sigma X), fSigmaY(sigmaY) { 28 fIsSmall(small), fIsCropped(cropped), fInitialized(false), fSigmaX(sigma X), fSigmaY(sigmaY) {
29 fName.printf("blur_image_filter_%s%s_%.2f_%.2f", fIsSmall ? "small" : "l arge", 29 fName.printf("blur_image_filter_%s%s_%.2f_%.2f", fIsSmall ? "small" : "l arge",
30 fIsCropped ? "_cropped" : "", SkScalarToFloat(sigmaX), SkScalarToFlo at(sigmaY)); 30 fIsCropped ? "_cropped" : "", SkScalarToFloat(sigmaX), SkScalarToFlo at(sigmaY));
31 } 31 }
32 32
33 protected: 33 protected:
34 const char* onGetName() override { 34 const char* onGetName() override {
35 return fName.c_str(); 35 return fName.c_str();
36 } 36 }
37 37
38 void onPreDraw() override { 38 void onDelayedSetup() override {
39 if (!fInitialized) { 39 if (!fInitialized) {
40 make_checkerboard(); 40 make_checkerboard();
41 fInitialized = true; 41 fInitialized = true;
42 } 42 }
43 } 43 }
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;
(...skipping 62 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/BitmapScaleBench.cpp ('k') | bench/CodecBench.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698