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

Side by Side Diff: dm/DM.cpp

Issue 1100773003: DM: failure to canary a sink is now fatal. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | tools/flags/SkCommonFlags.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 * 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
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
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
OLDNEW
« no previous file with comments | « no previous file | tools/flags/SkCommonFlags.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698