From 4bab72368f84840134bebcb1f19fb7c8299ef7ba Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 8 Aug 2019 15:02:08 +0200 Subject: glx: Do not flood with warnings when reducing during config lookup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With things like sample count reducing a format (16 -> 8 -> 4 -> ...) and trying again is perfectly fine. There is no need to show warnings in this case. Even some of our own examples in qtdeclarative do a setSamples(16) which is rarely supported. These all show warnings since 8ec98fc2dc40237730f99af099dffe2920ef5bcc. Avoid this. Change-Id: Ice83d5720b02e92f77cfd63918c98ad222513b6a Reviewed-by: Christian Strømme --- src/platformsupport/glxconvenience/qglxconvenience.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/platformsupport/glxconvenience/qglxconvenience.cpp') diff --git a/src/platformsupport/glxconvenience/qglxconvenience.cpp b/src/platformsupport/glxconvenience/qglxconvenience.cpp index 6bd73de8f3..ef413ba98d 100644 --- a/src/platformsupport/glxconvenience/qglxconvenience.cpp +++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp @@ -258,9 +258,11 @@ GLXFBConfig qglx_findConfig(Display *display, int screen , QSurfaceFormat format qCDebug(lcGlx) << "qglx_findConfig: Found non-matching but compatible FBConfig"; return compatibleCandidate; } - qCWarning(lcGlx, "qglx_findConfig: Failed to finding matching FBConfig (%d %d %d %d)", requestedRed, requestedGreen, requestedBlue, requestedAlpha); } while (qglx_reduceFormat(&format)); + if (!config) + qCWarning(lcGlx) << "qglx_findConfig: Failed to finding matching FBConfig for" << format; + return config; } -- cgit v1.2.3