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

Render row-by-row instead of invalidating entire screen #5185

Merged
30 commits merged into from
Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7e8f039
Start moving dx renderer onto bitmap.
miniksa Mar 23, 2020
b46b5d0
it works!
miniksa Mar 23, 2020
78c1bc1
try to get present1 working and get mad because std::vector<bool> is …
miniksa Mar 23, 2020
39d67e3
Merge branch 'master' into dev/miniksa/dx_bitmap
miniksa Mar 30, 2020
777524a
Change invalidation to full rows to restore ligature drawing.
miniksa Mar 30, 2020
a15af9b
Add tests for til and round out the operators.
miniksa Mar 30, 2020
ac01c0b
code format
miniksa Mar 30, 2020
c478983
code format and audit mode.
miniksa Mar 31, 2020
f39b352
Dustin's suggestion about helper for invalidating rectangles .
miniksa Apr 1, 2020
0d863c2
Fix selection issues.
miniksa Apr 1, 2020
ea8e379
Restore scrolling by appropriately scaling dirty rectangles from cell…
miniksa Apr 1, 2020
1d72e6b
Don't redraw everything. We're competent enough at scrolling in the D…
miniksa Apr 1, 2020
1d51d86
Report the delta when scroll buffer circles as there is no implicit v…
miniksa Apr 3, 2020
b8c66dd
Invalidate all with retro terminal effects experimental feature turne…
miniksa Apr 3, 2020
1e5e4eb
Don't use incremental drawing parameters on the first frame. Just use…
miniksa Apr 3, 2020
46e526c
Add compensation for High DPI. Not perfect but way better.
miniksa Apr 6, 2020
f11c7a1
Remove unused constructor in float. Add scale tests to Rectangle (rem…
miniksa Apr 8, 2020
162b516
Tests for rectangle constructors from floats + code formatting pass.
miniksa Apr 8, 2020
45f8144
change to constexpr
miniksa Apr 8, 2020
351dc9c
GetClient for composition now uses size scale factor directly (and I …
miniksa Apr 8, 2020
d42f609
Adjust the present1/present logic so it will retry if present1 fails …
miniksa Apr 10, 2020
3e060e6
Literally clear everything, including the gutters, when the complete …
miniksa Apr 10, 2020
4eddc8d
Fix selection invalidation issues. This was always broken but the nat…
miniksa Apr 10, 2020
f22577d
Fix issue with algorithm around re-using known previous viewport as r…
miniksa Apr 10, 2020
f4b39ec
code format
miniksa Apr 10, 2020
8abf479
Use GDI Classic measuring mode to eliminate blended half-pixels at th…
miniksa Apr 10, 2020
d0e6dd1
separate concerns between updating viewport and scrolling.
miniksa Apr 10, 2020
b06720a
Disable incremental for High DPI as it doesn't work with the implicit…
miniksa Apr 10, 2020
1207e80
Put natural rendering back.
miniksa Apr 10, 2020
24ecd5b
Actually lock in selection code so it doesn't pull the rug out from u…
miniksa Apr 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cascadia/TerminalCore/Terminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ void Terminal::_AdjustCursorPosition(const COORD proposedPosition)

if (notifyScroll)
{
// TODO: don't do this, thanks migrie
miniksa marked this conversation as resolved.
Show resolved Hide resolved
miniksa marked this conversation as resolved.
Show resolved Hide resolved
_buffer->GetRenderTarget().TriggerRedrawAll();
_NotifyScrollEvent();
}
Expand Down
2 changes: 1 addition & 1 deletion src/inc/til.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include "til/some.h"
#include "til/size.h"
#include "til/point.h"
#include "til/rectangle.h"
#include "til/operators.h"
#include "til/rectangle.h"
miniksa marked this conversation as resolved.
Show resolved Hide resolved
#include "til/bitmap.h"
#include "til/u8u16convert.h"

Expand Down
11 changes: 8 additions & 3 deletions src/inc/til/bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
THROW_HR_IF(E_INVALIDARG, !_rc.contains(pt));
_runs.reset(); // reset cached runs on any non-const method

til::at(_bits, _rc.index_of(pt)) = true;
_bits.set(_rc.index_of(pt));

_dirty |= til::rectangle{ pt };
}
Expand All @@ -283,9 +283,9 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
THROW_HR_IF(E_INVALIDARG, !_rc.contains(rc));
_runs.reset(); // reset cached runs on any non-const method

for (const auto pt : rc)
for (auto row = rc.top(); row < rc.bottom(); ++row)
{
til::at(_bits, _rc.index_of(pt)) = true;
_bits.set(_rc.index_of(til::point{ rc.left(), row }), rc.width(), true);
}

_dirty |= rc;
Expand Down Expand Up @@ -378,6 +378,11 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return _dirty == _rc;
}

constexpr til::size size() const noexcept
miniksa marked this conversation as resolved.
Show resolved Hide resolved
{
return _sz;
}

std::wstring to_string() const
{
std::wstringstream wss;
Expand Down
4 changes: 0 additions & 4 deletions src/inc/til/operators.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

#pragma once

#include "rectangle.h"
#include "size.h"
#include "bitmap.h"

namespace til // Terminal Implementation Library. Also: "Today I Learned"
{
// Operators go here when they involve two headers that can't/don't include each other.
Expand Down
30 changes: 26 additions & 4 deletions src/inc/til/rectangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

#pragma once

#include "point.h"
#include "size.h"
#include "some.h"

#ifdef UNIT_TESTING
class RectangleTests;
#endif
Expand Down Expand Up @@ -636,6 +632,32 @@ namespace til // Terminal Implementation Library. Also: "Today I Learned"
return *this;
}

// MUL will scale the entire rectangle up by the size factor
rectangle operator*(const size& size)
miniksa marked this conversation as resolved.
Show resolved Hide resolved
{
auto topLeft = _topLeft;
auto bottomRight = _bottomRight;
topLeft = topLeft * size;
bottomRight = bottomRight * size;
miniksa marked this conversation as resolved.
Show resolved Hide resolved
return til::rectangle{ topLeft, bottomRight };
}
miniksa marked this conversation as resolved.
Show resolved Hide resolved

// DIV will scale the entire rectangle down by the size factor,
// but rounds the bottom-right corner out.
rectangle operator/(const size& size)
{
auto topLeft = _topLeft;
auto bottomRight = _bottomRight;
topLeft = topLeft / size;
miniksa marked this conversation as resolved.
Show resolved Hide resolved

// Move bottom right point into a size
// Use size specialization of divide_ceil to round up against the size given.
// Add leading addition to point to convert it back into a point.
bottomRight = til::point{} + til::size{ right(), bottom() }.divide_ceil(size);

return til::rectangle{ topLeft, bottomRight };
}

#pragma endregion

constexpr ptrdiff_t top() const noexcept
Expand Down
Loading