present: Send PresentCompleteModeSuboptimalCopy appropriately

Graphics / X.Org / X.Org Server - Louis-Francis Ratté-Boulianne [collabora.com] - 5 March 2018 18:27 EST

Add 'check_flip2' hook for driver to let know the core about why flipping is not possible ('reason'). If it is because of unsupported buffer format/modifier, a PresentCompleteNotify event is sent to the client with the PresentCompleteModeSuboptimalCopy mode.

v2: Check for PresentOptionSuboptimal and check driver version before using 'check_flip2'.

v3: Only require one of 'check_flip' or 'check_flip2' to be implemented by the driver. Refactor reasons list to enum

e2ef3b44f present: Send PresentCompleteModeSuboptimalCopy appropriately
configure.ac | 2 +-
include/protocol-versions.h | 2 +-
present/meson.build | 2 +-
present/present.c | 50 ++++++++++++++++++++++++++++++---------------
present/present.h | 12 ++++++++++-
present/present_priv.h | 2 ++
6 files changed, 50 insertions(+), 20 deletions(-)

Upstream: cgit.freedesktop.org


  • Share