[PR #13102] [MERGED] Add support for line renditions in the DX renderer #29395

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13102
Author: @j4james
Created: 5/14/2022
Status: Merged
Merged: 5/18/2022
Merged by: @undefined

Base: mainHead: feature-dx-line-attributes


📝 Commits (2)

  • 86d19bc Add support for line renditions in DX renderer.
  • 2c23c31 Make the audit build happy.

📊 Changes

4 files changed (+106 additions, -3 deletions)

View changed files

📝 src/renderer/dx/CustomTextRenderer.cpp (+7 -2)
📝 src/renderer/dx/CustomTextRenderer.h (+5 -1)
📝 src/renderer/dx/DxRenderer.cpp (+86 -0)
📝 src/renderer/dx/DxRenderer.hpp (+8 -0)

📄 Description

This PR adds support for the VT line rendition attributes in the DirectX
renderer, which allows for double-width and double-height line
renditions.

Line renditions were first implemented in conhost (with the GDI
renderer) in PR #8664. Supporting them in the DX renderer now is a
small step towards #11595.

The DX implementation is very similar to the GDI one. When a particular
line rendition is requested, we create a transform that is applied to
the render target. And in the case of double-height renditions, we also
initialize some clipping offsets to allow for the fact that we only
render half of a line at a time.

One additional complication exists when drawing the cursor, which
requires a two part process where it first renders to a command list,
and then draw the command list in a second step. We need to temporarily
reset the transform in that first stage otherwise it ends up being
applied twice.

I've manually tested the renderer in conhost by setting the UseDx
registry entry and confirmed that it passes the Vttest double-size
tests as well as several of my own tests. I've also checked that the
renderer can now handle horizontal scrolling, which is a feature we get
for free with the transforms.


🔄 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/13102 **Author:** [@j4james](https://github.com/j4james) **Created:** 5/14/2022 **Status:** ✅ Merged **Merged:** 5/18/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `feature-dx-line-attributes` --- ### 📝 Commits (2) - [`86d19bc`](https://github.com/microsoft/terminal/commit/86d19bcbec3a4e6a86d85f46dc50c0e0692b2bc6) Add support for line renditions in DX renderer. - [`2c23c31`](https://github.com/microsoft/terminal/commit/2c23c31d2fdf9528a075da44999ba64b375efb50) Make the audit build happy. ### 📊 Changes **4 files changed** (+106 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/renderer/dx/CustomTextRenderer.cpp` (+7 -2) 📝 `src/renderer/dx/CustomTextRenderer.h` (+5 -1) 📝 `src/renderer/dx/DxRenderer.cpp` (+86 -0) 📝 `src/renderer/dx/DxRenderer.hpp` (+8 -0) </details> ### 📄 Description This PR adds support for the VT line rendition attributes in the DirectX renderer, which allows for double-width and double-height line renditions. Line renditions were first implemented in conhost (with the GDI renderer) in PR #8664. Supporting them in the DX renderer now is a small step towards #11595. The DX implementation is very similar to the GDI one. When a particular line rendition is requested, we create a transform that is applied to the render target. And in the case of double-height renditions, we also initialize some clipping offsets to allow for the fact that we only render half of a line at a time. One additional complication exists when drawing the cursor, which requires a two part process where it first renders to a command list, and then draw the command list in a second step. We need to temporarily reset the transform in that first stage otherwise it ends up being applied twice. I've manually tested the renderer in conhost by setting the `UseDx` registry entry and confirmed that it passes the _Vttest_ double-size tests as well as several of my own tests. I've also checked that the renderer can now handle horizontal scrolling, which is a feature we get for free with the transforms. --- <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:34:38 +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#29395