Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Apr 17, 2020
1 parent 936735e commit 3535b5a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/renderer/dx/DxRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,15 @@ CATCH_RETURN();
try
{
_invalidMap.set_all();

// Since everything is invalidated here, mark this as a "first frame", so
// that we won't use incremental drawing on it. The caller of this intended
// for _everything_ to get redrawn, so setting _firstFrame will force us to
// redraw the entire frame. This will make sure that things like the gutters
// get cleared correctly.
//
// Invalidating everything is supposed to happen with resizes of the
// entire canvas, changes of the font, and other such adjustments.
_firstFrame = true;
return S_OK;
}
Expand Down Expand Up @@ -1169,9 +1178,6 @@ try
D2D1_COLOR_F nothing = { 0 };

// If the entire thing is invalid, just use one big clear operation.
// This will also hit the gutters outside the usual paintable area.
// Invalidating everything is supposed to happen with resizes of the
// entire canvas, changes of the font, and other such adjustments.
if (_invalidMap.all())
{
_d2dRenderTarget->Clear(nothing);
Expand Down

1 comment on commit 3535b5a

@github-actions

This comment was marked as resolved.

Please sign in to comment.