| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 Error draw(SkCanvas*) const override { return ""; } | 293 Error draw(SkCanvas*) const override { return ""; } |
| 294 SkISize size() const override { return SkISize::Make(16, 16); } | 294 SkISize size() const override { return SkISize::Make(16, 16); } |
| 295 Name name() const override { return "noop"; } | 295 Name name() const override { return "noop"; } |
| 296 } noop; | 296 } noop; |
| 297 | 297 |
| 298 SkBitmap bitmap; | 298 SkBitmap bitmap; |
| 299 SkDynamicMemoryWStream stream; | 299 SkDynamicMemoryWStream stream; |
| 300 SkString log; | 300 SkString log; |
| 301 Error err = sink->draw(noop, &bitmap, &stream, &log); | 301 Error err = sink->draw(noop, &bitmap, &stream, &log); |
| 302 if (err.isFatal()) { | 302 if (err.isFatal()) { |
| 303 SkDebugf("Skipping %s: %s\n", tag, err.c_str()); | 303 SkDebugf("Could not run %s: %s\n", tag, err.c_str()); |
| 304 return; | 304 exit(1); |
| 305 } | 305 } |
| 306 | 306 |
| 307 Tagged<Sink>& ts = gSinks.push_back(); | 307 Tagged<Sink>& ts = gSinks.push_back(); |
| 308 ts.reset(sink.detach()); | 308 ts.reset(sink.detach()); |
| 309 ts.tag = tag; | 309 ts.tag = tag; |
| 310 } | 310 } |
| 311 | 311 |
| 312 static bool gpu_supported() { | 312 static bool gpu_supported() { |
| 313 #if SK_SUPPORT_GPU | 313 #if SK_SUPPORT_GPU |
| 314 return FLAGS_gpu; | 314 return FLAGS_gpu; |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 } | 744 } |
| 745 return 0; | 745 return 0; |
| 746 } | 746 } |
| 747 | 747 |
| 748 #if !defined(SK_BUILD_FOR_IOS) | 748 #if !defined(SK_BUILD_FOR_IOS) |
| 749 int main(int argc, char** argv) { | 749 int main(int argc, char** argv) { |
| 750 SkCommandLineFlags::Parse(argc, argv); | 750 SkCommandLineFlags::Parse(argc, argv); |
| 751 return dm_main(); | 751 return dm_main(); |
| 752 } | 752 } |
| 753 #endif | 753 #endif |
| OLD | NEW |