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

Side by Side Diff: bench/ETCBitmapBench.cpp

Issue 1540923003: Append '\n' character to nanobench error message (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 | no next file » | 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 2014 Google Inc. 2 * Copyright 2014 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 "Resources.h" 9 #include "Resources.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 // This is the base class for all of the benches in this file. In general 76 // This is the base class for all of the benches in this file. In general
77 // the ETC1 benches should all be working on the same data. Due to the 77 // the ETC1 benches should all be working on the same data. Due to the
78 // simplicity of the PKM file, that data is the 128x128 mandrill etc1 78 // simplicity of the PKM file, that data is the 128x128 mandrill etc1
79 // compressed texture repeated by some factor (currently 8 -> 1024x1024) 79 // compressed texture repeated by some factor (currently 8 -> 1024x1024)
80 class ETCBitmapBenchBase : public Benchmark { 80 class ETCBitmapBenchBase : public Benchmark {
81 public: 81 public:
82 ETCBitmapBenchBase() : fPKMData(loadPKM()) { 82 ETCBitmapBenchBase() : fPKMData(loadPKM()) {
83 if (nullptr == fPKMData) { 83 if (nullptr == fPKMData) {
84 SkDebugf("Could not load PKM data!"); 84 SkDebugf("Could not load PKM data!\n");
85 } 85 }
86 } 86 }
87 87
88 protected: 88 protected:
89 SkAutoDataUnref fPKMData; 89 SkAutoDataUnref fPKMData;
90 90
91 private: 91 private:
92 SkData* loadPKM() { 92 SkData* loadPKM() {
93 SkString pkmFilename = GetResourcePath("mandrill_128.pkm"); 93 SkString pkmFilename = GetResourcePath("mandrill_128.pkm");
94 // Expand the data 94 // Expand the data
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 DEF_BENCH(return new ETCBitmapBench(false, Benchmark::kGPU_Backend);) 226 DEF_BENCH(return new ETCBitmapBench(false, Benchmark::kGPU_Backend);)
227 DEF_BENCH(return new ETCBitmapBench(true, Benchmark::kGPU_Backend);) 227 DEF_BENCH(return new ETCBitmapBench(true, Benchmark::kGPU_Backend);)
228 228
229 DEF_BENCH(return new ETCBitmapUploadBench(false, Benchmark::kRaster_Backend);) 229 DEF_BENCH(return new ETCBitmapUploadBench(false, Benchmark::kRaster_Backend);)
230 DEF_BENCH(return new ETCBitmapUploadBench(true, Benchmark::kRaster_Backend);) 230 DEF_BENCH(return new ETCBitmapUploadBench(true, Benchmark::kRaster_Backend);)
231 231
232 DEF_BENCH(return new ETCBitmapUploadBench(false, Benchmark::kGPU_Backend);) 232 DEF_BENCH(return new ETCBitmapUploadBench(false, Benchmark::kGPU_Backend);)
233 DEF_BENCH(return new ETCBitmapUploadBench(true, Benchmark::kGPU_Backend);) 233 DEF_BENCH(return new ETCBitmapUploadBench(true, Benchmark::kGPU_Backend);)
234 234
235 #endif // SK_IGNORE_ETC1_SUPPORT 235 #endif // SK_IGNORE_ETC1_SUPPORT
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698