Commit 867fc30c authored by Laszlo Agocs's avatar Laszlo Agocs Committed by Laszlo Agocs
Browse files

windows: Improve error handling with EGL


When disabling the graphics adapter, things start failing
with context lost and then bad_alloc and bad_access failures
when creating contexts/window surfaces.

Swap buffers now handles context loss. This makes it possible
for Qt Quick to act when the graphics adapter goes away.

Similarly, the window surface creation failure EGL_BAD_ACCESS
is treated the same way as context loss.

Note that this will not really help the main issue, because
rendering is not possible without a GPU (reinit attempts will
fail either at context creation or window surface creation),
but proper logging and context loss reporting improves the
situation somewhat.

Also unify and prettyify the warning and debug prints.
This makes it easier to understand what is going on.

Change-Id: Iec3a9b54f1134e78e87eefcf938525283ec9412a
Task-number: QTBUG-48095
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
parent 47e4ae86
No related merge requests found
Showing with 31 additions and 12 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment