[PR #13607] [MERGED] AtlasEngine: Fix LRU state after scrolling #29647

Open
opened 2026-01-31 09:36:07 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13607
Author: @lhecker
Created: 7/27/2022
Status: Merged
Merged: 7/27/2022
Merged by: @undefined

Base: mainHead: dev/lhecker/atlas-engine-fixup


📝 Commits (2)

  • 155bbcb AtlasEngine: Fix LRU state after scrolling
  • c055150 Fix AuditMode checks

📊 Changes

3 files changed (+21 additions, -10 deletions)

View changed files

📝 src/renderer/atlas/AtlasEngine.api.cpp (+1 -0)
📝 src/renderer/atlas/AtlasEngine.cpp (+19 -10)
📝 src/renderer/atlas/AtlasEngine.r.cpp (+1 -0)

📄 Description

66f4f9d had another bug: Just like how we scroll our viewport by memmoveing
the _r.cells array, we also have to memmove the new _r.cellGlyphMapping.
Without this fix drawing lots of glyphs while only scrolling slightly
(= not invalidating the entire viewport), would erroneously call
makeNewest on glyphs now outside of the viewport. This would cause
actually visible glyphs to be recycled and overwritten by new ones.

Validation Steps Performed

  • Switch to Cascadia Code
  • Print some text that fills the glyph atlas
  • Scroll down by a few rows
  • Write a long "==========" ligature (this quickly fills up
    any remaining space in the atlas and exacerbates the issue)
  • Unrelated rows don't get corrupted

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/13607 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 7/27/2022 **Status:** ✅ Merged **Merged:** 7/27/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/atlas-engine-fixup` --- ### 📝 Commits (2) - [`155bbcb`](https://github.com/microsoft/terminal/commit/155bbcb75d743aaf9ddb8f1c9e328ad95fb57385) AtlasEngine: Fix LRU state after scrolling - [`c055150`](https://github.com/microsoft/terminal/commit/c055150cd2bd3bdb61fce2689d071b9e1fb22913) Fix AuditMode checks ### 📊 Changes **3 files changed** (+21 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/renderer/atlas/AtlasEngine.api.cpp` (+1 -0) 📝 `src/renderer/atlas/AtlasEngine.cpp` (+19 -10) 📝 `src/renderer/atlas/AtlasEngine.r.cpp` (+1 -0) </details> ### 📄 Description 66f4f9d had another bug: Just like how we scroll our viewport by `memmove`ing the `_r.cells` array, we also have to `memmove` the new `_r.cellGlyphMapping`. Without this fix drawing lots of glyphs while only scrolling slightly (= not invalidating the entire viewport), would erroneously call `makeNewest` on glyphs now outside of the viewport. This would cause actually visible glyphs to be recycled and overwritten by new ones. ## Validation Steps Performed * Switch to Cascadia Code * Print some text that fills the glyph atlas * Scroll down by a few rows * Write a long "==========" ligature (this quickly fills up any remaining space in the atlas and exacerbates the issue) * Unrelated rows don't get corrupted ✅ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:36:07 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29647