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

FB: Refactor refresh rectangle bounding checks #1718

Merged
merged 15 commits into from
Jan 12, 2024

Conversation

NiLuJe
Copy link
Member

@NiLuJe NiLuJe commented Dec 31, 2023

koreader/koreader#11303 showed that the current alignment trickery for HW dithering on mxcfb was a bit shoddy, so refactor the whole thing to do everything at once, in a function actually designed for that use case, instead of re-purposing a blitting helper...


This change is Reviewable

Will replace our funky checkBounds use-cases where we actually want to
fit a rectangel inside a bb, without actually relying on half the
checkBounds feature, which are designed for ccordinates checking when
blitting.

Fold in support for alignment constraints, which allow us to make sure
they don't do stupid things that would break OOB, as was experienced on
Bellatrix3...
mandatory)

I hadn't consciously dropped the nil guards, but turns out it makes
sense, because UIManager will *always* set them.

Thanks to @mergen3107 foir catching that one early ;)
It doesn't actually do anything with the dimensions, nor should it given
its name...
Which does what getScreenMode probably meant to be doing, i.e., returns
the layout relative to the rotation, not how the buffer actually looks
like ;).
NiLuJe added a commit to NiLuJe/koreader that referenced this pull request Dec 31, 2023
Pending the actual fix from
koreader/koreader-base#1718 that'll hit after
the release.
NiLuJe added a commit to NiLuJe/koreader that referenced this pull request Dec 31, 2023
Pending the actual fix from
koreader/koreader-base#1718 that'll hit after
the release.
NiLuJe added a commit to NiLuJe/koreader that referenced this pull request Dec 31, 2023
Pending the actual fix from
koreader/koreader-base#1718 that'll hit after
the release.
NiLuJe added a commit to NiLuJe/koreader that referenced this pull request Dec 31, 2023
Pending the actual fix from
koreader/koreader-base#1718 that'll hit after
the release.
NiLuJe added a commit to NiLuJe/koreader that referenced this pull request Dec 31, 2023
Pending the actual fix from
koreader/koreader-base#1718 that'll hit after
the release.
NiLuJe added 5 commits January 4, 2024 03:21
We need to rotate our shadow before *before* inverting it, otherwise we
will paint in the wrong orientation, potentially to off-screen regions
if a viewport is in effect.
accurate

It's also not actually the physical rect, as the rectangle honors rotation,
while the physical buffer layout is always unrotated.
I clearly need more sleep.
NiLuJe added a commit to koreader/koreader that referenced this pull request Jan 9, 2024
Pending the actual fix from
koreader/koreader-base#1718 that'll hit after
the release.
Copy link
Member Author

@NiLuJe NiLuJe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @NiLuJe)

@NiLuJe NiLuJe merged commit 5f9b9b6 into koreader:master Jan 12, 2024
3 checks passed
NiLuJe added a commit to NiLuJe/koreader that referenced this pull request Jan 12, 2024
NiLuJe added a commit to koreader/koreader that referenced this pull request Jan 12, 2024
* UIManager: Init a full Geom on region-less refreshes in _refresh
* Never call refreshFull with no arguments
  I got rid of the low-level nil guards, because UIManager itself guarantees that it can never happen
* Bump base (koreader/koreader-base#1718) (fix #11303)
* Kindle: Re-enable HW dithering on the Scribe
  Now that the underlying issue is fixed in base ;).
NiLuJe added a commit to NiLuJe/koreader-base that referenced this pull request Jan 13, 2024
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.

1 participant