Lines Matching refs:idx
39 int idx = (fKey >> (4U * i)) & 0xfU;
40 return IToC(idx);
63 static constexpr float ComponentIndexToFloat(std::array<float, 4>, int idx);
65 static constexpr char IToC(int idx);
84 int idx = (key & 15);
85 float outR = ComponentIndexToFloat(color, idx);
87 idx = (key & 15);
88 float outG = ComponentIndexToFloat(color, idx);
90 idx = (key & 15);
91 float outB = ComponentIndexToFloat(color, idx);
93 idx = (key & 15);
94 float outA = ComponentIndexToFloat(color, idx);
98 constexpr float GrSwizzle::ComponentIndexToFloat(std::array<float, 4> color, int idx) {
99 if (idx <= 3) {
100 return color[idx];
102 if (idx == CToI('1')) {
105 if (idx == CToI('0')) {
124 constexpr char GrSwizzle::IToC(int idx) {
125 switch (idx) {
139 int idx = (b.fKey >> (4U * i)) & 0xfU;
140 if (idx != CToI('0') && idx != CToI('1')) {
141 SkASSERT(idx >= 0 && idx < 4);
142 // Get the index value stored in a at location idx.
143 idx = ((a.fKey >> (4U * idx)) & 0xfU);
145 key |= (idx << (4U * i));