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

Side by Side Diff: bench/ETCBitmapBench.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/DrawBitmapAABench.cpp ('k') | bench/FSRectBench.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 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } else { 137 } else {
138 SkASSERT(kRaster_Backend == this->fBackend); 138 SkASSERT(kRaster_Backend == this->fBackend);
139 if (this->fDecompress) { 139 if (this->fDecompress) {
140 return "etc1bitmap_render_raster_decompressed"; 140 return "etc1bitmap_render_raster_decompressed";
141 } else { 141 } else {
142 return "etc1bitmap_render_raster_compressed"; 142 return "etc1bitmap_render_raster_compressed";
143 } 143 }
144 } 144 }
145 } 145 }
146 146
147 void onPreDraw() override { 147 void onDelayedSetup() override {
148 if (nullptr == fPKMData) { 148 if (nullptr == fPKMData) {
149 SkDebugf("Failed to load PKM data!\n"); 149 SkDebugf("Failed to load PKM data!\n");
150 return; 150 return;
151 } 151 }
152 152
153 if (fDecompress) { 153 if (fDecompress) {
154 SkAutoTDelete<SkImageGenerator> gen(SkImageGenerator::NewFromEncoded (fPKMData)); 154 SkAutoTDelete<SkImageGenerator> gen(SkImageGenerator::NewFromEncoded (fPKMData));
155 gen->generateBitmap(&fBitmap); 155 gen->generateBitmap(&fBitmap);
156 } else { 156 } else {
157 fImage.reset(SkImage::NewFromEncoded(fPKMData)); 157 fImage.reset(SkImage::NewFromEncoded(fPKMData));
(...skipping 68 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 | « bench/DrawBitmapAABench.cpp ('k') | bench/FSRectBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698