This CL fixes the issue where artifacts appear during capture with WGC when the capture source is resized. A video of the issue is available here: https://bugs.chromium.org/p/webrtc/issues/detail?id=9273#c44 The solution is to use CopySubresourceRegion instead of CopyResource to only copy valid data into our texture. Additionally, we moved the call to CreateMappedTexture to before the call to CopySubresourceRegion, as the latter requires both textures to be of the same size. Bug: webrtc:9273 Change-Id: I114458d95cbf58550ff653a985dd84db4741e0f8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254100 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Austin Orion <auorion@microsoft.com> Cr-Commit-Position: refs/heads/main@{#36163}