Flutter Engine
The Flutter Engine
Static Public Member Functions | List of all members
CompareDiffMeanMismatches Class Reference

#include <skdiff.h>

Static Public Member Functions

static int comparePixels (const DiffRecord *lhs, const DiffRecord *rhs)
 

Detailed Description

Comparison routine for qsort; sorts by max(fAverageMismatch{RGB}) from largest to smallest.

Definition at line 212 of file skdiff.h.

Member Function Documentation

◆ comparePixels()

static int CompareDiffMeanMismatches::comparePixels ( const DiffRecord lhs,
const DiffRecord rhs 
)
inlinestatic

Definition at line 214 of file skdiff.h.

214 {
215 float leftValue = MAX3(lhs->fAverageMismatchR,
217 lhs->fAverageMismatchB);
218 float rightValue = MAX3(rhs->fAverageMismatchR,
220 rhs->fAverageMismatchB);
221 if (leftValue < rightValue) {
222 return 1;
223 }
224 if (rightValue < leftValue) {
225 return -1;
226 }
227 return 0;
228 }
#define MAX3(a, b, c)
Definition: skdiff.h:26
float fAverageMismatchG
Definition: skdiff.h:143
float fAverageMismatchB
Definition: skdiff.h:144
float fAverageMismatchR
Definition: skdiff.h:142

The documentation for this class was generated from the following file: