| OLD | NEW |
| 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 /* | 8 /* |
| 9 * Code for the "gm" (Golden Master) rendering comparison tool. | 9 * Code for the "gm" (Golden Master) rendering comparison tool. |
| 10 * | 10 * |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "SkOSFile.h" | 32 #include "SkOSFile.h" |
| 33 #include "SkPDFRasterizer.h" | 33 #include "SkPDFRasterizer.h" |
| 34 #include "SkPicture.h" | 34 #include "SkPicture.h" |
| 35 #include "SkRefCnt.h" | 35 #include "SkRefCnt.h" |
| 36 #include "SkStream.h" | 36 #include "SkStream.h" |
| 37 #include "SkTArray.h" | 37 #include "SkTArray.h" |
| 38 #include "SkTDict.h" | 38 #include "SkTDict.h" |
| 39 #include "SkTileGridPicture.h" | 39 #include "SkTileGridPicture.h" |
| 40 #include "SamplePipeControllers.h" | 40 #include "SamplePipeControllers.h" |
| 41 | 41 |
| 42 #ifdef SK_DEBUG |
| 43 static const bool kDebugOnly = true; |
| 44 #else |
| 45 static const bool kDebugOnly = false; |
| 46 #endif |
| 47 |
| 42 __SK_FORCE_IMAGE_DECODER_LINKING; | 48 __SK_FORCE_IMAGE_DECODER_LINKING; |
| 43 | 49 |
| 44 #ifdef SK_BUILD_FOR_WIN | 50 #ifdef SK_BUILD_FOR_WIN |
| 45 // json includes xlocale which generates warning 4530 because we're compilin
g without | 51 // json includes xlocale which generates warning 4530 because we're compilin
g without |
| 46 // exceptions; see https://code.google.com/p/skia/issues/detail?id=1067 | 52 // exceptions; see https://code.google.com/p/skia/issues/detail?id=1067 |
| 47 #pragma warning(push) | 53 #pragma warning(push) |
| 48 #pragma warning(disable : 4530) | 54 #pragma warning(disable : 4530) |
| 49 #endif | 55 #endif |
| 50 #include "json/value.h" | 56 #include "json/value.h" |
| 51 #ifdef SK_BUILD_FOR_WIN | 57 #ifdef SK_BUILD_FOR_WIN |
| (...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1242 #if 0 // stop testing this (for now at least) since we want to remove support
for it (soon please!!!) | 1248 #if 0 // stop testing this (for now at least) since we want to remove support
for it (soon please!!!) |
| 1243 { SkBitmap::kARGB_4444_Config, kRaster_Backend, kDontCare_GLContextType,
0, kRW_ConfigFlag, "4444", true }, | 1249 { SkBitmap::kARGB_4444_Config, kRaster_Backend, kDontCare_GLContextType,
0, kRW_ConfigFlag, "4444", true }, |
| 1244 #endif | 1250 #endif |
| 1245 { SkBitmap::kRGB_565_Config, kRaster_Backend, kDontCare_GLContextType,
0, kRW_ConfigFlag, "565", true }, | 1251 { SkBitmap::kRGB_565_Config, kRaster_Backend, kDontCare_GLContextType,
0, kRW_ConfigFlag, "565", true }, |
| 1246 #if SK_SUPPORT_GPU | 1252 #if SK_SUPPORT_GPU |
| 1247 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kNative_GL
ContextType, 0, kRW_ConfigFlag, "gpu", true }, | 1253 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kNative_GL
ContextType, 0, kRW_ConfigFlag, "gpu", true }, |
| 1248 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kNative_GL
ContextType, 16, kRW_ConfigFlag, "msaa16", false}, | 1254 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kNative_GL
ContextType, 16, kRW_ConfigFlag, "msaa16", false}, |
| 1249 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kNative_GL
ContextType, 4, kRW_ConfigFlag, "msaa4", false}, | 1255 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kNative_GL
ContextType, 4, kRW_ConfigFlag, "msaa4", false}, |
| 1250 /* The gpudebug context does not generate meaningful images, so don't record | 1256 /* The gpudebug context does not generate meaningful images, so don't record |
| 1251 * the images it generates! We only run it to look for asserts. */ | 1257 * the images it generates! We only run it to look for asserts. */ |
| 1252 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kDebug_GLC
ontextType, 0, kNone_ConfigFlag, "gpudebug", GR_DEBUG}, | 1258 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kDebug_GLC
ontextType, 0, kNone_ConfigFlag, "gpudebug", kDebugOnly}, |
| 1253 /* The gpunull context does the least amount of work possible and doesn't | 1259 /* The gpunull context does the least amount of work possible and doesn't |
| 1254 generate meaninful images, so don't record them!. It can be run to | 1260 generate meaninful images, so don't record them!. It can be run to |
| 1255 isolate the CPU-side processing expense from the GPU-side. | 1261 isolate the CPU-side processing expense from the GPU-side. |
| 1256 */ | 1262 */ |
| 1257 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kNull_GLCo
ntextType, 0, kNone_ConfigFlag, "gpunull", GR_DEBUG}, | 1263 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kNull_GLCo
ntextType, 0, kNone_ConfigFlag, "gpunull", kDebugOnly}, |
| 1258 #if SK_ANGLE | 1264 #if SK_ANGLE |
| 1259 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kANGLE_GLC
ontextType, 0, kRW_ConfigFlag, "angle", true }, | 1265 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kANGLE_GLC
ontextType, 0, kRW_ConfigFlag, "angle", true }, |
| 1260 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kANGLE_GLC
ontextType, 16, kRW_ConfigFlag, "anglemsaa16", true }, | 1266 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kANGLE_GLC
ontextType, 16, kRW_ConfigFlag, "anglemsaa16", true }, |
| 1261 #endif // SK_ANGLE | 1267 #endif // SK_ANGLE |
| 1262 #ifdef SK_MESA | 1268 #ifdef SK_MESA |
| 1263 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kMESA_GLCo
ntextType, 0, kRW_ConfigFlag, "mesa", true }, | 1269 { SkBitmap::kARGB_8888_Config, kGPU_Backend, GrContextFactory::kMESA_GLCo
ntextType, 0, kRW_ConfigFlag, "mesa", true }, |
| 1264 #endif // SK_MESA | 1270 #endif // SK_MESA |
| 1265 #endif // SK_SUPPORT_GPU | 1271 #endif // SK_SUPPORT_GPU |
| 1266 #ifdef SK_SUPPORT_XPS | 1272 #ifdef SK_SUPPORT_XPS |
| 1267 /* At present we have no way of comparing XPS files (either natively or by c
onverting to PNG). */ | 1273 /* At present we have no way of comparing XPS files (either natively or by c
onverting to PNG). */ |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2299 if (FLAGS_forceBWtext) { | 2305 if (FLAGS_forceBWtext) { |
| 2300 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); | 2306 canvas->setDrawFilter(SkNEW(BWTextDrawFilter))->unref(); |
| 2301 } | 2307 } |
| 2302 } | 2308 } |
| 2303 | 2309 |
| 2304 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 2310 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 2305 int main(int argc, char * const argv[]) { | 2311 int main(int argc, char * const argv[]) { |
| 2306 return tool_main(argc, (char**) argv); | 2312 return tool_main(argc, (char**) argv); |
| 2307 } | 2313 } |
| 2308 #endif | 2314 #endif |
| OLD | NEW |