Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
robmikh committed Jun 9, 2024
1 parent 3a922fd commit 639597f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Win32CaptureSample/SimpleCapture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ void SimpleCapture::OnFrameArrived(winrt::Direct3D11CaptureFramePool const& send
auto dirtyRegion = frame.DirtyRegions();
for (auto&& dirtyRegion : dirtyRegion)
{
// Some of these checks are a bit paranoid. The real thing we need to look out for
// is when the render target and the source texture differ in size (e.g. during a
// window resize, where we resize the swap chain before we resize the frame pool).

if (dirtyRegion.X >= textureWidth || dirtyRegion.Y >= textureHeight)
{
continue;
Expand Down

0 comments on commit 639597f

Please sign in to comment.