aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/core/SkColorSpaceXform.h1
-rw-r--r--infra/bots/assets/skimage/VERSION2
-rw-r--r--infra/bots/tasks.json356
-rw-r--r--src/codec/SkPngCodec.cpp38
-rw-r--r--src/codec/SkSwizzler.cpp59
-rw-r--r--src/core/SkColorSpaceXform.cpp23
-rw-r--r--src/core/SkColorSpaceXform_A2B.cpp3
-rw-r--r--src/core/SkNx.h16
-rw-r--r--src/core/SkRasterPipeline.h5
-rw-r--r--src/opts/SkNx_neon.h7
-rw-r--r--src/opts/SkNx_sse.h16
-rw-r--r--src/opts/SkRasterPipeline_opts.h36
12 files changed, 363 insertions, 199 deletions
diff --git a/include/core/SkColorSpaceXform.h b/include/core/SkColorSpaceXform.h
index 299fe26a3a..0c4fd7aa33 100644
--- a/include/core/SkColorSpaceXform.h
+++ b/include/core/SkColorSpaceXform.h
@@ -29,6 +29,7 @@ public:
kBGRA_8888_ColorFormat,
// Unsigned, big-endian, 16-bit integer
+ kRGB_U16_BE_ColorFormat, // Src only
kRGBA_U16_BE_ColorFormat, // Src only
kRGBA_F16_ColorFormat, // Dst only
diff --git a/infra/bots/assets/skimage/VERSION b/infra/bots/assets/skimage/VERSION
index 25bf17fc5a..dec2bf5d61 100644
--- a/infra/bots/assets/skimage/VERSION
+++ b/infra/bots/assets/skimage/VERSION
@@ -1 +1 @@
-18 \ No newline at end of file
+19 \ No newline at end of file
diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json
index 8b2e7cc88c..d724b75dbc 100644
--- a/infra/bots/tasks.json
+++ b/infra/bots/tasks.json
@@ -3577,7 +3577,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3626,7 +3626,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3675,7 +3675,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3724,7 +3724,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3773,7 +3773,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3822,7 +3822,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3871,7 +3871,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3920,7 +3920,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -3969,7 +3969,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4018,7 +4018,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4067,7 +4067,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4116,7 +4116,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4165,7 +4165,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4214,7 +4214,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4263,7 +4263,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4312,7 +4312,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4361,7 +4361,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4410,7 +4410,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4459,7 +4459,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4508,7 +4508,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4557,7 +4557,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4606,7 +4606,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4655,7 +4655,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4704,7 +4704,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4753,7 +4753,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4802,7 +4802,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4851,7 +4851,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4900,7 +4900,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4949,7 +4949,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -4998,7 +4998,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5047,7 +5047,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5174,7 +5174,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5222,7 +5222,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5270,7 +5270,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5319,7 +5319,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5368,7 +5368,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5416,7 +5416,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5464,7 +5464,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5512,7 +5512,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5561,7 +5561,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5615,7 +5615,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5669,7 +5669,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5718,7 +5718,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5767,7 +5767,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5820,7 +5820,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5869,7 +5869,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5918,7 +5918,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -5967,7 +5967,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6066,7 +6066,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6114,7 +6114,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6162,7 +6162,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6402,7 +6402,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6450,7 +6450,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6498,7 +6498,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6546,7 +6546,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6594,7 +6594,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6642,7 +6642,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6690,7 +6690,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6738,7 +6738,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6786,7 +6786,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6834,7 +6834,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6882,7 +6882,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6930,7 +6930,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -6978,7 +6978,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7026,7 +7026,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7074,7 +7074,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7122,7 +7122,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7170,7 +7170,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7218,7 +7218,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7266,7 +7266,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7314,7 +7314,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7362,7 +7362,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7410,7 +7410,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7458,7 +7458,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7506,7 +7506,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7554,7 +7554,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7602,7 +7602,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7650,7 +7650,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7698,7 +7698,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7746,7 +7746,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7794,7 +7794,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7843,7 +7843,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7892,7 +7892,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7941,7 +7941,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -7990,7 +7990,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8038,7 +8038,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8086,7 +8086,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8135,7 +8135,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8184,7 +8184,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8233,7 +8233,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8282,7 +8282,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8331,7 +8331,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8380,7 +8380,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8429,7 +8429,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8478,7 +8478,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8527,7 +8527,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8576,7 +8576,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8625,7 +8625,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8674,7 +8674,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8723,7 +8723,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8772,7 +8772,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8821,7 +8821,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8870,7 +8870,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8919,7 +8919,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -8968,7 +8968,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9017,7 +9017,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9066,7 +9066,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9115,7 +9115,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9164,7 +9164,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9213,7 +9213,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9262,7 +9262,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9311,7 +9311,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9360,7 +9360,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9409,7 +9409,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9458,7 +9458,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9507,7 +9507,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9556,7 +9556,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9605,7 +9605,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9654,7 +9654,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9703,7 +9703,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9751,7 +9751,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9799,7 +9799,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9848,7 +9848,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9897,7 +9897,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9945,7 +9945,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -9993,7 +9993,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10041,7 +10041,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10090,7 +10090,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10144,7 +10144,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10198,7 +10198,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10247,7 +10247,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10296,7 +10296,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10350,7 +10350,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10403,7 +10403,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10456,7 +10456,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10505,7 +10505,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10629,7 +10629,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10678,7 +10678,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10727,7 +10727,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10776,7 +10776,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10824,7 +10824,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -10872,7 +10872,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11112,7 +11112,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11160,7 +11160,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11208,7 +11208,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11256,7 +11256,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11304,7 +11304,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11352,7 +11352,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11400,7 +11400,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11448,7 +11448,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11496,7 +11496,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11544,7 +11544,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11592,7 +11592,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11640,7 +11640,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11688,7 +11688,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11736,7 +11736,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11784,7 +11784,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11832,7 +11832,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11880,7 +11880,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11928,7 +11928,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -11976,7 +11976,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12024,7 +12024,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12072,7 +12072,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12120,7 +12120,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12168,7 +12168,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12216,7 +12216,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12264,7 +12264,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12312,7 +12312,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12360,7 +12360,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12408,7 +12408,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12456,7 +12456,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12505,7 +12505,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12554,7 +12554,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12603,7 +12603,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12652,7 +12652,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12701,7 +12701,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12750,7 +12750,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
@@ -12798,7 +12798,7 @@
{
"name": "skia/bots/skimage",
"path": "skimage",
- "version": "version:18"
+ "version": "version:19"
},
{
"name": "skia/bots/skp",
diff --git a/src/codec/SkPngCodec.cpp b/src/codec/SkPngCodec.cpp
index 9f5c8e6906..468b0b8731 100644
--- a/src/codec/SkPngCodec.cpp
+++ b/src/codec/SkPngCodec.cpp
@@ -420,8 +420,12 @@ void SkPngCodec::allocateStorage(const SkImageInfo& dstInfo) {
// be created later if we are sampling. We'll go ahead and allocate
// enough memory to swizzle if necessary.
case kSwizzleColor_XformMode: {
- const size_t bpp = (this->getEncodedInfo().bitsPerPixel() > 32) ? 8 : 4;
- const size_t colorXformBytes = dstInfo.width() * bpp;
+ const int bitsPerPixel = this->getEncodedInfo().bitsPerPixel();
+
+ // If we have more than 8-bits (per component) of precision, we will keep that
+ // extra precision. Otherwise, we will swizzle to RGBA_8888 before transforming.
+ const size_t bytesPerPixel = (bitsPerPixel > 32) ? bitsPerPixel / 8 : 4;
+ const size_t colorXformBytes = dstInfo.width() * bytesPerPixel;
fStorage.reset(colorXformBytes);
fColorXformSrcRow = fStorage.get();
break;
@@ -430,10 +434,13 @@ void SkPngCodec::allocateStorage(const SkImageInfo& dstInfo) {
}
static SkColorSpaceXform::ColorFormat png_select_xform_format(const SkEncodedInfo& info) {
- // We always use kRGBA because color PNGs are always RGB or RGBA.
- // TODO (msarett): Support kRGB_U16 inputs as well.
- if (16 == info.bitsPerComponent() && SkEncodedInfo::kRGBA_Color == info.color()) {
- return SkColorSpaceXform::kRGBA_U16_BE_ColorFormat;
+ // We use kRGB and kRGBA formats because color PNGs are always RGB or RGBA.
+ if (16 == info.bitsPerComponent()) {
+ if (SkEncodedInfo::kRGBA_Color == info.color()) {
+ return SkColorSpaceXform::kRGBA_U16_BE_ColorFormat;
+ } else if (SkEncodedInfo::kRGB_Color == info.color()) {
+ return SkColorSpaceXform::kRGB_U16_BE_ColorFormat;
+ }
}
return SkColorSpaceXform::kRGBA_8888_ColorFormat;
@@ -1090,9 +1097,22 @@ bool SkPngCodec::initializeXforms(const SkImageInfo& dstInfo, const Options& opt
return false;
}
- // If the image is RGBA and we have a color xform, we can skip the swizzler.
- const bool skipFormatConversion = this->colorXform() &&
- SkEncodedInfo::kRGBA_Color == this->getEncodedInfo().color();
+ // If SkColorSpaceXform directly supports the encoded PNG format, we should skip format
+ // conversion in the swizzler (or skip swizzling altogether).
+ bool skipFormatConversion = false;
+ switch (this->getEncodedInfo().color()) {
+ case SkEncodedInfo::kRGB_Color:
+ if (this->getEncodedInfo().bitsPerComponent() != 16) {
+ break;
+ }
+
+ // Fall through
+ case SkEncodedInfo::kRGBA_Color:
+ skipFormatConversion = this->colorXform();
+ break;
+ default:
+ break;
+ }
if (skipFormatConversion && !options.fSubset) {
fXformMode = kColorOnly_XformMode;
return true;
diff --git a/src/codec/SkSwizzler.cpp b/src/codec/SkSwizzler.cpp
index 21c999403e..820072f9f0 100644
--- a/src/codec/SkSwizzler.cpp
+++ b/src/codec/SkSwizzler.cpp
@@ -51,6 +51,17 @@ static void sample4(void* dst, const uint8_t* src, int width, int bpp, int delta
}
}
+static void sample6(void* dst, const uint8_t* src, int width, int bpp, int deltaSrc, int offset,
+ const SkPMColor ctable[]) {
+ src += offset;
+ uint8_t* dst8 = (uint8_t*) dst;
+ for (int x = 0; x < width; x++) {
+ memcpy(dst8, src, 6);
+ dst8 += 6;
+ src += deltaSrc;
+ }
+}
+
static void sample8(void* dst, const uint8_t* src, int width, int bpp, int deltaSrc, int offset,
const SkPMColor ctable[]) {
src += offset;
@@ -809,21 +820,48 @@ SkSwizzler* SkSwizzler::CreateSwizzler(const SkEncodedInfo& encodedInfo,
int srcBPP;
const int dstBPP = SkColorTypeBytesPerPixel(dstInfo.colorType());
if (skipFormatConversion) {
- srcBPP = dstBPP;
- switch (dstInfo.colorType()) {
- case kGray_8_SkColorType:
+ switch (encodedInfo.color()) {
+ case SkEncodedInfo::kGray_Color:
+ case SkEncodedInfo::kPalette_Color:
+ // The encoded format and the dstColorType are the same.
+ srcBPP = 1;
proc = &sample1;
fastProc = &copy;
break;
- case kRGB_565_SkColorType:
- proc = &sample2;
+ case SkEncodedInfo::kYUV_Color:
+ // We have a jpeg that has already been converted to the dstColorType.
+ srcBPP = dstBPP;
+ switch (dstInfo.colorType()) {
+ case kGray_8_SkColorType:
+ proc = &sample1;
+ fastProc = &copy;
+ break;
+ case kRGB_565_SkColorType:
+ proc = &sample2;
+ fastProc = &copy;
+ break;
+ case kRGBA_8888_SkColorType:
+ case kBGRA_8888_SkColorType:
+ proc = &sample4;
+ fastProc = &copy;
+ break;
+ default:
+ return nullptr;
+ }
+ break;
+ case SkEncodedInfo::kInvertedCMYK_Color:
+ case SkEncodedInfo::kYCCK_Color:
+ // We have a jpeg that remains in its original format.
+ srcBPP = 4;
+ proc = &sample4;
fastProc = &copy;
break;
- case kRGBA_8888_SkColorType:
- case kBGRA_8888_SkColorType:
+ case SkEncodedInfo::kRGBA_Color:
+ // We have a png that should remain in its original format.
SkASSERT(16 == encodedInfo.bitsPerComponent() ||
8 == encodedInfo.bitsPerComponent());
if (8 == encodedInfo.bitsPerComponent()) {
+ srcBPP = 4;
proc = &sample4;
} else {
srcBPP = 8;
@@ -831,6 +869,13 @@ SkSwizzler* SkSwizzler::CreateSwizzler(const SkEncodedInfo& encodedInfo,
}
fastProc = &copy;
break;
+ case SkEncodedInfo::kRGB_Color:
+ // We have a png that remains in its original format.
+ SkASSERT(16 == encodedInfo.bitsPerComponent());
+ srcBPP = 6;
+ proc = &sample6;
+ fastProc = &copy;
+ break;
default:
return nullptr;
}
diff --git a/src/core/SkColorSpaceXform.cpp b/src/core/SkColorSpaceXform.cpp
index bdb3784681..dccb92ee9a 100644
--- a/src/core/SkColorSpaceXform.cpp
+++ b/src/core/SkColorSpaceXform.cpp
@@ -1104,7 +1104,10 @@ bool SkColorSpaceXform_XYZ<kCSM>
}
}
- if (kRGBA_F32_ColorFormat == dstColorFormat || kRGBA_U16_BE_ColorFormat == srcColorFormat) {
+ if (kRGBA_F32_ColorFormat == dstColorFormat ||
+ kRGBA_U16_BE_ColorFormat == srcColorFormat ||
+ kRGB_U16_BE_ColorFormat == srcColorFormat)
+ {
return this->applyPipeline(dstColorFormat, dst, srcColorFormat, src, len, alphaType);
}
@@ -1221,6 +1224,24 @@ bool SkColorSpaceXform_XYZ<kCSM>
break;
}
break;
+ case kRGB_U16_BE_ColorFormat:
+ switch (fSrcGamma) {
+ case kLinear_SrcGamma:
+ pipeline.append(SkRasterPipeline::load_rgb_u16_be, &src);
+ break;
+ case kSRGB_SrcGamma:
+ pipeline.append(SkRasterPipeline::load_rgb_u16_be, &src);
+ pipeline.append_from_srgb(kUnpremul_SkAlphaType);
+ break;
+ case kTable_SrcGamma:
+ loadTables.fSrc = src;
+ loadTables.fR = fSrcGammaTables[0];
+ loadTables.fG = fSrcGammaTables[1];
+ loadTables.fB = fSrcGammaTables[2];
+ pipeline.append(SkRasterPipeline::load_tables_rgb_u16_be, &loadTables);
+ break;
+ }
+ break;
default:
return false;
}
diff --git a/src/core/SkColorSpaceXform_A2B.cpp b/src/core/SkColorSpaceXform_A2B.cpp
index 6e49e84aee..27c9faa971 100644
--- a/src/core/SkColorSpaceXform_A2B.cpp
+++ b/src/core/SkColorSpaceXform_A2B.cpp
@@ -31,6 +31,9 @@ bool SkColorSpaceXform_A2B::onApply(ColorFormat dstFormat, void* dst, ColorForma
case kRGBA_U16_BE_ColorFormat:
pipeline.append(SkRasterPipeline::load_u16_be, &src);
break;
+ case kRGB_U16_BE_ColorFormat:
+ pipeline.append(SkRasterPipeline::load_rgb_u16_be, &src);
+ break;
default:
SkCSXformPrintf("F16/F32 source color format not supported\n");
return false;
diff --git a/src/core/SkNx.h b/src/core/SkNx.h
index a75495cd2a..5df575342c 100644
--- a/src/core/SkNx.h
+++ b/src/core/SkNx.h
@@ -68,6 +68,16 @@ struct SkNx {
*c = SkNx{cl, ch};
*d = SkNx{dl, dh};
}
+ AI static void Load3(const void* vptr, SkNx* a, SkNx* b, SkNx* c) {
+ auto ptr = (const char*)vptr;
+ Half al, bl, cl,
+ ah, bh, ch;
+ Half::Load3(ptr , &al, &bl, &cl);
+ Half::Load3(ptr + 3*N/2*sizeof(T), &ah, &bh, &ch);
+ *a = SkNx{al, ah};
+ *b = SkNx{bl, bh};
+ *c = SkNx{cl, ch};
+ }
AI static void Store4(void* vptr, const SkNx& a, const SkNx& b, const SkNx& c, const SkNx& d) {
auto ptr = (char*)vptr;
Half::Store4(ptr, a.fLo, b.fLo, c.fLo, d.fLo);
@@ -149,6 +159,12 @@ struct SkNx<1,T> {
*c = Load(ptr + 2*sizeof(T));
*d = Load(ptr + 3*sizeof(T));
}
+ AI static void Load3(const void* vptr, SkNx* a, SkNx* b, SkNx* c) {
+ auto ptr = (const char*)vptr;
+ *a = Load(ptr + 0*sizeof(T));
+ *b = Load(ptr + 1*sizeof(T));
+ *c = Load(ptr + 2*sizeof(T));
+ }
AI static void Store4(void* vptr, const SkNx& a, const SkNx& b, const SkNx& c, const SkNx& d) {
auto ptr = (char*)vptr;
a.store(ptr + 0*sizeof(T));
diff --git a/src/core/SkRasterPipeline.h b/src/core/SkRasterPipeline.h
index 949146cc2d..3d1bb88011 100644
--- a/src/core/SkRasterPipeline.h
+++ b/src/core/SkRasterPipeline.h
@@ -69,8 +69,9 @@
M(load_565) M(store_565) \
M(load_f16) M(store_f16) \
M(load_8888) M(store_8888) \
- M(load_u16_be) \
- M(load_tables) M(load_tables_u16_be) M(store_tables) \
+ M(load_u16_be) M(load_rgb_u16_be) \
+ M(load_tables_u16_be) M(load_tables_rgb_u16_be) \
+ M(load_tables) M(store_tables) \
M(scale_u8) M(scale_1_float) \
M(lerp_u8) M(lerp_565) M(lerp_1_float) \
M(dstatop) M(dstin) M(dstout) M(dstover) \
diff --git a/src/opts/SkNx_neon.h b/src/opts/SkNx_neon.h
index f39ef118b1..5671f71315 100644
--- a/src/opts/SkNx_neon.h
+++ b/src/opts/SkNx_neon.h
@@ -241,7 +241,12 @@ public:
*b = rgba.val[2];
*a = rgba.val[3];
}
-
+ AI static void Load3(const void* ptr, SkNx* r, SkNx* g, SkNx* b) {
+ uint16x4x3_t rgba = vld3_u16((const uint16_t*)ptr);
+ *r = rgba.val[0];
+ *g = rgba.val[1];
+ *b = rgba.val[2];
+ }
AI static void Store4(void* dst, const SkNx& r, const SkNx& g, const SkNx& b, const SkNx& a) {
uint16x4x4_t rgba = {{
r.fVec,
diff --git a/src/opts/SkNx_sse.h b/src/opts/SkNx_sse.h
index 5ef5eda3a9..3f981bc8c7 100644
--- a/src/opts/SkNx_sse.h
+++ b/src/opts/SkNx_sse.h
@@ -271,6 +271,22 @@ public:
*b = ba;
*a = _mm_srli_si128(ba, 8);
}
+ AI static void Load3(const void* ptr, SkNx* r, SkNx* g, SkNx* b) {
+ // The idea here is to get 4 vectors that are R G B _ _ _ _ _.
+ // The second load is at a funny location to make sure we don't read past
+ // the bounds of memory. This is fine, we just need to shift it a little bit.
+ const uint8_t* ptr8 = (const uint8_t*) ptr;
+ __m128i rgb0 = _mm_loadu_si128((const __m128i*) (ptr8 + 0));
+ __m128i rgb1 = _mm_srli_si128(rgb0, 3*2);
+ __m128i rgb2 = _mm_srli_si128(_mm_loadu_si128((const __m128i*) (ptr8 + 4*2)), 2*2);
+ __m128i rgb3 = _mm_srli_si128(rgb2, 3*2);
+
+ __m128i rrggbb01 = _mm_unpacklo_epi16(rgb0, rgb1);
+ __m128i rrggbb23 = _mm_unpacklo_epi16(rgb2, rgb3);
+ *r = _mm_unpacklo_epi32(rrggbb01, rrggbb23);
+ *g = _mm_srli_si128(r->fVec, 4*2);
+ *b = _mm_unpackhi_epi32(rrggbb01, rrggbb23);
+ }
AI static void Store4(void* dst, const SkNx& r, const SkNx& g, const SkNx& b, const SkNx& a) {
__m128i rg = _mm_unpacklo_epi16(r.fVec, g.fVec);
__m128i ba = _mm_unpacklo_epi16(b.fVec, a.fVec);
diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h
index 71a15c68a8..f496bd531c 100644
--- a/src/opts/SkRasterPipeline_opts.h
+++ b/src/opts/SkRasterPipeline_opts.h
@@ -591,6 +591,23 @@ STAGE_CTX(load_u16_be, const uint64_t**) {
a = (1.0f / 65535.0f) * SkNx_cast<float>((ah << 8) | (ah >> 8));
}
+STAGE_CTX(load_rgb_u16_be, const uint16_t**) {
+ auto ptr = *ctx + 3*x;
+ const void* src = ptr;
+ uint16_t buf[N*3] = {0};
+ if (tail) {
+ memcpy(buf, src, tail*3*sizeof(uint16_t));
+ src = buf;
+ }
+
+ SkNh rh, gh, bh;
+ SkNh::Load3(src, &rh, &gh, &bh);
+ r = (1.0f / 65535.0f) * SkNx_cast<float>((rh << 8) | (rh >> 8));
+ g = (1.0f / 65535.0f) * SkNx_cast<float>((gh << 8) | (gh >> 8));
+ b = (1.0f / 65535.0f) * SkNx_cast<float>((bh << 8) | (bh >> 8));
+ a = 1.0f;
+}
+
STAGE_CTX(load_tables, const LoadTablesContext*) {
auto ptr = (const uint32_t*)ctx->fSrc + x;
@@ -621,6 +638,25 @@ STAGE_CTX(load_tables_u16_be, const LoadTablesContext*) {
a = (1.0f / 65535.0f) * SkNx_cast<float>((ah << 8) | (ah >> 8));
}
+STAGE_CTX(load_tables_rgb_u16_be, const LoadTablesContext*) {
+ auto ptr = (const uint16_t*)ctx->fSrc + 3*x;
+ const void* src = ptr;
+ uint16_t buf[N*3] = {0};
+ if (tail) {
+ memcpy(buf, src, tail*3*sizeof(uint16_t));
+ src = buf;
+ }
+
+ SkNh rh, gh, bh;
+ SkNh::Load3(src, &rh, &gh, &bh);
+
+ // ctx->fSrc is big-endian, so "& 0xff" grabs the 8 most significant bits of each component.
+ r = gather(tail, ctx->fR, SkNx_cast<int>(rh & 0xff));
+ g = gather(tail, ctx->fG, SkNx_cast<int>(gh & 0xff));
+ b = gather(tail, ctx->fB, SkNx_cast<int>(bh & 0xff));
+ a = 1.0f;
+}
+
STAGE_CTX(store_tables, const StoreTablesContext*) {
auto ptr = ctx->fDst + x;