Skip to content

Commit e05b2bb

Browse files
committed
Merge branch 'main' into dev/migrie/f/sui-panes
2 parents ef560bf + 75dea24 commit e05b2bb

File tree

191 files changed

+2583
-3143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+2583
-3143
lines changed

.github/actions/spelling/expect/expect.txt

+3
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ FECF
597597
FEEF
598598
fesb
599599
FFAF
600+
ffd
600601
FFDE
601602
FFFDb
602603
fgbg
@@ -757,6 +758,7 @@ hdr
757758
HDROP
758759
hdrstop
759760
HEIGHTSCROLL
761+
hfind
760762
hfont
761763
hfontresource
762764
hglobal
@@ -1155,6 +1157,7 @@ NOCONTEXTHELP
11551157
NOCOPYBITS
11561158
NODUP
11571159
noexcepts
1160+
NOFONT
11581161
NOINTEGRALHEIGHT
11591162
NOINTERFACE
11601163
NOLINKINFO

doc/cascadia/profiles.schema.json

+12-8
Original file line numberDiff line numberDiff line change
@@ -2332,12 +2332,20 @@
23322332
},
23332333
"type": "array"
23342334
},
2335-
"experimental.rendering.forceFullRepaint": {
2336-
"description": "When set to true, we will redraw the entire screen each frame. When set to false, we will render only the updates to the screen between frames.",
2335+
"rendering.graphicsAPI": {
2336+
"description": "Direct3D 11 provides a more performant and feature-rich experience, whereas Direct2D is more stable. The default option \"Automatic\" will pick the API that best fits your graphics hardware. If you experience significant issues, consider using Direct2D.",
2337+
"type": "string",
2338+
"enum": [
2339+
"direct2d",
2340+
"direct3d11"
2341+
]
2342+
},
2343+
"rendering.disablePartialInvalidation": {
2344+
"description": "By default, the text renderer uses a FLIP_SEQUENTIAL Swap Chain and declares dirty rectangles via the Present1 API. When this setting is enabled, a FLIP_DISCARD Swap Chain will be used instead, and no dirty rectangles will be declared. Whether one or the other is better depends on your hardware and various other factors.",
23372345
"type": "boolean"
23382346
},
2339-
"experimental.rendering.software": {
2340-
"description": "When set to true, we will use the software renderer (a.k.a. WARP) instead of the hardware one.",
2347+
"rendering.software": {
2348+
"description": "When enabled, the terminal will use a software rasterizer (WARP). This setting should be left disabled under almost all circumstances.",
23412349
"type": "boolean"
23422350
},
23432351
"experimental.input.forceVT": {
@@ -2769,10 +2777,6 @@
27692777
"description": "When set to true, prompts will automatically be marked.",
27702778
"type": "boolean"
27712779
},
2772-
"experimental.connection.passthroughMode": {
2773-
"description": "When set to true, directs the PTY for this connection to use pass-through mode instead of the original Conhost PTY simulation engine. This is an experimental feature, and its continued existence is not guaranteed.",
2774-
"type": "boolean"
2775-
},
27762780
"experimental.retroTerminalEffect": {
27772781
"description": "When set to true, enable retro terminal effects. This is an experimental feature, and its continued existence is not guaranteed.",
27782782
"type": "boolean"

src/buffer/out/TextColor.cpp

+7-14
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ bool TextColor::CanBeBrightened() const noexcept
6262
return IsIndex16() || IsDefault();
6363
}
6464

65+
ColorType TextColor::GetType() const noexcept
66+
{
67+
return _meta;
68+
}
69+
6570
bool TextColor::IsLegacy() const noexcept
6671
{
6772
return (IsIndex16() || IsIndex256()) && _index < 16;
@@ -202,7 +207,7 @@ COLORREF TextColor::GetColor(const std::array<COLORREF, TextColor::TABLE_SIZE>&
202207
// the result will be something like 0b00100000.
203208
// 5. Use BitScanForward (bsf) to find the index of the most significant 1 bit.
204209
const auto haystack = _mm256_loadu_si256(reinterpret_cast<const __m256i*>(colorTable.data())); // 1.
205-
const auto needle = _mm256_set1_epi32(til::bit_cast<int>(defaultColor)); // 2.
210+
const auto needle = _mm256_set1_epi32(std::bit_cast<int>(defaultColor)); // 2.
206211
const auto result = _mm256_cmpeq_epi32(haystack, needle); // 3.
207212
const auto mask = _mm256_movemask_ps(_mm256_castsi256_ps(result)); // 4.
208213
unsigned long index;
@@ -219,7 +224,7 @@ COLORREF TextColor::GetColor(const std::array<COLORREF, TextColor::TABLE_SIZE>&
219224
// --> the index returned by _BitScanForward must be divided by 2.
220225
const auto haystack1 = _mm_loadu_si128(reinterpret_cast<const __m128i*>(colorTable.data() + 0));
221226
const auto haystack2 = _mm_loadu_si128(reinterpret_cast<const __m128i*>(colorTable.data() + 4));
222-
const auto needle = _mm_set1_epi32(til::bit_cast<int>(defaultColor));
227+
const auto needle = _mm_set1_epi32(std::bit_cast<int>(defaultColor));
223228
const auto result1 = _mm_cmpeq_epi32(haystack1, needle);
224229
const auto result2 = _mm_cmpeq_epi32(haystack2, needle);
225230
const auto result = _mm_packs_epi32(result1, result2); // 3.5
@@ -280,15 +285,3 @@ BYTE TextColor::GetLegacyIndex(const BYTE defaultIndex) const noexcept
280285
return til::at(CompressedRgbToIndex16, compressedRgb);
281286
}
282287
}
283-
284-
// Method Description:
285-
// - Return a COLORREF containing our stored value. Will return garbage if this
286-
//attribute is not a RGB attribute.
287-
// Arguments:
288-
// - <none>
289-
// Return Value:
290-
// - a COLORREF containing our stored value
291-
COLORREF TextColor::GetRGB() const noexcept
292-
{
293-
return RGB(_red, _green, _blue);
294-
}

src/buffer/out/TextColor.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ struct TextColor
119119
}
120120

121121
bool CanBeBrightened() const noexcept;
122+
ColorType GetType() const noexcept;
122123
bool IsLegacy() const noexcept;
123124
bool IsIndex16() const noexcept;
124125
bool IsIndex256() const noexcept;
@@ -133,12 +134,11 @@ struct TextColor
133134
COLORREF GetColor(const std::array<COLORREF, TABLE_SIZE>& colorTable, const size_t defaultIndex, bool brighten = false) const noexcept;
134135
BYTE GetLegacyIndex(const BYTE defaultIndex) const noexcept;
135136

136-
constexpr BYTE GetIndex() const noexcept
137-
{
138-
return _index;
139-
}
140-
141-
COLORREF GetRGB() const noexcept;
137+
constexpr BYTE GetIndex() const noexcept { return _index; }
138+
constexpr BYTE GetR() const noexcept { return _red; }
139+
constexpr BYTE GetG() const noexcept { return _green; }
140+
constexpr BYTE GetB() const noexcept { return _blue; }
141+
constexpr COLORREF GetRGB() const noexcept { return RGB(_red, _green, _blue); }
142142

143143
static constexpr BYTE TransposeLegacyIndex(const size_t index)
144144
{

0 commit comments

Comments
 (0)