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

Side by Side Diff: bench/benchmain.cpp

Issue 145943003: Add NVPR configs to bench (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: make 16 config non-default Created 6 years, 11 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 | Annotate | Revision Log
« 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 2011 Google Inc. 2 * Copyright 2011 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 "BenchTimer.h" 8 #include "BenchTimer.h"
9 #include "ResultsWriter.h" 9 #include "ResultsWriter.h"
10 #include "SkBenchLogger.h" 10 #include "SkBenchLogger.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 default: 190 default:
191 SkDEBUGFAIL("unsupported"); 191 SkDEBUGFAIL("unsupported");
192 } 192 }
193 return device; 193 return device;
194 } 194 }
195 195
196 #if SK_SUPPORT_GPU 196 #if SK_SUPPORT_GPU
197 GrContextFactory gContextFactory; 197 GrContextFactory gContextFactory;
198 typedef GrContextFactory::GLContextType GLContextType; 198 typedef GrContextFactory::GLContextType GLContextType;
199 static const GLContextType kNative = GrContextFactory::kNative_GLContextType; 199 static const GLContextType kNative = GrContextFactory::kNative_GLContextType;
200 static const GLContextType kNVPR = GrContextFactory::kNVPR_GLContextType;
200 #if SK_ANGLE 201 #if SK_ANGLE
201 static const GLContextType kANGLE = GrContextFactory::kANGLE_GLContextType; 202 static const GLContextType kANGLE = GrContextFactory::kANGLE_GLContextType;
202 #endif 203 #endif
203 static const GLContextType kDebug = GrContextFactory::kDebug_GLContextType; 204 static const GLContextType kDebug = GrContextFactory::kDebug_GLContextType;
204 static const GLContextType kNull = GrContextFactory::kNull_GLContextType; 205 static const GLContextType kNull = GrContextFactory::kNull_GLContextType;
205 #else 206 #else
206 typedef int GLContextType; 207 typedef int GLContextType;
207 static const GLContextType kNative = 0, kANGLE = 0, kDebug = 0, kNull = 0; 208 static const GLContextType kNative = 0, kANGLE = 0, kDebug = 0, kNull = 0;
208 #endif 209 #endif
209 210
(...skipping 11 matching lines...) Expand all
221 GLContextType contextType; 222 GLContextType contextType;
222 bool runByDefault; 223 bool runByDefault;
223 } gConfigs[] = { 224 } gConfigs[] = {
224 { SkBitmap::kNo_Config, "NONRENDERING", 0, SkBenchmark::kNonRendering _Backend, kNative, true}, 225 { SkBitmap::kNo_Config, "NONRENDERING", 0, SkBenchmark::kNonRendering _Backend, kNative, true},
225 { SkBitmap::kARGB_8888_Config, "8888", 0, SkBenchmark::kRaster_Backe nd, kNative, true}, 226 { SkBitmap::kARGB_8888_Config, "8888", 0, SkBenchmark::kRaster_Backe nd, kNative, true},
226 { SkBitmap::kRGB_565_Config, "565", 0, SkBenchmark::kRaster_Backe nd, kNative, true}, 227 { SkBitmap::kRGB_565_Config, "565", 0, SkBenchmark::kRaster_Backe nd, kNative, true},
227 #if SK_SUPPORT_GPU 228 #if SK_SUPPORT_GPU
228 { SkBitmap::kARGB_8888_Config, "GPU", 0, SkBenchmark::kGPU_Backend, kNative, true}, 229 { SkBitmap::kARGB_8888_Config, "GPU", 0, SkBenchmark::kGPU_Backend, kNative, true},
229 { SkBitmap::kARGB_8888_Config, "MSAA4", 4, SkBenchmark::kGPU_Backend, kNative, false}, 230 { SkBitmap::kARGB_8888_Config, "MSAA4", 4, SkBenchmark::kGPU_Backend, kNative, false},
230 { SkBitmap::kARGB_8888_Config, "MSAA16", 16, SkBenchmark::kGPU_Backend, kNative, false}, 231 { SkBitmap::kARGB_8888_Config, "MSAA16", 16, SkBenchmark::kGPU_Backend, kNative, false},
232 { SkBitmap::kARGB_8888_Config, "NVPRMSAA4", 4, SkBenchmark::kGPU_Backend, kNVPR, true},
233 { SkBitmap::kARGB_8888_Config, "NVPRMSAA16", 16, SkBenchmark::kGPU_Backend, kNVPR, false},
231 #if SK_ANGLE 234 #if SK_ANGLE
232 { SkBitmap::kARGB_8888_Config, "ANGLE", 0, SkBenchmark::kGPU_Backend, kANGLE, true}, 235 { SkBitmap::kARGB_8888_Config, "ANGLE", 0, SkBenchmark::kGPU_Backend, kANGLE, true},
233 #endif // SK_ANGLE 236 #endif // SK_ANGLE
234 { SkBitmap::kARGB_8888_Config, "Debug", 0, SkBenchmark::kGPU_Backend, kDebug, kIsDebug}, 237 { SkBitmap::kARGB_8888_Config, "Debug", 0, SkBenchmark::kGPU_Backend, kDebug, kIsDebug},
235 { SkBitmap::kARGB_8888_Config, "NULLGPU", 0, SkBenchmark::kGPU_Backend, kNull, true}, 238 { SkBitmap::kARGB_8888_Config, "NULLGPU", 0, SkBenchmark::kGPU_Backend, kNull, true},
236 #endif // SK_SUPPORT_GPU 239 #endif // SK_SUPPORT_GPU
237 }; 240 };
238 241
239 DEFINE_string(outDir, "", "If given, image of each bench will be put in outDir." ); 242 DEFINE_string(outDir, "", "If given, image of each bench will be put in outDir." );
240 DEFINE_string(timers, "cg", "Timers to display. " 243 DEFINE_string(timers, "cg", "Timers to display. "
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 gContextFactory.destroyContexts(); 690 gContextFactory.destroyContexts();
688 #endif 691 #endif
689 return 0; 692 return 0;
690 } 693 }
691 694
692 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 695 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
693 int main(int argc, char * const argv[]) { 696 int main(int argc, char * const argv[]) {
694 return tool_main(argc, (char**) argv); 697 return tool_main(argc, (char**) argv);
695 } 698 }
696 #endif 699 #endif
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