RESOLVED FIXED 113784
[Qt] Fail gracefully if an OpenGL context could not be created.
https://bugs.webkit.org/show_bug.cgi?id=113784
Summary [Qt] Fail gracefully if an OpenGL context could not be created.
Zeno Albisser
Reported 2013-04-02 08:12:56 PDT
[Qt] Fail gracefully if an OpenGL context could not be created.
Attachments
Patch (2.30 KB, patch)
2013-04-02 08:15 PDT, Zeno Albisser
no flags
Patch (2.17 KB, patch)
2013-04-02 12:00 PDT, Zeno Albisser
no flags
Zeno Albisser
Comment 1 2013-04-02 08:15:11 PDT
Jocelyn Turcotte
Comment 2 2013-04-02 08:31:06 PDT
Comment on attachment 196143 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=196143&action=review > Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:373 > - return context->m_private ? context.release() : 0; > + return (context->m_private && context->platformGraphicsContext3D()) ? context.release() : 0; To avoid spreading the failure logic I think it would be cleaner to add a check in GraphicsContext3D::GraphicsContext3D and set m_private = nullptr if (!m_private->m_platformContext). Something like changing "if (!m_private->m_surface) {" to "if (!m_private->m_surface || !m_private->m_platformContext) {" at line 398.
Zeno Albisser
Comment 3 2013-04-02 12:00:38 PDT
Zeno Albisser
Comment 4 2013-04-02 12:01:24 PDT
(In reply to comment #2) > To avoid spreading the failure logic I think it would be cleaner to add a check in GraphicsContext3D::GraphicsContext3D and set m_private = nullptr if (!m_private->m_platformContext). A very good point! Thx a lot! :)
Zeno Albisser
Comment 5 2013-04-03 08:01:03 PDT
Comment on attachment 196205 [details] Patch Clearing flags on attachment: 196205 Committed r147553: <http://trac.webkit.org/changeset/147553>
Zeno Albisser
Comment 6 2013-04-03 08:01:08 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.