Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: tests/PMFloatTest.cpp

Issue 936633002: Sketch SkPMFloat (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comments and names Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/core/SkPMFloat.h ('K') | « src/opts/SkPMFloat_none.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #include "SkPMFloat.h"
2 #include "Test.h"
3
4 DEF_TEST(SkPMFloat, r) {
5 SkPMColor c = SkPreMultiplyColor(0xFFCC9933);
6
7 SkPMFloat pmf;
8 pmf.set(c);
9 REPORTER_ASSERT(r, SkScalarNearlyEqual(1.0f, pmf.a()));
10 REPORTER_ASSERT(r, SkScalarNearlyEqual(0.8f, pmf.r()));
11 REPORTER_ASSERT(r, SkScalarNearlyEqual(0.6f, pmf.g()));
12 REPORTER_ASSERT(r, SkScalarNearlyEqual(0.2f, pmf.b()));
13
14 REPORTER_ASSERT(r, c == pmf.get());
15 }
OLDNEW
« src/core/SkPMFloat.h ('K') | « src/opts/SkPMFloat_none.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698