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

AtlasEngine: Fix inverted cursor alpha #12548

Merged
1 commit merged into from
Feb 22, 2022
Merged

AtlasEngine: Fix inverted cursor alpha #12548

1 commit merged into from
Feb 22, 2022

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Feb 21, 2022

The previous implementation only inverted the RGB values of the cell,
but failed to account for situations where the color is transparent,
which is the case when backgroundOpaqueMixin is 0 (for instance if
acrylic backgrounds are enabled). In these situations the alpha
component remained 0 which caused the cursor to be invisible.

For some inexplicable reason this issue is only visible on a HDR display,
even though it should also effect regular ones. God knows why.

With this commit the cursor texture is treated as a mask that inverts the color.
We use branching here, because I couldn't come up with a more clever solution.

PR Checklist

Validation Steps Performed

  • Cursor is visible on a HDR display with acrylic background ✅
  • TBD performance benchmark for [branch]

@ghost ghost added Area-AtlasEngine Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Feb 21, 2022
@lhecker lhecker added the AutoMerge Marked for automatic merge by the bot when requirements are met label Feb 22, 2022
@ghost
Copy link

ghost commented Feb 22, 2022

Hello @lhecker!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 9ab4abf into main Feb 22, 2022
@ghost ghost deleted the dev/lhecker/12507-hdr-cursor branch February 22, 2022 18:11
@DHowett DHowett added the zPreview-Service-Queued-1.13 A floating label that tracks the current Preview version for servicing purposes. label Feb 22, 2022
DHowett pushed a commit that referenced this pull request Mar 10, 2022
The previous implementation only inverted the RGB values of the cell,
but failed to account for situations where the `color` is transparent,
which is the case when `backgroundOpaqueMixin` is 0 (for instance if
acrylic backgrounds are enabled). In these situations the alpha
component remained 0 which caused the cursor to be invisible.

For some inexplicable reason this issue is only visible on a HDR display,
even though it should also effect regular ones. God knows why.

With this commit the cursor texture is treated as a mask that inverts the color.
We use branching here, because I couldn't come up with a more clever solution.

## PR Checklist
* [x] Closes #12507
* [x] I work here
* [x] Tests added/passed

## Validation Steps Performed
* Cursor is visible on a HDR display with acrylic background ✅
* TBD performance benchmark for `[branch]` ❌

(cherry picked from commit 9ab4abf)
@ghost
Copy link

ghost commented Mar 25, 2022

🎉Windows Terminal Preview v1.13.1073 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AtlasEngine AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. zPreview-Service-Queued-1.13 A floating label that tracks the current Preview version for servicing purposes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing cursor when experimental text rendering engine is enabled in HDR enabled monitor
4 participants