Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport subpixel antialiasing of text #464
Comments
|
So to support this we need to do blending with a rgb mask. There are some different strategies to do so:
Skia will use any of 1-3 depending on the capabilities of the hardware. Cairo uses 4. |
|
I confirmed today that Direct2D uses approach 1. |
|
I'll start on this next week. |
|
Seems like an exciting task to do! If our goal is just to measure performance, we might as well just enable blending and output all the text as non-opaque for the worst case, as a quick test. |
|
Not sure if it's available on the systems webrender is targeting, but the gl::BlendFunc(gl::SRC1_COLOR, gl::ONE_MINUS_SRC1_COLOR);and then a per-channel mask can be output from the fragment shader in addition to the fragment color. |
|
The initial implementation of this has landed in WR/Servo now - enable with -Z enable-subpixel-aa to test. @jrmuizel Are you fine with closing this and we'll open more fine grained issues for the remaining subpixel work? |
|
Yep. |
Getting this done is will be important for getting more accurate performance numbers as it has a potentially negative impact on performance.