diff options
author | brianosman <brianosman@google.com> | 2016-06-24 06:31:47 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-24 06:31:47 -0700 |
commit | e074d1fa6ace83dd77971b971c07166bedeb28ef (patch) | |
tree | ffdbdc9ce69615ca7923b4816343d01fddad7bac /tests | |
parent | 7bde5659d354b4ef227c487a4e9fa8de12573c31 (diff) |
Change SkColor4f to RGBA channel order
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2093763003
Review-Url: https://codereview.chromium.org/2093763003
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Float16Test.cpp | 2 | ||||
-rw-r--r-- | tests/SkColor4fTest.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/Float16Test.cpp b/tests/Float16Test.cpp index 6a7f9842f4..d80fe29439 100644 --- a/tests/Float16Test.cpp +++ b/tests/Float16Test.cpp @@ -43,7 +43,7 @@ DEF_TEST(color_half_float, reporter) { pm.alloc(info); REPORTER_ASSERT(reporter, pm.getSafeSize() == SkToSizeT(w * h * sizeof(uint64_t))); - SkColor4f c4 { 0.5f, 1, 0.5f, 0.25f }; + SkColor4f c4 { 1, 0.5f, 0.25f, 0.5f }; pm.erase(c4); SkPM4f origpm4 = c4.premul(); diff --git a/tests/SkColor4fTest.cpp b/tests/SkColor4fTest.cpp index 00cb3fed27..1dacfb2d95 100644 --- a/tests/SkColor4fTest.cpp +++ b/tests/SkColor4fTest.cpp @@ -37,13 +37,13 @@ DEF_TEST(SkColor4f_FromColor, reporter) { SkColor fC; SkColor4f fC4; } recs[] = { - { SK_ColorBLACK, { 1, 0, 0, 0 } }, + { SK_ColorBLACK, { 0, 0, 0, 1 } }, { SK_ColorWHITE, { 1, 1, 1, 1 } }, - { SK_ColorRED, { 1, 1, 0, 0 } }, - { SK_ColorGREEN, { 1, 0, 1, 0 } }, - { SK_ColorBLUE, { 1, 0, 0, 1 } }, + { SK_ColorRED, { 1, 0, 0, 1 } }, + { SK_ColorGREEN, { 0, 1, 0, 1 } }, + { SK_ColorBLUE, { 0, 0, 1, 1 } }, { 0, { 0, 0, 0, 0 } }, - { 0x55AAFF00, { 1/3.0f, 2/3.0f, 1, 0 } }, + { 0x55AAFF00, { 2/3.0f, 1, 0, 1 / 3.0f } }, }; for (const auto& r : recs) { @@ -58,7 +58,7 @@ DEF_TEST(Color4f_premul, reporter) { for (int i = 0; i < 1000000; ++i) { // First just test opaque colors, so that the premul should be exact SkColor4f c4 { - 1, rand.nextUScalar1(), rand.nextUScalar1(), rand.nextUScalar1() + rand.nextUScalar1(), rand.nextUScalar1(), rand.nextUScalar1(), 1 }; SkPM4f pm4 = c4.premul(); REPORTER_ASSERT(reporter, pm4.a() == c4.fA); |