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

Unified Diff: tests/PMFloatTest.cpp

Issue 1035583002: Update 4-at-a-time APIs. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: (C) Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/opts/SkPMFloat_none.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PMFloatTest.cpp
diff --git a/tests/PMFloatTest.cpp b/tests/PMFloatTest.cpp
index b1a4d045b493a793bf6d8aeeef7858f794a8fc35..0f0d853c2b840d8abacd74e2a6da6edc1b4adf4b 100644
--- a/tests/PMFloatTest.cpp
+++ b/tests/PMFloatTest.cpp
@@ -1,3 +1,10 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
#include "SkPMFloat.h"
#include "Test.h"
@@ -33,15 +40,15 @@ DEF_TEST(SkPMFloat, r) {
// Test 4-at-a-time conversions.
SkPMColor colors[4] = { 0xFF000000, 0xFFFF0000, 0xFF00FF00, 0xFF0000FF };
SkPMFloat floats[4];
- SkPMFloat::From4PMColors(floats, colors);
+ SkPMFloat::From4PMColors(colors, floats+0, floats+1, floats+2, floats+3);
SkPMColor back[4];
- SkPMFloat::To4PMColors(back, floats);
+ SkPMFloat::To4PMColors(floats[0], floats[1], floats[2], floats[3], back);
for (int i = 0; i < 4; i++) {
REPORTER_ASSERT(r, back[i] == colors[i]);
}
- SkPMFloat::ClampTo4PMColors(back, floats);
+ SkPMFloat::ClampTo4PMColors(floats[0], floats[1], floats[2], floats[3], back);
for (int i = 0; i < 4; i++) {
REPORTER_ASSERT(r, back[i] == colors[i]);
}
« no previous file with comments | « src/opts/SkPMFloat_none.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698