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

Side by Side Diff: dm/DM.cpp

Issue 873723007: DM::NullSink (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: changes Created 5 years, 10 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 | dm/DMJsonWriter.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 #include "CrashHandler.h" 1 #include "CrashHandler.h"
2 #include "DMJsonWriter.h" 2 #include "DMJsonWriter.h"
3 #include "DMSrcSink.h" 3 #include "DMSrcSink.h"
4 #include "OverwriteLine.h" 4 #include "OverwriteLine.h"
5 #include "ProcStats.h" 5 #include "ProcStats.h"
6 #include "SkBBHFactory.h" 6 #include "SkBBHFactory.h"
7 #include "SkChecksum.h" 7 #include "SkChecksum.h"
8 #include "SkCommonFlags.h" 8 #include "SkCommonFlags.h"
9 #include "SkForceLinking.h" 9 #include "SkForceLinking.h"
10 #include "SkGraphics.h" 10 #include "SkGraphics.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 #if SK_MESA 214 #if SK_MESA
215 SINK("mesa", GPUSink, Gr::kMESA_GLContextType, api, 0, false, F LAGS_gpu_threading); 215 SINK("mesa", GPUSink, Gr::kMESA_GLContextType, api, 0, false, F LAGS_gpu_threading);
216 #endif 216 #endif
217 } 217 }
218 218
219 if (FLAGS_cpu) { 219 if (FLAGS_cpu) {
220 SINK("565", RasterSink, kRGB_565_SkColorType); 220 SINK("565", RasterSink, kRGB_565_SkColorType);
221 SINK("8888", RasterSink, kN32_SkColorType); 221 SINK("8888", RasterSink, kN32_SkColorType);
222 SINK("pdf", PDFSink); 222 SINK("pdf", PDFSink);
223 SINK("skp", SKPSink); 223 SINK("skp", SKPSink);
224 SINK("null", NullSink);
224 } 225 }
225 #undef SINK 226 #undef SINK
226 return NULL; 227 return NULL;
227 } 228 }
228 229
229 static Sink* create_via(const char* tag, Sink* wrapped) { 230 static Sink* create_via(const char* tag, Sink* wrapped) {
230 #define VIA(t, via, ...) if (0 == strcmp(t, tag)) { return new via(__VA_ARGS__); } 231 #define VIA(t, via, ...) if (0 == strcmp(t, tag)) { return new via(__VA_ARGS__); }
231 VIA("pipe", ViaPipe, wrapped); 232 VIA("pipe", ViaPipe, wrapped);
232 VIA("serialize", ViaSerialization, wrapped); 233 VIA("serialize", ViaSerialization, wrapped);
233 VIA("tiles", ViaTiles, 256, 256, NULL, wrapped); 234 VIA("tiles", ViaTiles, 256, 256, NULL, wrapped);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 task->sink.tag, 333 task->sink.tag,
333 task->src.tag, 334 task->src.tag,
334 name.c_str(), 335 name.c_str(),
335 FLAGS_readPath[0])); 336 FLAGS_readPath[0]));
336 } 337 }
337 338
338 if (!FLAGS_writePath.isEmpty()) { 339 if (!FLAGS_writePath.isEmpty()) {
339 const char* ext = task->sink->fileExtension(); 340 const char* ext = task->sink->fileExtension();
340 if (data->getLength()) { 341 if (data->getLength()) {
341 WriteToDisk(*task, md5, ext, data, data->getLength(), NULL); 342 WriteToDisk(*task, md5, ext, data, data->getLength(), NULL);
342 } else { 343 SkASSERT(bitmap.drawsNothing());
344 } else if (!bitmap.drawsNothing()) {
343 WriteToDisk(*task, md5, ext, NULL, 0, &bitmap); 345 WriteToDisk(*task, md5, ext, NULL, 0, &bitmap);
344 } 346 }
345 } 347 }
346 } 348 }
347 timer.end(); 349 timer.end();
348 if (!whyBlacklisted.isEmpty()) { 350 if (!whyBlacklisted.isEmpty()) {
349 name.appendf(" (--blacklist, %s)", whyBlacklisted.c_str()); 351 name.appendf(" (--blacklist, %s)", whyBlacklisted.c_str());
350 } 352 }
351 done(timer.fWall, task->sink.tag, task->src.tag, name); 353 done(timer.fWall, task->sink.tag, task->src.tag, name);
352 } 354 }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 } 544 }
543 return 0; 545 return 0;
544 } 546 }
545 547
546 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 548 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
547 int main(int argc, char** argv) { 549 int main(int argc, char** argv) {
548 SkCommandLineFlags::Parse(argc, argv); 550 SkCommandLineFlags::Parse(argc, argv);
549 return dm_main(); 551 return dm_main();
550 } 552 }
551 #endif 553 #endif
OLDNEW
« no previous file with comments | « no previous file | dm/DMJsonWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698