Home | History | Annotate | Download | only in tests

Lines Matching refs:dst

6 static int test_srcover0(unsigned dst, unsigned alpha) {
7 return alpha + SkAlphaMul(dst, SkAlpha255To256(255 - alpha));
11 static int test_srcover1(unsigned dst, unsigned alpha) {
12 return alpha + SkAlphaMul(dst, 256 - alpha);
16 static int test_srcover2(unsigned dst, unsigned alpha) {
17 return alpha + SkMulDiv255Round(dst, 255 - alpha);
22 dst, that the result always stay's opaque (i.e. exactly 255)?
48 for (unsigned dst = 0; dst <= 255; dst++) {
49 unsigned r0 = test_srcover0(dst, i);
50 unsigned r1 = test_srcover1(dst, i);
51 unsigned r2 = test_srcover2(dst, i);
52 unsigned max = SkMax32(dst, i);
54 if (dst != 255) {
63 SkDebugf("--- dst=%d i=%d r1=%d r2=%d exact=%g\n",
64 dst, i, r1, r2, i + dst - dst*i/255.0f);