aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkRasterPipelineTest.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-01-06 12:00:31 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-06 17:45:41 +0000
commit7f71d8845c3c57c6e4b33c3666cca46b55e91d02 (patch)
treeaea72f38ade77ff52c4f6c47cbf4f7d5c492f218 /tests/SkRasterPipelineTest.cpp
parentf55ea6a1deb21120944d406124a2984b5009260a (diff)
SkXbyak basics
A little JIT proof of concept for SkRasterPipeline, using xbyak, which is a header-only assembler. It's x86-only, but supports x86 very thoroughly, and it's very user friendly (at least as far as assembler libraries go...). CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ie17e562b0f3fff5914041badfb2c1fe4f86efab8 Reviewed-on: https://skia-review.googlesource.com/5730 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Heather Miller <hcm@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests/SkRasterPipelineTest.cpp')
-rw-r--r--tests/SkRasterPipelineTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/SkRasterPipelineTest.cpp b/tests/SkRasterPipelineTest.cpp
index ddd84e7cce..2f9b4066b5 100644
--- a/tests/SkRasterPipelineTest.cpp
+++ b/tests/SkRasterPipelineTest.cpp
@@ -34,6 +34,16 @@ DEF_TEST(SkRasterPipeline, r) {
REPORTER_ASSERT(r, ((result >> 16) & 0xffff) == 0x0000);
REPORTER_ASSERT(r, ((result >> 32) & 0xffff) == 0x3800);
REPORTER_ASSERT(r, ((result >> 48) & 0xffff) == 0x3c00);
+
+ // Run again, this time compiling the pipeline.
+ result = 0;
+
+ auto fn = p.compile();
+ fn(0,0, 1);
+ REPORTER_ASSERT(r, ((result >> 0) & 0xffff) == 0x3800);
+ REPORTER_ASSERT(r, ((result >> 16) & 0xffff) == 0x0000);
+ REPORTER_ASSERT(r, ((result >> 32) & 0xffff) == 0x3800);
+ REPORTER_ASSERT(r, ((result >> 48) & 0xffff) == 0x3c00);
}
DEF_TEST(SkRasterPipeline_empty, r) {