Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
DiffRecord Struct Reference

#include <skdiff.h>

Public Types

enum  Result {
  kEqualBits_Result , kEqualPixels_Result , kDifferentPixels_Result , kDifferentSizes_Result ,
  kCouldNotCompare_Result , kUnknown_Result , kResultCount
}
 

Public Member Functions

 DiffRecord ()
 

Static Public Member Functions

static Result getResultByName (const char *name)
 
static const char * getResultDescription (Result result)
 

Public Attributes

DiffResource fBase
 
DiffResource fComparison
 
DiffResource fDifference
 
DiffResource fWhite
 
float fFractionDifference
 
float fWeightedFraction
 
float fAverageMismatchA
 
float fAverageMismatchR
 
float fAverageMismatchG
 
float fAverageMismatchB
 
uint32_t fTotalMismatchA
 
uint32_t fMaxMismatchA
 
uint32_t fMaxMismatchR
 
uint32_t fMaxMismatchG
 
uint32_t fMaxMismatchB
 
Result fResult
 Which category of diff result. More...
 

Static Public Attributes

static char const *const ResultNames [DiffRecord::kResultCount]
 

Detailed Description

Definition at line 87 of file skdiff.h.

Member Enumeration Documentation

◆ Result

Enumerator
kEqualBits_Result 
kEqualPixels_Result 
kDifferentPixels_Result 
kDifferentSizes_Result 
kCouldNotCompare_Result 
kUnknown_Result 
kResultCount 

Definition at line 91 of file skdiff.h.

91 {
98
99 kResultCount // NOT A VALID VALUE--used to set up arrays. Must be last.
100 };
@ kUnknown_Result
Definition: skdiff.h:97
@ kEqualBits_Result
Definition: skdiff.h:92
@ kCouldNotCompare_Result
Definition: skdiff.h:96
@ kResultCount
Definition: skdiff.h:99
@ kDifferentSizes_Result
Definition: skdiff.h:95
@ kDifferentPixels_Result
Definition: skdiff.h:94
@ kEqualPixels_Result
Definition: skdiff.h:93

Constructor & Destructor Documentation

◆ DiffRecord()

DiffRecord::DiffRecord ( )
inline

Definition at line 111 of file skdiff.h.

112 : fBase()
113 , fComparison()
114 , fDifference()
115 , fWhite()
122 , fTotalMismatchA(0)
123 , fMaxMismatchA(0)
124 , fMaxMismatchR(0)
125 , fMaxMismatchG(0)
126 , fMaxMismatchB(0)
128 }
DiffResource fDifference
Definition: skdiff.h:132
DiffResource fComparison
Definition: skdiff.h:131
float fAverageMismatchG
Definition: skdiff.h:143
Result fResult
Which category of diff result.
Definition: skdiff.h:154
DiffResource fBase
Definition: skdiff.h:130
float fAverageMismatchA
Definition: skdiff.h:141
uint32_t fMaxMismatchB
Definition: skdiff.h:151
uint32_t fMaxMismatchR
Definition: skdiff.h:149
float fFractionDifference
Definition: skdiff.h:138
uint32_t fMaxMismatchG
Definition: skdiff.h:150
float fAverageMismatchB
Definition: skdiff.h:144
float fWeightedFraction
Definition: skdiff.h:139
uint32_t fMaxMismatchA
Definition: skdiff.h:148
float fAverageMismatchR
Definition: skdiff.h:142
uint32_t fTotalMismatchA
Definition: skdiff.h:146
DiffResource fWhite
Definition: skdiff.h:133

Member Function Documentation

◆ getResultByName()

DiffRecord::Result DiffRecord::getResultByName ( const char *  name)
static

Returns the Result with this name. If there is no Result with this name, returns kResultCount.

Definition at line 23 of file skdiff.cpp.

23 {
24 for (int result = 0; result < DiffRecord::kResultCount; ++result) {
25 if (0 == strcmp(DiffRecord::ResultNames[result], name)) {
26 return static_cast<DiffRecord::Result>(result);
27 }
28 }
30}
GAsyncResult * result
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
static char const *const ResultNames[DiffRecord::kResultCount]
Definition: skdiff.h:101

◆ getResultDescription()

const char * DiffRecord::getResultDescription ( DiffRecord::Result  result)
static

Returns a text description of the given Result type.

Definition at line 41 of file skdiff.cpp.

41 {
43}
static char const *const ResultDescriptions[DiffRecord::kResultCount]
Definition: skdiff.cpp:32

Member Data Documentation

◆ fAverageMismatchA

float DiffRecord::fAverageMismatchA

Definition at line 141 of file skdiff.h.

◆ fAverageMismatchB

float DiffRecord::fAverageMismatchB

Definition at line 144 of file skdiff.h.

◆ fAverageMismatchG

float DiffRecord::fAverageMismatchG

Definition at line 143 of file skdiff.h.

◆ fAverageMismatchR

float DiffRecord::fAverageMismatchR

Definition at line 142 of file skdiff.h.

◆ fBase

DiffResource DiffRecord::fBase

Definition at line 130 of file skdiff.h.

◆ fComparison

DiffResource DiffRecord::fComparison

Definition at line 131 of file skdiff.h.

◆ fDifference

DiffResource DiffRecord::fDifference

Definition at line 132 of file skdiff.h.

◆ fFractionDifference

float DiffRecord::fFractionDifference

Arbitrary floating-point metric to be used to sort images from most to least different from baseline; values of 0 will be omitted from the summary webpage.

Definition at line 138 of file skdiff.h.

◆ fMaxMismatchA

uint32_t DiffRecord::fMaxMismatchA

Definition at line 148 of file skdiff.h.

◆ fMaxMismatchB

uint32_t DiffRecord::fMaxMismatchB

Definition at line 151 of file skdiff.h.

◆ fMaxMismatchG

uint32_t DiffRecord::fMaxMismatchG

Definition at line 150 of file skdiff.h.

◆ fMaxMismatchR

uint32_t DiffRecord::fMaxMismatchR

Definition at line 149 of file skdiff.h.

◆ fResult

Result DiffRecord::fResult

Which category of diff result.

Definition at line 154 of file skdiff.h.

◆ fTotalMismatchA

uint32_t DiffRecord::fTotalMismatchA

Definition at line 146 of file skdiff.h.

◆ fWeightedFraction

float DiffRecord::fWeightedFraction

Definition at line 139 of file skdiff.h.

◆ fWhite

DiffResource DiffRecord::fWhite

Definition at line 133 of file skdiff.h.

◆ ResultNames

char const *const DiffRecord::ResultNames
static
Initial value:
= {
"EqualBits",
"EqualPixels",
"DifferentPixels",
"DifferentSizes",
"CouldNotCompare",
"Unknown",
}

Definition at line 101 of file skdiff.h.


The documentation for this struct was generated from the following files: