|
Refactor Sk2x<T> + Sk4x<T> into SkNf<N,T> and SkNi<N,T>
The primary feature this delivers is SkNf and SkNd for arbitrary power-of-two N. Non-specialized types or types larger than 128 bits should now Just Work (and we can drop in a specialization to make them faster). Sk4s is now just a typedef for SkNf<4, SkScalar>; Sk4d is SkNf<4, double>, Sk2f SkNf<2, float>, etc.
This also makes implementing new specializations easier and more encapsulated. We're now using template specialization, which means the specialized versions don't have to leak out so much from SkNx_sse.h and SkNx_neon.h.
This design leaves us room to grow up, e.g to SkNf<8, SkScalar> == Sk8s, and to grown down too, to things like SkNi<8, uint16_t> == Sk8h.
To simplify things, I've stripped away most APIs (swizzles, casts, reinterpret_casts) that no one's using yet. I will happily add them back if they seem useful.
You shouldn't feel bad about using any of the typedef Sk4s, Sk4f, Sk4d, Sk2s, Sk2f, Sk2d, Sk4i, etc. Here's how you should feel:
- Sk4f, Sk4s, Sk2d: feel awesome
- Sk2f, Sk2s, Sk4d: feel pretty good
No public API changes.
TBR=reed@google.com
BUG= skia:3592
Committed: https://skia.googlesource.com/skia/+/c9adb05b64fa0bfadf9d1a782afcda470da68c9e
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+794 lines, -1338 lines) |
Patch |
|
M |
bench/PMFloatBench.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
gyp/tests.gypi
|
View
|
1
2
3
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
include/effects/SkColorMatrixFilter.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/core/Sk2x.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+0 lines, -96 lines |
0 comments
|
Download
|
|
M |
src/core/Sk4x.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+0 lines, -123 lines |
0 comments
|
Download
|
|
M |
src/core/SkGeometry.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/core/SkMatrix.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
6 chunks |
+17 lines, -17 lines |
0 comments
|
Download
|
|
M |
src/core/SkNx.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
1 chunk |
+173 lines, -1 line |
0 comments
|
Download
|
|
M |
src/core/SkPMFloat.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
3 chunks |
+28 lines, -40 lines |
0 comments
|
Download
|
|
M |
src/core/SkRect.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
2 chunks |
+10 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/effects/SkColorMatrixFilter.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
4 chunks |
+15 lines, -15 lines |
0 comments
|
Download
|
|
D |
src/opts/Sk2x_neon.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -158 lines |
0 comments
|
Download
|
|
D |
src/opts/Sk2x_none.h
|
View
|
|
1 chunk |
+0 lines, -72 lines |
0 comments
|
Download
|
|
D |
src/opts/Sk2x_sse.h
|
View
|
|
1 chunk |
+0 lines, -82 lines |
0 comments
|
Download
|
|
D |
src/opts/Sk4x_neon.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -166 lines |
0 comments
|
Download
|
|
D |
src/opts/Sk4x_none.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -120 lines |
0 comments
|
Download
|
|
D |
src/opts/Sk4x_sse.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -177 lines |
0 comments
|
Download
|
|
A |
src/opts/SkNx_neon.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
1 chunk |
+257 lines, -0 lines |
0 comments
|
Download
|
|
A |
src/opts/SkNx_sse.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
1 chunk |
+190 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/opts/SkPMFloat_SSE2.h
|
View
|
1
2
3
4
5
6
|
4 chunks |
+6 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/opts/SkPMFloat_SSSE3.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
4 chunks |
+7 lines, -12 lines |
0 comments
|
Download
|
|
M |
src/opts/SkPMFloat_neon.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
3 chunks |
+3 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/opts/SkPMFloat_none.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
tests/PMFloatTest.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
D |
tests/Sk2xTest.cpp
|
View
|
|
1 chunk |
+0 lines, -68 lines |
0 comments
|
Download
|
|
D |
tests/Sk4xTest.cpp
|
View
|
1
2
3
|
1 chunk |
+0 lines, -145 lines |
0 comments
|
Download
|
|
A |
tests/SkNxTest.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1 chunk |
+78 lines, -0 lines |
0 comments
|
Download
|
Total messages: 32 (13 generated)
|