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

Unified Diff: tests/SwizzlerTest.cpp

Issue 1822363002: Publicly expose one accelerated swizzle. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: mtklein second review Created 4 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/core/SkSwizzle.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/SwizzlerTest.cpp
diff --git a/tests/SwizzlerTest.cpp b/tests/SwizzlerTest.cpp
index e1626d52f114d761c8ac3331d8d40205f8f955a7..1b34669f9780697809771bdceec1fdd8864950b8 100644
--- a/tests/SwizzlerTest.cpp
+++ b/tests/SwizzlerTest.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+#include "SkSwizzle.h"
#include "SkSwizzler.h"
#include "Test.h"
#include "SkOpts.h"
@@ -157,3 +158,12 @@ DEF_TEST(SwizzleOpts, r) {
SkOpts::RGBA_to_bgrA(&dst, &src, 1);
REPORTER_ASSERT(r, dst == 0xFA04ADCA);
}
+
+DEF_TEST(PublicSwizzleOpts, r) {
+ uint32_t dst, src;
+
+ // check a totally arbitrary color
+ src = 0xFACEB004;
+ SkSwapRB(&dst, &src, 1);
+ REPORTER_ASSERT(r, dst == 0xFA04B0CE);
+}
« no previous file with comments | « src/core/SkSwizzle.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698