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

Side by Side Diff: bench/BitmapScaleBench.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/BitmapRegionDecoderBench.cpp ('k') | bench/BlurImageFilterBench.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 "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 SkIPoint onGetSize() override { 51 SkIPoint onGetSize() override {
52 return SkIPoint::Make( fOutputSize, fOutputSize ); 52 return SkIPoint::Make( fOutputSize, fOutputSize );
53 } 53 }
54 54
55 void setName(const char * name) { 55 void setName(const char * name) {
56 fName.printf( "bitmap_scale_%s_%d_%d", name, fInputSize, fOutputSize ); 56 fName.printf( "bitmap_scale_%s_%d_%d", name, fInputSize, fOutputSize );
57 } 57 }
58 58
59 void onPreDraw() override { 59 void onDelayedSetup() override {
60 fInputBitmap.allocN32Pixels(fInputSize, fInputSize, true); 60 fInputBitmap.allocN32Pixels(fInputSize, fInputSize, true);
61 fInputBitmap.eraseColor(SK_ColorWHITE); 61 fInputBitmap.eraseColor(SK_ColorWHITE);
62 62
63 fOutputBitmap.allocN32Pixels(fOutputSize, fOutputSize, true); 63 fOutputBitmap.allocN32Pixels(fOutputSize, fOutputSize, true);
64 64
65 fMatrix.setScale( scale(), scale() ); 65 fMatrix.setScale( scale(), scale() );
66 } 66 }
67 67
68 void onDraw(const int loops, SkCanvas*) override { 68 void onDraw(const int loops, SkCanvas*) override {
69 SkPaint paint; 69 SkPaint paint;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 DEF_BENCH(return new BitmapFilterScaleBench(10, 90);) 104 DEF_BENCH(return new BitmapFilterScaleBench(10, 90);)
105 DEF_BENCH(return new BitmapFilterScaleBench(30, 90);) 105 DEF_BENCH(return new BitmapFilterScaleBench(30, 90);)
106 DEF_BENCH(return new BitmapFilterScaleBench(80, 90);) 106 DEF_BENCH(return new BitmapFilterScaleBench(80, 90);)
107 DEF_BENCH(return new BitmapFilterScaleBench(90, 90);) 107 DEF_BENCH(return new BitmapFilterScaleBench(90, 90);)
108 DEF_BENCH(return new BitmapFilterScaleBench(90, 80);) 108 DEF_BENCH(return new BitmapFilterScaleBench(90, 80);)
109 DEF_BENCH(return new BitmapFilterScaleBench(90, 30);) 109 DEF_BENCH(return new BitmapFilterScaleBench(90, 30);)
110 DEF_BENCH(return new BitmapFilterScaleBench(90, 10);) 110 DEF_BENCH(return new BitmapFilterScaleBench(90, 10);)
111 DEF_BENCH(return new BitmapFilterScaleBench(256, 64);) 111 DEF_BENCH(return new BitmapFilterScaleBench(256, 64);)
112 DEF_BENCH(return new BitmapFilterScaleBench(64, 256);) 112 DEF_BENCH(return new BitmapFilterScaleBench(64, 256);)
OLDNEW
« no previous file with comments | « bench/BitmapRegionDecoderBench.cpp ('k') | bench/BlurImageFilterBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698