Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpha-blending of AA in OT #22

Merged
merged 38 commits into from
Nov 4, 2018
Merged

Alpha-blending of AA in OT #22

merged 38 commits into from
Nov 4, 2018

Conversation

NiLuJe
Copy link
Owner

@NiLuJe NiLuJe commented Nov 3, 2018

Using stbtt's alpha coverage mask when we have to...

c.f. the last few comments in #20


I'll let it sit for a while, because fire bad, tree pretty right now. >_<".

But it appeared to behave okay on 32bpp, 8bpp, and 4bpp (AAAAAAAAAARRRRRRRRRGGGGHHHH).

NiLuJe added 17 commits November 3, 2018 18:49
It's a few percent faster, bt not much ;).
To at least point to something useful everywhere, at least on
Kindle/Kobo.
Hard-coding a custom font with a Kobo-specific path wasn't the greatest
idea ;).
Can't exactly replicate the "invisible ink" behavior of the non-AA
rendering, but, eh.
I kind of broke stuff on 167 dpi screen with the dpi switch.
We in fact pretty much never want to use native cell sizes anywhere ;).
Can we please burn those with fire?
@NiLuJe
Copy link
Owner Author

NiLuJe commented Nov 3, 2018

I refrained from going crazy on the per-bpp branches like in the image codepath, because that was painful enough ;p.

In this context, it should just exchange fg <-> bg

Granted, now that we can set pen colors, making everything actually do a
real invert might make more sense...
Premultiply when it's a fixed color,
and use MUL255 otherwise.

Has a fairly neglibible impact, unlike DIV255 ;).
It now always actually inverts the color, instead of sometimes swapping
fb with bg

Because the latter no longer makes any sense now that we can actually
set those and they're no longer hardcoded to B&W...
We want to avoid dimensions larger than the screen, not the viewport ;).

Fix the 11px of the H2O viewport being chopped off a fullscreen_region,
leading to 11px not being updated at the bottom of the screen.
@NiLuJe NiLuJe merged commit 54f41da into master Nov 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants