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

Side by Side Diff: bench/benchmain.cpp

Issue 23137022: Replace uses of GR_DEBUG by SK_DEBUG. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: not GR_RELEASE Created 7 years, 3 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 | gm/gmmain.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "BenchTimer.h" 10 #include "BenchTimer.h"
(...skipping 24 matching lines...) Expand all
35 #include "TimerData.h" 35 #include "TimerData.h"
36 36
37 enum benchModes { 37 enum benchModes {
38 kNormal_benchModes, 38 kNormal_benchModes,
39 kDeferred_benchModes, 39 kDeferred_benchModes,
40 kDeferredSilent_benchModes, 40 kDeferredSilent_benchModes,
41 kRecord_benchModes, 41 kRecord_benchModes,
42 kPictureRecord_benchModes 42 kPictureRecord_benchModes
43 }; 43 };
44 44
45 #ifdef SK_DEBUG
46 static const bool kDebugOnly = true;
47 #else
48 static const bool kDebugOnly = false;
49 #endif
50
45 /////////////////////////////////////////////////////////////////////////////// 51 ///////////////////////////////////////////////////////////////////////////////
46 52
47 static void erase(SkBitmap& bm) { 53 static void erase(SkBitmap& bm) {
48 if (bm.config() == SkBitmap::kA8_Config) { 54 if (bm.config() == SkBitmap::kA8_Config) {
49 bm.eraseColor(SK_ColorTRANSPARENT); 55 bm.eraseColor(SK_ColorTRANSPARENT);
50 } else { 56 } else {
51 bm.eraseColor(SK_ColorWHITE); 57 bm.eraseColor(SK_ColorWHITE);
52 } 58 }
53 } 59 }
54 60
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 { SkBitmap::kNo_Config, "NONRENDERING", 0, kNonRendering_Backend, kD ontCareGLCtxType, true }, 254 { SkBitmap::kNo_Config, "NONRENDERING", 0, kNonRendering_Backend, kD ontCareGLCtxType, true },
249 { SkBitmap::kARGB_8888_Config, "8888", 0, kRaster_Backend, kD ontCareGLCtxType, true }, 255 { SkBitmap::kARGB_8888_Config, "8888", 0, kRaster_Backend, kD ontCareGLCtxType, true },
250 { SkBitmap::kRGB_565_Config, "565", 0, kRaster_Backend, kD ontCareGLCtxType, true }, 256 { SkBitmap::kRGB_565_Config, "565", 0, kRaster_Backend, kD ontCareGLCtxType, true },
251 #if SK_SUPPORT_GPU 257 #if SK_SUPPORT_GPU
252 { SkBitmap::kARGB_8888_Config, "GPU", 0, kGPU_Backend, Gr ContextFactory::kNative_GLContextType, true }, 258 { SkBitmap::kARGB_8888_Config, "GPU", 0, kGPU_Backend, Gr ContextFactory::kNative_GLContextType, true },
253 { SkBitmap::kARGB_8888_Config, "MSAA4", 4, kGPU_Backend, Gr ContextFactory::kNative_GLContextType, false }, 259 { SkBitmap::kARGB_8888_Config, "MSAA4", 4, kGPU_Backend, Gr ContextFactory::kNative_GLContextType, false },
254 { SkBitmap::kARGB_8888_Config, "MSAA16", 16, kGPU_Backend, Gr ContextFactory::kNative_GLContextType, false }, 260 { SkBitmap::kARGB_8888_Config, "MSAA16", 16, kGPU_Backend, Gr ContextFactory::kNative_GLContextType, false },
255 #if SK_ANGLE 261 #if SK_ANGLE
256 { SkBitmap::kARGB_8888_Config, "ANGLE", 0, kGPU_Backend, Gr ContextFactory::kANGLE_GLContextType, true }, 262 { SkBitmap::kARGB_8888_Config, "ANGLE", 0, kGPU_Backend, Gr ContextFactory::kANGLE_GLContextType, true },
257 #endif // SK_ANGLE 263 #endif // SK_ANGLE
258 #ifdef SK_DEBUG 264 { SkBitmap::kARGB_8888_Config, "Debug", 0, kGPU_Backend, Gr ContextFactory::kDebug_GLContextType, kDebugOnly },
259 { SkBitmap::kARGB_8888_Config, "Debug", 0, kGPU_Backend, Gr ContextFactory::kDebug_GLContextType, GR_DEBUG },
260 #endif // SK_DEBUG
261 { SkBitmap::kARGB_8888_Config, "NULLGPU", 0, kGPU_Backend, Gr ContextFactory::kNull_GLContextType, true }, 265 { SkBitmap::kARGB_8888_Config, "NULLGPU", 0, kGPU_Backend, Gr ContextFactory::kNull_GLContextType, true },
262 #endif // SK_SUPPORT_GPU 266 #endif // SK_SUPPORT_GPU
263 }; 267 };
264 268
265 static int findConfig(const char config[]) { 269 static int findConfig(const char config[]) {
266 for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) { 270 for (size_t i = 0; i < SK_ARRAY_COUNT(gConfigs); i++) {
267 if (!strcmp(config, gConfigs[i].fName)) { 271 if (!strcmp(config, gConfigs[i].fName)) {
268 return i; 272 return i;
269 } 273 }
270 } 274 }
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 } 970 }
967 971
968 return 0; 972 return 0;
969 } 973 }
970 974
971 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 975 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
972 int main(int argc, char * const argv[]) { 976 int main(int argc, char * const argv[]) {
973 return tool_main(argc, (char**) argv); 977 return tool_main(argc, (char**) argv);
974 } 978 }
975 #endif 979 #endif
OLDNEW
« no previous file with comments | « no previous file | gm/gmmain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698