HomeSort by relevance Sort by last modified time
    Searched refs:Sk4f (Results 1 - 25 of 29) sorted by null

1 2

  /external/skia/src/core/
SkPM4fPriv.h 12 static inline float get_alpha(const Sk4f& f4) {
16 static inline Sk4f set_alpha(const Sk4f& f4, float alpha) {
18 return Sk4f(f4[0], f4[1], f4[2], alpha);
21 static inline uint32_t to_4b(const Sk4f& f4) {
27 static inline Sk4f to_4f(uint32_t b4) {
31 static inline Sk4f srgb_to_linear(const Sk4f& s4) {
35 static inline Sk4f linear_to_srgb(const Sk4f& l4)
    [all...]
SkXfermode4f.cpp 17 static Sk4f scale_by_coverage(const Sk4f& x4, uint8_t coverage) {
18 return x4 * Sk4f(coverage * (1/255.0f));
21 static Sk4f lerp(const Sk4f& src, const Sk4f& dst, uint8_t srcCoverage) {
22 return dst + (src - dst) * Sk4f(srcCoverage * (1/255.0f));
25 template <DstType D> Sk4f load_dst(SkPMColor dstC) {
29 static Sk4f srgb_4b_to_linear_unit(SkPMColor dstC) {
33 template <DstType D> uint32_t store_dst(const Sk4f& x4)
    [all...]
SkLinearBitmapPipeline.cpp 17 // Tweak ABI of functions that pass Sk4f by value to pass them via registers.
29 virtual void VECTORCALL pointListFew(int n, Sk4f xs, Sk4f ys) = 0;
30 virtual void VECTORCALL pointList4(Sk4f xs, Sk4f ys) = 0;
61 virtual void VECTORCALL bilerpList(Sk4f xs, Sk4f ys) = 0;
68 virtual void VECTORCALL placePixel(Sk4f pixel0) = 0;
69 virtual void VECTORCALL place4Pixels(Sk4f p0, Sk4f p1, Sk4f p2, Sk4f p3) = 0
    [all...]
SkXfermodeU64.cpp 24 static Sk4f lerp_by_coverage(const Sk4f& src, const Sk4f& dst, uint8_t srcCoverage) {
25 return dst + (src - dst) * Sk4f(srcCoverage * (1/255.0f));
28 template <DstType D> Sk4f unit_to_bias(const Sk4f& x4) {
29 return (D == kU16_Dst) ? x4 * Sk4f(65535) : x4;
32 template <DstType D> Sk4f bias_to_unit(const Sk4f& x4) {
33 return (D == kU16_Dst) ? x4 * Sk4f(1.0f/65535) : x4
    [all...]
SkBitmapFilter.h 101 Sk4f evalcore_n(const Sk4f& val) const {
102 Sk4f x = val.abs();
103 Sk4f over2 = x > Sk4f(2);
104 Sk4f over1 = x > Sk4f(1);
105 Sk4f poly1 = (((Sk4f(fA1) * x + Sk4f(fB1)) * x + Sk4f(fC1)) * x + Sk4f(fD1)
    [all...]
SkColorMatrixFilterRowMajor255.cpp 63 static Sk4f scale_rgb(float scale) {
65 return Sk4f(scale, scale, scale, 1);
68 static Sk4f premul(const Sk4f& x) {
72 static Sk4f unpremul(const Sk4f& x) {
76 static Sk4f clamp_0_1(const Sk4f& x) {
77 return Sk4f::Max(Sk4f::Min(x, Sk4f(1)), Sk4f(0))
    [all...]
SkXfermode.cpp 53 static Sk4f alpha(const Sk4f& color) { return Sk4f(color[3]); }
54 static Sk4f inv_alpha(const Sk4f& color) { return Sk4f(1 - color[3]); }
55 static Sk4f pin_1(const Sk4f& value) { return Sk4f::Min(value, Sk4f(1));
    [all...]
SkColorSpace.cpp 183 Sk4f cr, cg, cb;
184 cg = Sk4f::Load(m.fMat + 3);
187 cr = Sk4f::Load(m.fMat + 0);
188 cb = Sk4f(m.fMat[6], m.fMat[7], m.fMat[8], 0);
192 cb = Sk4f::Load(m.fMat + 0);
193 cr = Sk4f(m.fMat[6], m.fMat[7], m.fMat[8], 0);
195 cr = cr * Sk4f(1, 1, 1, 0);
196 cg = cg * Sk4f(1, 1, 1, 0);
197 cb = cb * Sk4f(1, 1, 1, 0);
200 Sk4f r = Sk4f(src[i].fVec[SkPM4f::R])
    [all...]
SkColor.cpp 110 Sk4f value = SkNx_cast<float>(Sk4b::Load(&c));
112 (value * Sk4f(1.0f / 255)).store(&c4);
149 auto c4 = Sk4f::Load(fVec);
150 SkASSERT((c4 >= Sk4f(0)).allTrue() && (c4 <= Sk4f(1)).allTrue());
157 Sk4f value = SkNx_shuffle<3,2,1,0>(SkNx_cast<float>(Sk4b::Load(&c)));
159 (value * Sk4f(1.0f / 255)).store(&c4);
165 Sk4f::Min(Sk4f::Max(Sk4f(a, r, g, b), Sk4f(0)), Sk4f(1)).store(c4.vec())
    [all...]
SkHalf.h 29 static inline Sk4f SkHalfToFloat_01(uint64_t);
30 static inline uint64_t SkFloatToHalf_01(const Sk4f&);
39 static inline Sk4f SkHalfToFloat_01(uint64_t hs) {
89 return Sk4f::Load(fs);
93 static inline uint64_t SkFloatToHalf_01(const Sk4f& fs) {
SkSpanProcs.cpp 25 (SkNx_cast<float>(Sk4b::Load(&addr[i])) * Sk4f(1.0f/255)).store(span[i].fVec);
35 srgb_to_linear(SkNx_cast<float>(Sk4b::Load(&addr[i])) * Sk4f(1.0f/255)).store(span[i].fVec);
70 const Sk4f scale = Sk4f(paint.getAlpha() * (1.0f/255));
72 (Sk4f::Load(span[i].fVec) * scale).store(span[i].fVec);
SkColorFilter.cpp 40 SkNx_cast<uint8_t>(Sk4f::Load(span[i].fVec) * Sk4f(255) + Sk4f(0.5f)).store(&tmp[i]);
SkNx.h 154 // Sk4f f(a,b,c,d);
156 // f = SkNx_shuffle<0,1,1,0>(t); // ~~~> Sk4f(c,b,b,c)
162 // Sk4f fs = SkNx_cast<float>(bs); // Cast each byte to a float.
189 typedef SkNx<4, float> Sk4f;
208 void Sk4f_ToBytes(uint8_t p[16], const Sk4f& a, const Sk4f& b, const Sk4f& c, const Sk4f& d) {
SkPixmap.cpp 233 Sk4f c4 = Sk4f::Load(color.vec());
235 (c4 * Sk4f(255) + Sk4f(0.5f)).store(&c);
  /external/skia/src/effects/gradients/
Sk4fLinearGradient.cpp 12 Sk4f premul_4f(const Sk4f& c) {
15 return c * Sk4f(alpha, alpha, alpha, 1);
19 SkPMColor trunc_from_255(const Sk4f& c) {
30 void fill(const Sk4f& c, DstType* dst, int n);
33 void fill<SkPM4f, false>(const Sk4f& c, SkPM4f* dst, int n) {
41 void fill<SkPM4f, true>(const Sk4f& c, SkPM4f* dst, int n) {
46 void fill<SkPMColor, false>(const Sk4f& c, SkPMColor* dst, int n) {
51 void fill<SkPMColor, true>(const Sk4f& c, SkPMColor* dst, int n) {
56 void store(const Sk4f& color, DstType* dst)
    [all...]
Sk4fGradientBase.h 31 const Sk4f& componentScale);
32 Interval(const Sk4f& c0, const Sk4f& dc,
SkLinearGradient.h 17 operator Sk4f() const {
18 return Sk4f::Load(fArray);
21 Sk4fStorage& operator=(const Sk4f& src) {
Sk4fGradientBase.cpp 33 const Sk4f& componentScale)
39 const Sk4f c4f0 = SkNx_cast<float>(Sk4b::Load(&c0)) * componentScale;
40 const Sk4f c4f1 = SkNx_cast<float>(Sk4b::Load(&c1)) * componentScale;
41 const Sk4f dc4f = (c4f1 - c4f0) / (p1 - p0);
48 Interval::Interval(const Sk4f& c0, const Sk4f& dc,
130 const Sk4f componentScale = fColorsArePremul
131 ? Sk4f(paintAlpha * kInv255Float)
132 : Sk4f(kInv255Float, kInv255Float, kInv255Float, paintAlpha * kInv255Float);
216 Sk4f dc = Sk4f::Load(interval.fDc.fVec)
    [all...]
SkRadialGradient.cpp 95 static inline Sk4f fast_sqrt(const Sk4f& R) {
100 static inline Sk4f sum_squares(const Sk4f& a, const Sk4f& b) {
114 const Sk4f max(255);
120 const Sk4f fx4(sfx, sfx + sdx, sfx + 2*sdx, sfx + 3*sdx);
121 const Sk4f fy4(sfy, sfy + sdy, sfy + 2*sdy, sfy + 3*sdy);
122 const Sk4f dx4(sdx * 4);
123 const Sk4f dy4(sdy * 4)
    [all...]
SkLinearGradient.cpp 106 // This allows us to map directly to Sk4f, and eventually scale down to bytes to output a
117 // setup for Sk4f
156 const Sk4f scale(1, 1, 1, paintAlpha);
291 // Only use the Sk4f impl when known to be fast.
538 template <bool apply_alpha> SkPMColor trunc_from_255(const Sk4f& x) {
549 const Sk4f& c4, const Sk4f& c4other) {
554 template <bool apply_alpha> void fill(SkPMColor dst[], int count, const Sk4f& c4) {
569 static Sk4f lerp_color(float fx, const SkLinearGradient::LinearGradientContext::Rec* rec) {
574 const Sk4f c0 = rec[0].fColor
    [all...]
  /external/skia/src/opts/
SkXfermode_opts.h 117 struct Xfermode { Sk4f operator()(const Sk4f&, const Sk4f&) const; }; \
118 inline Sk4f Xfermode::operator()(const Sk4f& d, const Sk4f& s) const
120 static inline Sk4f a_rgb(const Sk4f& a, const Sk4f& rgb) {
122 return a * Sk4f(0,0,0,1) + rgb * Sk4f(1,1,1,0)
    [all...]
SkColorCubeFilter_opts.h 43 const Sk4f g0b0(g0*b0),
53 Sk4f color(0.5f); // Starting from 0.5f gets us rounding for free.
62 Sk4f sum = SkNx_cast<float>(Sk4b::Load(&lutColor00)) * g0b0;
66 color = color + sum * Sk4f((float)colorToFactors[x][r]);
69 color = color * Sk4f(a * (1.0f/255));
SkNx_sse.h 291 template<> /*static*/ inline Sk4f SkNx_cast<float, int>(const Sk4i& src) {
295 template <> /*static*/ inline Sk4i SkNx_cast<int, float>(const Sk4f& src) {
299 template<> /*static*/ inline Sk4h SkNx_cast<uint16_t, float>(const Sk4f& src) {
313 template<> /*static*/ inline Sk4b SkNx_cast<uint8_t, float>(const Sk4f& src) {
324 template<> /*static*/ inline Sk4f SkNx_cast<float, uint8_t>(const Sk4b& src) {
335 template<> /*static*/ inline Sk4f SkNx_cast<float, uint16_t>(const Sk4h& src) {
341 const Sk4f& a, const Sk4f& b, const Sk4f& c, const Sk4f& d)
    [all...]
SkNx_neon.h 363 template<> inline Sk4h SkNx_cast<uint16_t, float>(const Sk4f& src) {
367 template<> inline Sk4f SkNx_cast<float, uint16_t>(const Sk4h& src) {
371 template<> inline Sk4b SkNx_cast<uint8_t, float>(const Sk4f& src) {
377 template<> inline Sk4f SkNx_cast<float, uint8_t>(const Sk4b& src) {
384 const Sk4f& a, const Sk4f& b, const Sk4f& c, const Sk4f& d) {
  /external/skia/bench/
Sk4fBench.cpp 32 Sk4f fs(1,2,3,4);
50 Sk4f fs(1,2,3,4);
65 Sk4f c0(0,0,255,255),
74 Sk4f a = c0 + dc*fx + Sk4f(0.5f), // add an extra 0.5f to get rounding for free.

Completed in 238 milliseconds

1 2