[Webkit-unassigned] [Bug 96490] [Qt4] QOpenGLContext used in GraphicsContext3DQt.cpp (regression r126635)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 12 07:18:41 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=96490





--- Comment #2 from Allan Sandfeld Jensen <allan.jensen at nokia.com>  2012-09-12 07:19:06 PST ---
(In reply to comment #0)
> The patch for bug #78672 introduced the GraphicsContext3D::RenderToCurrentGLContext render-style, but added Qt5 specific code to handle it. It should be too difficult to express that in Qt4.8 terms, but I will leave it to someone who knows what they are doing.

Make that should not be too difficult. The code in question is this:
    if (renderStyle == GraphicsContext3D::RenderToCurrentGLContext) {
        m_platformContext = QOpenGLContext::currentContext();
        m_surface = m_platformContext->surface();
        return;
    }

I was thinking it could be solved for Qt4 as
        m_platformContext = const_cast<QGLContext*>(QGLContext::currentContext());
        m_surface = dynamic_cast<QGLWidget*>(m_platformContext->device());

But without knowing the details, I would rather not do const casts and rely on assumptions of what type m_platformContext->device() is.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list