Changeset 152282 in webkit


Ignore:
Timestamp:
Jul 2, 2013 4:04:48 AM (11 years ago)
Author:
allan.jensen@digia.com
Message:

[Qt][WK1] Support WebGL with EGL on Linux
https://bugs.webkit.org/show_bug.cgi?id=118251

Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Let GraphicsContext3D work without a GraphicsSurface.

  • Target.pri:
  • platform/graphics/OpenGLShims.cpp:

(WebCore::getProcAddress):

  • platform/graphics/qt/GraphicsContext3DQt.cpp:

(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):

Tools:

  • qmake/mkspecs/features/features.prf:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r152281 r152282  
     12013-07-02  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        [Qt][WK1] Support WebGL with EGL on Linux
     4        https://bugs.webkit.org/show_bug.cgi?id=118251
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Let GraphicsContext3D work without a GraphicsSurface.
     9
     10        * Target.pri:
     11        * platform/graphics/OpenGLShims.cpp:
     12        (WebCore::getProcAddress):
     13        * platform/graphics/qt/GraphicsContext3DQt.cpp:
     14        (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
     15        (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
     16
    1172013-07-02  Catalin Badea  <badea@adobe.com>
    218
  • trunk/Source/WebCore/Target.pri

    r152235 r152282  
    42504250        SOURCES += platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp
    42514251    }
    4252     have?(XCOMPOSITE) {
     4252    use?(glx) {
    42534253        HEADERS += \
    42544254            platform/graphics/surfaces/glx/X11Helper.h \
  • trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp

    r151966 r152282  
    4141static void* getProcAddress(const char* procName)
    4242{
    43     return reinterpret_cast<void*>(QOpenGLContext::currentContext()->getProcAddress(procName));
     43    if (QOpenGLContext* context = QOpenGLContext::currentContext())
     44        return reinterpret_cast<void*>(context->getProcAddress(procName));
     45    return 0;
    4446}
    4547#else
  • trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp

    r152222 r152282  
    121121    }
    122122
    123 #if USE(GRAPHICS_SURFACE)
    124123#if QT_VERSION >= 0x050100
    125124    QOffscreenSurface* surface = new QOffscreenSurface;
     
    141140
    142141    makeCurrentIfNeeded();
     142
     143#if USE(GRAPHICS_SURFACE)
    143144    IntSize surfaceSize(m_context->m_currentWidth, m_context->m_currentHeight);
    144145    m_surfaceFlags = GraphicsSurface::SupportsTextureTarget
     
    229230    blitMultisampleFramebufferAndRestoreContext();
    230231
     232#if USE(GRAPHICS_SURFACE)
     233    ASSERT(m_graphicsSurface);
    231234    if (textureMapper->accelerationMode() == TextureMapper::OpenGLMode) {
    232 #if USE(GRAPHICS_SURFACE)
    233235        // CGL only provides us the context, but not the view the context is currently bound to.
    234236        // To make sure the context is bound the the right surface we have to do a makeCurrent through QOpenGL again.
     
    247249        TextureMapperGL* texmapGL = static_cast<TextureMapperGL*>(textureMapper);
    248250        m_graphicsSurface->paintToTextureMapper(texmapGL, targetRect, matrix, opacity);
    249 #endif
    250         return;
    251     }
     251        return;
     252    }
     253#endif
    252254
    253255    GraphicsContext* context = textureMapper->graphicsContext();
  • trunk/Tools/ChangeLog

    r152277 r152282  
     12013-07-02  Allan Sandfeld Jensen  <allan.jensen@digia.com>
     2
     3        [Qt][WK1] Support WebGL with EGL on Linux
     4        https://bugs.webkit.org/show_bug.cgi?id=118251
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        * qmake/mkspecs/features/features.prf:
     9
    1102013-07-01  Nick Diego Yamane  <nick.yamane@openbossa.org>
    211
  • trunk/Tools/qmake/mkspecs/features/features.prf

    r151546 r152282  
    141141        mac: WEBKIT_CONFIG += use_graphics_surface
    142142        win32:contains(QT_CONFIG, opengles2): WEBKIT_CONFIG += use_graphics_surface
    143         linux-*:contains(WEBKIT_CONFIG, have_glx):contains(WEBKIT_CONFIG, have_xcomposite):contains(WEBKIT_CONFIG, have_xrender): WEBKIT_CONFIG += use_graphics_surface use_glx
     143        have?(glx):have?(xcomposite):have?(xrender): WEBKIT_CONFIG += use_graphics_surface use_glx
    144144    }
    145145
Note: See TracChangeset for help on using the changeset viewer.