Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
SkNDKConversions.cpp File Reference
#include "src/ports/SkNDKConversions.h"

Go to the source code of this file.

Namespaces

namespace  SkNDKConversions
 

Functions

AndroidBitmapFormat SkNDKConversions::toAndroidBitmapFormat (SkColorType colorType)
 
SkColorType SkNDKConversions::toColorType (AndroidBitmapFormat format)
 
static bool nearly_equal (float a, float b)
 
static bool nearly_equal (const skcms_TransferFunction &x, const skcms_TransferFunction &y)
 
static bool nearly_equal (const skcms_Matrix3x3 &a, const skcms_Matrix3x3 &b)
 
ADataSpace SkNDKConversions::toDataSpace (SkColorSpace *cs)
 
sk_sp< SkColorSpaceSkNDKConversions::toColorSpace (ADataSpace dataSpace)
 

Variables

static constexpr skcms_TransferFunction k2Dot6 = {2.6f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}
 
static constexpr skcms_Matrix3x3 kDCIP3
 

Function Documentation

◆ nearly_equal() [1/3]

static bool nearly_equal ( const skcms_Matrix3x3 a,
const skcms_Matrix3x3 b 
)
static

Definition at line 86 of file SkNDKConversions.cpp.

86 {
87 for (int i = 0; i < 3; i++)
88 for (int j = 0; j < 3; j++) {
89 if (!nearly_equal(a.vals[i][j], b.vals[i][j])) return false;
90 }
91 return true;
92}
static bool nearly_equal(float a, float b)
static bool b
struct MyStruct a[10]

◆ nearly_equal() [2/3]

static bool nearly_equal ( const skcms_TransferFunction x,
const skcms_TransferFunction y 
)
static

Definition at line 76 of file SkNDKConversions.cpp.

76 {
77 return nearly_equal(x.g, y.g)
78 && nearly_equal(x.a, y.a)
79 && nearly_equal(x.b, y.b)
80 && nearly_equal(x.c, y.c)
81 && nearly_equal(x.d, y.d)
82 && nearly_equal(x.e, y.e)
83 && nearly_equal(x.f, y.f);
84}
double y
double x

◆ nearly_equal() [3/3]

static bool nearly_equal ( float  a,
float  b 
)
static

Definition at line 72 of file SkNDKConversions.cpp.

72 {
73 return fabs(a - b) < .002f;
74}

Variable Documentation

◆ k2Dot6

constexpr skcms_TransferFunction k2Dot6 = {2.6f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}
staticconstexpr

Definition at line 45 of file SkNDKConversions.cpp.

45{2.6f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};

◆ kDCIP3

constexpr skcms_Matrix3x3 kDCIP3
staticconstexpr
Initial value:
= {{
{0.486143, 0.323835, 0.154234},
{0.226676, 0.710327, 0.0629966},
{0.000800549, 0.0432385, 0.78275},
}}

Definition at line 47 of file SkNDKConversions.cpp.

47 {{
48 {0.486143, 0.323835, 0.154234},
49 {0.226676, 0.710327, 0.0629966},
50 {0.000800549, 0.0432385, 0.78275},
51}};