| Summary: | Extended Color: ColorMatrix should support smaller matrices and be constexpr | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||||||||||||||||
| Component: | Platform | Assignee: | Sam Weinig <sam> | ||||||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||||||
| Severity: | Normal | CC: | dino, ews-watchlist, kondapallykalyan, simon.fraser, webkit-bug-importer | ||||||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||||||
| OS: | Unspecified | ||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||
|
Description
Sam Weinig
2020-05-28 10:35:41 PDT
Created attachment 400476 [details]
proof of concept
Here is a proof-of-concept. Not sure if the actual matrix match is 100% right yet, but the code nicely compiles down to:
:-) samweinig:~> otool -Vx a.out
a.out:
(__TEXT,__text) section
_main:
0000000100000f4a pushq %rbp
0000000100000f4b movq %rsp, %rbp
0000000100000f4e leaq 0x53(%rip), %rdi ## literal pool for: "%f, %f, %f, %f\n"
0000000100000f55 movsd 0x3b(%rip), %xmm0
0000000100000f5d movsd 0x3b(%rip), %xmm3
0000000100000f65 movaps %xmm0, %xmm1
0000000100000f68 movaps %xmm0, %xmm2
0000000100000f6b movb $0x4, %al
0000000100000f6d callq 0x100000f76 ## symbol stub for: _printf
0000000100000f72 xorl %eax, %eax
0000000100000f74 popq %rbp
0000000100000f75 retq
when compiled with `clang++ -std=c++17 -Os matrix.cpp`
Created attachment 400477 [details]
matrix.cpp
Created attachment 400482 [details]
proof of concept
This is awesome. Our Color Team is on fire these days. Created attachment 400504 [details]
Patch
Created attachment 400521 [details]
Patch
Created attachment 400532 [details]
Patch
Created attachment 400585 [details]
Patch
Created attachment 400596 [details]
Patch
Committed r262304: <https://trac.webkit.org/changeset/262304> All reviewed patches have been landed. Closing bug and clearing flags on attachment 400596 [details]. |