OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "CrashHandler.h" | 8 #include "CrashHandler.h" |
9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 #else | 381 #else |
382 return false; | 382 return false; |
383 #endif | 383 #endif |
384 } | 384 } |
385 | 385 |
386 static Sink* create_sink(const char* tag) { | 386 static Sink* create_sink(const char* tag) { |
387 #define SINK(t, sink, ...) if (0 == strcmp(t, tag)) { return new sink(__VA_ARGS_
_); } | 387 #define SINK(t, sink, ...) if (0 == strcmp(t, tag)) { return new sink(__VA_ARGS_
_); } |
388 if (gpu_supported()) { | 388 if (gpu_supported()) { |
389 typedef GrContextFactory Gr; | 389 typedef GrContextFactory Gr; |
390 const GrGLStandard api = get_gpu_api(); | 390 const GrGLStandard api = get_gpu_api(); |
391 SINK("gpunull", GPUSink, Gr::kNull_GLContextType, api, 0, false, F
LAGS_gpu_threading); | 391 SINK("gpunull", GPUSink, Gr::kNull_GLContextType, api, 0
, false, FLAGS_gpu_threading); |
392 SINK("gpudebug", GPUSink, Gr::kDebug_GLContextType, api, 0, false, F
LAGS_gpu_threading); | 392 SINK("gpudebug", GPUSink, Gr::kDebug_GLContextType, api, 0
, false, FLAGS_gpu_threading); |
393 SINK("gpu", GPUSink, Gr::kNative_GLContextType, api, 0, false, F
LAGS_gpu_threading); | 393 SINK("gpu", GPUSink, Gr::kNative_GLContextType, api, 0
, false, FLAGS_gpu_threading); |
394 SINK("gpudft", GPUSink, Gr::kNative_GLContextType, api, 0, true, F
LAGS_gpu_threading); | 394 SINK("gpudft", GPUSink, Gr::kNative_GLContextType, api, 0
, true, FLAGS_gpu_threading); |
395 SINK("msaa4", GPUSink, Gr::kNative_GLContextType, api, 4, false, F
LAGS_gpu_threading); | 395 SINK("msaa4", GPUSink, Gr::kNative_GLContextType, api, 4
, false, FLAGS_gpu_threading); |
396 SINK("msaa16", GPUSink, Gr::kNative_GLContextType, api, 16, false, F
LAGS_gpu_threading); | 396 SINK("msaa16", GPUSink, Gr::kNative_GLContextType, api, 16
, false, FLAGS_gpu_threading); |
397 SINK("nvprmsaa4", GPUSink, Gr::kNVPR_GLContextType, api, 4, false, F
LAGS_gpu_threading); | 397 SINK("nvprmsaa4", GPUSink, Gr::kNVPR_GLContextType, api, 4
, false, FLAGS_gpu_threading); |
398 SINK("nvprmsaa16", GPUSink, Gr::kNVPR_GLContextType, api, 16, false, F
LAGS_gpu_threading); | 398 SINK("nvprmsaa16", GPUSink, Gr::kNVPR_GLContextType, api, 16
, false, FLAGS_gpu_threading); |
399 #if SK_ANGLE | 399 #if SK_ANGLE |
400 SINK("angle", GPUSink, Gr::kANGLE_GLContextType, api, 0, false, F
LAGS_gpu_threading); | 400 SINK("angle", GPUSink, Gr::kANGLE_GLContextType, api, 0
, false, FLAGS_gpu_threading); |
| 401 #endif |
| 402 #if SK_COMMAND_BUFFER |
| 403 SINK("commandbuffer", GPUSink, Gr::kCommandBuffer_GLContextType, api, 0
, false, FLAGS_gpu_threading); |
401 #endif | 404 #endif |
402 #if SK_MESA | 405 #if SK_MESA |
403 SINK("mesa", GPUSink, Gr::kMESA_GLContextType, api, 0, false, F
LAGS_gpu_threading); | 406 SINK("mesa", GPUSink, Gr::kMESA_GLContextType, api, 0
, false, FLAGS_gpu_threading); |
404 #endif | 407 #endif |
405 } | 408 } |
406 | 409 |
407 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 410 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
408 SINK("hwui", HWUISink); | 411 SINK("hwui", HWUISink); |
409 #endif | 412 #endif |
410 | 413 |
411 if (FLAGS_cpu) { | 414 if (FLAGS_cpu) { |
412 SINK("565", RasterSink, kRGB_565_SkColorType); | 415 SINK("565", RasterSink, kRGB_565_SkColorType); |
413 SINK("8888", RasterSink, kN32_SkColorType); | 416 SINK("8888", RasterSink, kN32_SkColorType); |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 } | 913 } |
911 return 0; | 914 return 0; |
912 } | 915 } |
913 | 916 |
914 #if !defined(SK_BUILD_FOR_IOS) | 917 #if !defined(SK_BUILD_FOR_IOS) |
915 int main(int argc, char** argv) { | 918 int main(int argc, char** argv) { |
916 SkCommandLineFlags::Parse(argc, argv); | 919 SkCommandLineFlags::Parse(argc, argv); |
917 return dm_main(); | 920 return dm_main(); |
918 } | 921 } |
919 #endif | 922 #endif |
OLD | NEW |