Lines Matching defs:drp
145 void add (DiffRecord* drp) {
148 if (drp->fBase.fFilename.equals(drp->fComparison.fFilename)) {
149 fResultsOfType[drp->fResult].push(new SkString(drp->fBase.fFilename));
152 blame->append(drp->fBase.fFilename);
154 blame->append(drp->fComparison.fFilename);
156 fResultsOfType[drp->fResult].push(blame);
158 switch (drp->fResult) {
170 if (drp->fFractionDifference * 100 > fMaxMismatchPercent) {
171 fMaxMismatchPercent = drp->fFractionDifference * 100;
173 mismatchValue = MAX3(drp->fMaxMismatchR, drp->fMaxMismatchG,
174 drp->fMaxMismatchB);
181 fStatusOfType[drp->fBase.fStatus][drp->fComparison.fStatus].push(
182 new SkString(drp->fBase.fFilename));
282 AutoReleasePixels(DiffRecord* drp)
283 : fDrp(drp) {
284 SkASSERT(drp != NULL);
309 static void get_bounds(DiffRecord& drp) {
310 get_bounds(drp.fBase, "base");
311 get_bounds(drp.fComparison, "comparison");
355 DiffRecord *drp = new DiffRecord;
360 drp->fResult = DiffRecord::kCouldNotCompare_Result;
365 drp->fBase.fFilename = *baseFiles[i];
366 drp->fBase.fFullPath = basePath;
367 drp->fBase.fStatus = DiffResource::kExists_Status;
369 drp->fComparison.fFilename = *baseFiles[i];
370 drp->fComparison.fFullPath = comparisonPath;
371 drp->fComparison.fStatus = DiffResource::kDoesNotExist_Status;
376 drp->fResult = DiffRecord::kCouldNotCompare_Result;
381 drp->fBase.fFilename = *comparisonFiles[j];
382 drp->fBase.fFullPath = basePath;
383 drp->fBase.fStatus = DiffResource::kDoesNotExist_Status;
385 drp->fComparison.fFilename = *comparisonFiles[j];
386 drp->fComparison.fFullPath = comparisonPath;
387 drp->fComparison.fStatus = DiffResource::kExists_Status;
392 SkASSERT(DiffRecord::kUnknown_Result == drp->fResult);
397 drp->fBase.fFilename = *baseFiles[i];
398 drp->fBase.fFullPath = basePath;
399 drp->fBase.fStatus = DiffResource::kExists_Status;
401 drp->fComparison.fFilename = *comparisonFiles[j];
402 drp->fComparison.fFullPath = comparisonPath;
403 drp->fComparison.fStatus = DiffResource::kExists_Status;
405 SkAutoDataUnref baseFileBits(read_file(drp->fBase.fFullPath.c_str()));
407 drp->fBase.fStatus = DiffResource::kRead_Status;
409 SkAutoDataUnref comparisonFileBits(read_file(drp->fComparison.fFullPath.c_str()));
411 drp->fComparison.fStatus = DiffResource::kRead_Status;
415 drp->fBase.fStatus = DiffResource::kCouldNotRead_Status;
418 drp->fComparison.fStatus = DiffResource::kCouldNotRead_Status;
420 drp->fResult = DiffRecord::kCouldNotCompare_Result;
423 drp->fResult = DiffRecord::kEqualBits_Result;
426 AutoReleasePixels arp(drp);
427 get_bitmap(baseFileBits, drp->fBase, SkImageDecoder::kDecodePixels_Mode);
428 drp->fComparison,
430 if (DiffResource::kDecoded_Status == drp->fBase.fStatus &&
431 DiffResource::kDecoded_Status == drp->fComparison.fStatus) {
432 create_and_write_diff_image(drp, dmp, colorThreshold,
433 outputDir, drp->fBase.fFilename);
435 drp->fResult = DiffRecord::kCouldNotCompare_Result;
444 get_bounds(*drp);
446 SkASSERT(DiffRecord::kUnknown_Result != drp->fResult);
447 differences->push(drp);
448 summary->add(drp);
453 DiffRecord *drp = new DiffRecord();
454 drp->fBase.fFilename = *baseFiles[i];
455 drp->fBase.fFullPath = baseDir;
456 drp->fBase.fFullPath.append(drp->fBase.fFilename);
457 drp->fBase.fStatus = DiffResource::kExists_Status;
459 drp->fComparison.fFilename = *baseFiles[i];
460 drp->fComparison.fFullPath = comparisonDir;
461 drp->fComparison.fFullPath.append(drp->fComparison.fFilename);
462 drp->fComparison.fStatus = DiffResource::kDoesNotExist_Status;
464 drp->fResult = DiffRecord::kCouldNotCompare_Result;
466 get_bounds(*drp);
468 differences->push(drp);
469 summary->add(drp);
474 DiffRecord *drp = new DiffRecord();
475 drp->fBase.fFilename = *comparisonFiles[j];
476 drp->fBase.fFullPath = baseDir;
477 drp->fBase.fFullPath.append(drp->fBase.fFilename);
478 drp->fBase.fStatus = DiffResource::kDoesNotExist_Status;
480 drp->fComparison.fFilename = *comparisonFiles[j];
481 drp->fComparison.fFullPath = comparisonDir;
482 drp->fComparison.fFullPath.append(drp->fComparison.fFilename);
483 drp->fComparison.fStatus = DiffResource::kExists_Status;
485 drp->fResult = DiffRecord::kCouldNotCompare_Result;
487 get_bounds(*drp);
489 differences->push(drp);
490 summary->add(drp);