diff options
author | Chris Dalton <csmartdalton@google.com> | 2018-04-18 14:07:03 -0600 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-18 20:43:54 +0000 |
commit | 9f2dab0fdd3784e599099deb50653a35d5b238c8 (patch) | |
tree | 321816be62daad05cede102972d88d3cb772cb64 /tests | |
parent | 91ab15588451be2f7ec87635590f1e4f90bbbf9a (diff) |
ccpr: Implement conics
TBR=egdaniel@google.com
Bug: skia:
Change-Id: Idf7811dc285961db52db41c9ff145afda40c274d
Reviewed-on: https://skia-review.googlesource.com/122127
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/SkNxTest.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/SkNxTest.cpp b/tests/SkNxTest.cpp index bcf2a71658..933a5fc877 100644 --- a/tests/SkNxTest.cpp +++ b/tests/SkNxTest.cpp @@ -467,7 +467,8 @@ DEF_TEST(Sk2f_Store4, r) { Sk2f p1{1, 5}; Sk2f p2{2, 6}; Sk2f p3{3, 7}; - float dst[8]; + + float dst[8] = {-1, -1, -1, -1, -1, -1, -1, -1}; Sk2f::Store4(dst, p0, p1, p2, p3); REPORTER_ASSERT(r, dst[0] == 0); REPORTER_ASSERT(r, dst[1] == 1); @@ -477,6 +478,19 @@ DEF_TEST(Sk2f_Store4, r) { REPORTER_ASSERT(r, dst[5] == 5); REPORTER_ASSERT(r, dst[6] == 6); REPORTER_ASSERT(r, dst[7] == 7); + + // Ensure transposing to Sk4f works. + Sk4f dst4f[2] = {{-1, -1, -1, -1}, {-1, -1, -1, -1}}; + Sk2f::Store4(dst4f, p0, p1, p2, p3); + REPORTER_ASSERT(r, dst4f[0][0] == 0); + REPORTER_ASSERT(r, dst4f[0][1] == 1); + REPORTER_ASSERT(r, dst4f[0][2] == 2); + REPORTER_ASSERT(r, dst4f[0][3] == 3); + REPORTER_ASSERT(r, dst4f[1][0] == 4); + REPORTER_ASSERT(r, dst4f[1][1] == 5); + REPORTER_ASSERT(r, dst4f[1][2] == 6); + REPORTER_ASSERT(r, dst4f[1][3] == 7); + } DEF_TEST(Sk4f_minmax, r) { |