On Thu, Nov 29, 2018 at 03:20:12PM +0100, Erik Skultety wrote:
A few simple helpers that allow us to determine whether a graphics
can
and will need to make use of a DRM render node.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
src/conf/domain_conf.c | 41 ++++++++++++++++++++++++++++++++++++++++
src/conf/domain_conf.h | 9 +++++++++
src/libvirt_private.syms | 3 +++
3 files changed, 53 insertions(+)
+bool
+virDomainGraphicsNeedsRenderNode(const virDomainGraphicsDef *graphics)
Consider:
NeedsAutoRenderNode
(in a way graphics with a rendernode already specified also needs it)
+{
+ if (!virDomainGraphicsSupportsRenderNode(graphics) ||
+ virDomainGraphicsGetRenderNode(graphics))
+ return false;
Personally I'd decouple these two conditions.
+
+ return true;
+}
Regardless:
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano