Skip to content

Commit

Permalink
Ensure D2D device context is not used outside Begin/End draw (#13011)
Browse files Browse the repository at this point in the history
* Ensure D2D device context is not used outside Begin/End draw

* Change files
  • Loading branch information
acoates-ms authored Apr 29, 2024
1 parent 8d06a80 commit 5fa1ba4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Ensure D2D device context is not used outside Begin/End draw",
"packageName": "react-native-windows",
"email": "30809111+acoates-ms@users.noreply.github.com",
"dependentChangeType": "patch"
}
1 change: 1 addition & 0 deletions vnext/Microsoft.ReactNative.Cxx/AutoDraw.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class AutoDrawDrawingSurface {

~AutoDrawDrawingSurface() noexcept {
if (m_d2dDeviceContext) {
m_d2dDeviceContext = nullptr;
m_drawingSurfaceInterop->EndDraw();
}
}
Expand Down

0 comments on commit 5fa1ba4

Please sign in to comment.