Changeset 148595 in webkit


Ignore:
Timestamp:
Apr 17, 2013 2:18:27 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] GraphicsContext3D: don't initialize m_extensions in the constructor
https://bugs.webkit.org/show_bug.cgi?id=114726

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-04-17
Reviewed by Carlos Garcia Campos.

m_extensions is now initialized on demand by
GraphicsContext3D::getExtensions().

Doing it in the constructor produces a crash, because
Extensions3DOpenGLES() calls glGetString before the WebGL context
is current.

  • platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:

(WebCore::GraphicsContext3D::GraphicsContext3D):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r148593 r148595  
     12013-04-17  Alberto Garcia  <agarcia@igalia.com>
     2
     3        [BlackBerry] GraphicsContext3D: don't initialize m_extensions in the constructor
     4        https://bugs.webkit.org/show_bug.cgi?id=114726
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        m_extensions is now initialized on demand by
     9        GraphicsContext3D::getExtensions().
     10
     11        Doing it in the constructor produces a crash, because
     12        Extensions3DOpenGLES() calls glGetString before the WebGL context
     13        is current.
     14
     15        * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
     16        (WebCore::GraphicsContext3D::GraphicsContext3D):
     17
    1182013-04-16  Maciej Stachowiak  <mjs@apple.com>
    219
  • trunk/Source/WebCore/platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp

    r145814 r148595  
    5757    , m_context(BlackBerry::Platform::Graphics::createWebGLContext())
    5858    , m_compiler(SH_ESSL_OUTPUT)
    59     , m_extensions(adoptPtr(new Extensions3DOpenGLES(this)))
    6059    , m_attrs(attrs)
    6160    , m_texture(0)
     
    110109    getIntegerv(GraphicsContext3D::MAX_FRAGMENT_UNIFORM_VECTORS, &ANGLEResources.MaxFragmentUniformVectors);
    111110
     111    Extensions3D* extensions = getExtensions();
    112112    ANGLEResources.MaxDrawBuffers = 1; // Always set to 1 for OpenGL ES.
    113     ANGLEResources.OES_standard_derivatives = m_extensions->supports("GL_OES_standard_derivatives");
    114     ANGLEResources.OES_EGL_image_external = m_extensions->supports("GL_EGL_image_external");
    115     ANGLEResources.ARB_texture_rectangle = m_extensions->supports("GL_ARB_texture_rectangle");
     113    ANGLEResources.OES_standard_derivatives = extensions->supports("GL_OES_standard_derivatives");
     114    ANGLEResources.OES_EGL_image_external = extensions->supports("GL_EGL_image_external");
     115    ANGLEResources.ARB_texture_rectangle = extensions->supports("GL_ARB_texture_rectangle");
    116116
    117117    GC3Dint range[2], precision;
Note: See TracChangeset for help on using the changeset viewer.