WebNN: Cache D3D shared fence handle in D3DImageBacking

Avoid redundant OpenSharedHandle calls in EndAccessDawnBuffer by
caching the last used D3DSharedFence. This persists the NT handle
on the backing, reducing CPU overhead during frequent buffer access
cycles in WebNN.

Bug: 345352987
Change-Id: Id791de1e753d59086c811979c5addf8f0f92e07d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7670172
Commit-Queue: Bernhart, Bryan <[email protected]>
Reviewed-by: Vasiliy Telezhnikov <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1601411}
NOKEYCHECK=True
GitOrigin-RevId: a82e897fe39c0e334ae6816a30218eb8fbfcf87c
2 files changed