Skip to content

Commit

Permalink
AtlasEngine: Fix cursor invalidation for BackendD2D (#15427)
Browse files Browse the repository at this point in the history
TIL: `CreateCompatibleRenderTarget` does not initialize the bitmap
it returns. You got to do that yourself just like in D3D.

## Validation Steps Performed
* Set `ATLAS_DEBUG_FORCE_D2D_MODE` to 1
* Changing the cursor in the settings immediately updates it ✅

(cherry picked from commit 7650ecf)
Service-Card-Id: 89323214
Service-Version: 1.18
  • Loading branch information
lhecker authored and DHowett committed May 25, 2023
1 parent 89ee00d commit 9200979
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/renderer/atlas/BackendD2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ void BackendD2D::_resizeCursorBitmap(const RenderingPayload& p, const til::size
cursorRenderTarget->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);

cursorRenderTarget->BeginDraw();
cursorRenderTarget->Clear();
{
const D2D1_RECT_F rect{ 0, 0, sizeF.width, sizeF.height };
const auto brush = _brushWithColor(0xffffffff);
Expand Down

0 comments on commit 9200979

Please sign in to comment.