• Home
  • Raw
  • Download

Lines Matching full:dr

145     int dr = SkGetPackedR32(c0) - SkGetPackedR32(c1);  in colors_match_thresholded()  local
150 (SkAbs32(dr) <= threshold) && in colors_match_thresholded()
158 void compute_diff(DiffRecord* dr, DiffMetricProc diffFunction, const int colorThreshold) { in compute_diff() argument
159 const int w = dr->fComparison.fBitmap.width(); in compute_diff()
160 const int h = dr->fComparison.fBitmap.height(); in compute_diff()
161 if (w != dr->fBase.fBitmap.width() || h != dr->fBase.fBitmap.height()) { in compute_diff()
162 dr->fResult = DiffRecord::kDifferentSizes_Result; in compute_diff()
174 dr->fWeightedFraction = 0; in compute_diff()
177 SkPMColor c0 = *dr->fBase.fBitmap.getAddr32(x, y); in compute_diff()
178 SkPMColor c1 = *dr->fComparison.fBitmap.getAddr32(x, y); in compute_diff()
190 dr->fWeightedFraction += ((float) value) / 255; in compute_diff()
191 if (thisA > dr->fMaxMismatchA) { in compute_diff()
192 dr->fMaxMismatchA = thisA; in compute_diff()
194 if (thisR > dr->fMaxMismatchR) { in compute_diff()
195 dr->fMaxMismatchR = thisR; in compute_diff()
197 if (thisG > dr->fMaxMismatchG) { in compute_diff()
198 dr->fMaxMismatchG = thisG; in compute_diff()
200 if (thisB > dr->fMaxMismatchB) { in compute_diff()
201 dr->fMaxMismatchB = thisB; in compute_diff()
205 *dr->fDifference.fBitmap.getAddr32(x, y) = outputDifference; in compute_diff()
206 *dr->fWhite.fBitmap.getAddr32(x, y) = PMCOLOR_WHITE; in compute_diff()
208 *dr->fDifference.fBitmap.getAddr32(x, y) = 0; in compute_diff()
209 *dr->fWhite.fBitmap.getAddr32(x, y) = PMCOLOR_BLACK; in compute_diff()
214 dr->fResult = DiffRecord::kEqualPixels_Result; in compute_diff()
217 dr->fResult = DiffRecord::kDifferentPixels_Result; in compute_diff()
219 dr->fFractionDifference = ((float) mismatchedPixels) / pixelCount; in compute_diff()
220 dr->fWeightedFraction /= pixelCount; in compute_diff()
221 dr->fTotalMismatchA = totalMismatchA; in compute_diff()
222 dr->fAverageMismatchA = ((float) totalMismatchA) / pixelCount; in compute_diff()
223 dr->fAverageMismatchR = ((float) totalMismatchR) / pixelCount; in compute_diff()
224 dr->fAverageMismatchG = ((float) totalMismatchG) / pixelCount; in compute_diff()
225 dr->fAverageMismatchB = ((float) totalMismatchB) / pixelCount; in compute_diff()