Flutter Engine
The Flutter Engine
Static Public Member Functions | List of all members
CompareDiffMaxMismatches 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(fMaxMismatch{RGB}) from largest to smallest.

Definition at line 233 of file skdiff.h.

Member Function Documentation

◆ comparePixels()

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

Definition at line 235 of file skdiff.h.

235 {
236 uint32_t leftValue = MAX3(lhs->fMaxMismatchR,
237 lhs->fMaxMismatchG,
238 lhs->fMaxMismatchB);
239 uint32_t rightValue = MAX3(rhs->fMaxMismatchR,
240 rhs->fMaxMismatchG,
241 rhs->fMaxMismatchB);
242 if (leftValue < rightValue) {
243 return 1;
244 }
245 if (rightValue < leftValue) {
246 return -1;
247 }
248
250 }
static int comparePixels(const DiffRecord *lhs, const DiffRecord *rhs)
Definition: skdiff.h:214
#define MAX3(a, b, c)
Definition: skdiff.h:26
uint32_t fMaxMismatchB
Definition: skdiff.h:151
uint32_t fMaxMismatchR
Definition: skdiff.h:149
uint32_t fMaxMismatchG
Definition: skdiff.h:150

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