d3d11screencapture: Fix missing/outdated cursor shape
authorErwann Gouesbet <erwann.gouesbet@blacknut.com>
Tue, 24 May 2022 09:06:39 +0000 (11:06 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 24 May 2022 20:10:00 +0000 (20:10 +0000)
commit09a45c37caca4d9dfa785696e4d52cd01ede1bf3
tree2d9b8e769c339149ff08f06ff49d71fe0af4d3a1
parent79c3bbc2ed3be3c441ba8e7b900e51d02b067328
d3d11screencapture: Fix missing/outdated cursor shape

d3d11screencapture can miss a cursor shape to draw or draw an outdated cursor shape.
 - AcquireNextFrame only provides cursor shape when there is one update
 - current d3d11screencapture skips cursor shape when mouse is not drawn

So, if a gstreamer application uses d3d11screencapture with cursor initially not drawn
"show-cursor"=false and then switches this property to true, the cursor will not be
actually drawn until AcquireNextFrame provides a new cursor shape.
This commit makes d3d11screencapture always update the cursor shape information, even
if the mouse is not drawn. d3d11screencapture will always have the latest cursor shape
when requested to draw it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2485>
subprojects/gst-plugins-bad/sys/d3d11/gstd3d11screencapture.cpp