aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar tomhudson <tomhudson@google.com>2016-03-23 10:51:20 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-23 10:51:21 -0700
commit734351d2555024a679c4e4f5e13e8be2329803d2 (patch)
treeab10f97e83b00faa543f7130e325fe0ee83a5181 /tests
parent7dbd45d2c7427d2c679d6507435d2f0220bf64ef (diff)
Publicly expose one accelerated swizzle.
SkOpts is intentionally internal, but we want to give Chrome access to those pieces that would seriously benefit them. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822363002 Review URL: https://codereview.chromium.org/1822363002
Diffstat (limited to 'tests')
-rw-r--r--tests/SwizzlerTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/SwizzlerTest.cpp b/tests/SwizzlerTest.cpp
index e1626d52f1..1b34669f97 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);
+}