[PR #6527] [MERGED] Use D2DDeviceContext and friends over D2DRenderTarget #26723

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/6527
Author: @miniksa
Created: 6/15/2020
Status: Merged
Merged: 6/19/2020
Merged by: @undefined

Base: masterHead: dev/miniksa/d2ddevice


📝 Commits (5)

  • c1b301f Move to D2DDevice, D2DDeviceContext, D2DBitmap for setting up our render pipeline.
  • 42500f6 improve resize refresh by not recreating device context and only letting go of the bitmap since we have that separated now with the move from rendertarget (where it was combined.)
  • 06cf0e9 code format
  • 04c445f static analysis.
  • 3021f11 zero the swap chain desc on construction and on re-use. static constexpr the enum helper.

📊 Changes

2 files changed (+110 additions, -63 deletions)

View changed files

📝 src/renderer/dx/DxRenderer.cpp (+97 -58)
📝 src/renderer/dx/DxRenderer.hpp (+13 -5)

📄 Description

I was told that the DeviceContext version supercedes the RenderTarget
one. This moves us to it so we can gain access to a higher level of
control over the various pieces in our pipeline as we continue to evolve
the renderer.

The underlying motivation here is to potentially use a
ID2D1CommandList to batch our commands and run them all later outside
the lock. That can only really be done with this more granular level of
control over the pipeline. So this moves to that in a single step that
is easily findable in history should we have problems

I discussed this with @NiklasBorson of the Direct2D/DirectWrite team as
well as with @DHowett before doing it.

Validation

  • Checked docs to make sure that these work on Windows 7 with
    Platform Update
  • Manual smoke test real quick
  • Try running on Win7 + Platform Update after change
  • Probably do more than just a smoke test manually or otherwise

Closes #6525


🔄 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/6527 **Author:** [@miniksa](https://github.com/miniksa) **Created:** 6/15/2020 **Status:** ✅ Merged **Merged:** 6/19/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/miniksa/d2ddevice` --- ### 📝 Commits (5) - [`c1b301f`](https://github.com/microsoft/terminal/commit/c1b301f15adca7d187105c4fb495afbaee063445) Move to D2DDevice, D2DDeviceContext, D2DBitmap for setting up our render pipeline. - [`42500f6`](https://github.com/microsoft/terminal/commit/42500f6585ff39d86bd4bae8c5ebb608a602ca05) improve resize refresh by not recreating device context and only letting go of the bitmap since we have that separated now with the move from rendertarget (where it was combined.) - [`06cf0e9`](https://github.com/microsoft/terminal/commit/06cf0e9f3fab5693ece67549ea403b2c362d0df0) code format - [`04c445f`](https://github.com/microsoft/terminal/commit/04c445f2b11eb29bd84930df357b14cd78168fe8) static analysis. - [`3021f11`](https://github.com/microsoft/terminal/commit/3021f11a93bc6f4230ec5d6078e88ee2ab7a25ff) zero the swap chain desc on construction and on re-use. static constexpr the enum helper. ### 📊 Changes **2 files changed** (+110 additions, -63 deletions) <details> <summary>View changed files</summary> 📝 `src/renderer/dx/DxRenderer.cpp` (+97 -58) 📝 `src/renderer/dx/DxRenderer.hpp` (+13 -5) </details> ### 📄 Description I was told that the DeviceContext version supercedes the RenderTarget one. This moves us to it so we can gain access to a higher level of control over the various pieces in our pipeline as we continue to evolve the renderer. The underlying motivation here is to potentially use a `ID2D1CommandList` to batch our commands and run them all later outside the lock. That can only really be done with this more granular level of control over the pipeline. So this moves to that in a single step that is easily findable in history should we have problems I discussed this with @NiklasBorson of the Direct2D/DirectWrite team as well as with @DHowett before doing it. ## Validation - [x] Checked docs to make sure that these work on Windows 7 with Platform Update - [x] Manual smoke test real quick - [x] Try running on Win7 + Platform Update after change - [x] Probably do more than just a smoke test manually or otherwise Closes #6525 --- <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:17:45 +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#26723