-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
AtlasEngine: Fix dirty rects during scrolling #17583
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get why a bunch of offsets are -1, but I think I understand why bumping the generation every time we scroll is bad?
@@ -325,7 +325,7 @@ CATCH_RETURN() | |||
|
|||
[[nodiscard]] HRESULT AtlasEngine::PrepareLineTransform(const LineRendition lineRendition, const til::CoordType targetRow, const til::CoordType viewportLeft) noexcept | |||
{ | |||
const auto y = gsl::narrow_cast<u16>(clamp<til::CoordType>(targetRow, 0, _p.s->viewportCellCount.y)); | |||
const auto y = gsl::narrow_cast<u16>(clamp<til::CoordType>(targetRow, 0, _p.s->viewportCellCount.y - 1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1?
/azp run |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
Even so, it kicked off the build lol. |
/azp run |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I concur about the -1
thing
I've updated the PR description to explain why the |
This regressed in #15707. By having the
viewportOffset
on theSettings
object we accidentally invalidate the entire viewportevery time it scrolls. That doesn't break anything of course,
but it's better to prevent this.
This PR additionally contains a fix for clamping the y coordinates
coming from
Renderer
: SinceviewportCellCount.y
is a count andthus exclusive, but clamp's max is inclusive, we must subtract 1.