Changeset 80124 in webkit


Ignore:
Timestamp:
Mar 2, 2011 6:47:38 AM (13 years ago)
Author:
ddkilzer@apple.com
Message:

<http://webkit.org/b/55534> Clean up macros in Extensions3DOpenGL.cpp

Reviewed by Darin Adler.

Change "#if GL_APPLE_vertex_array_object" macros to check that
GL_APPLE_vertex_array_object is both defined and non-zero.

  • platform/graphics/opengl/Extensions3DOpenGL.cpp:

(WebCore::Extensions3DOpenGL::createVertexArrayOES):
(WebCore::Extensions3DOpenGL::deleteVertexArrayOES): Remove
empty #else clause.
(WebCore::Extensions3DOpenGL::isVertexArrayOES):
(WebCore::Extensions3DOpenGL::bindVertexArrayOES): Add early
return check. Remove #else clause that would never have
compiled (since array is not a WTF::String).

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r80121 r80124  
     12011-03-02  David Kilzer  <ddkilzer@apple.com>
     2
     3        <http://webkit.org/b/55534> Clean up macros in Extensions3DOpenGL.cpp
     4
     5        Reviewed by Darin Adler.
     6
     7        Change "#if GL_APPLE_vertex_array_object" macros to check that
     8        GL_APPLE_vertex_array_object is both defined and non-zero.
     9
     10        * platform/graphics/opengl/Extensions3DOpenGL.cpp:
     11        (WebCore::Extensions3DOpenGL::createVertexArrayOES):
     12        (WebCore::Extensions3DOpenGL::deleteVertexArrayOES): Remove
     13        empty #else clause.
     14        (WebCore::Extensions3DOpenGL::isVertexArrayOES):
     15        (WebCore::Extensions3DOpenGL::bindVertexArrayOES): Add early
     16        return check.  Remove #else clause that would never have
     17        compiled (since array is not a WTF::String).
     18
    1192011-03-01  Ryosuke Niwa  <rniwa@webkit.org>
    220
  • trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp

    r79011 r80124  
    135135{
    136136    m_context->makeContextCurrent();
    137 #if GL_APPLE_vertex_array_object
     137#if defined GL_APPLE_vertex_array_object && GL_APPLE_vertex_array_object
    138138    GLuint array = 0;
    139139    glGenVertexArraysAPPLE(1, &array);
     
    150150   
    151151    m_context->makeContextCurrent();
    152 #if GL_APPLE_vertex_array_object
     152#if defined GL_APPLE_vertex_array_object && GL_APPLE_vertex_array_object
    153153    glDeleteVertexArraysAPPLE(1, &array);
    154 #else
    155154#endif
    156155}
     
    162161   
    163162    m_context->makeContextCurrent();
    164 #if GL_APPLE_vertex_array_object
     163#if defined GL_APPLE_vertex_array_object && GL_APPLE_vertex_array_object
    165164    return glIsVertexArrayAPPLE(array);
    166165#else
     
    171170void Extensions3DOpenGL::bindVertexArrayOES(Platform3DObject array)
    172171{
     172    if (!array)
     173        return;
     174
    173175    m_context->makeContextCurrent();
    174 #if GL_APPLE_vertex_array_object
     176#if defined GL_APPLE_vertex_array_object && GL_APPLE_vertex_array_object
    175177    glBindVertexArrayAPPLE(array);
    176 #else
    177     ASSERT_UNUSED(array, supports(array));
    178178#endif
    179179}
Note: See TracChangeset for help on using the changeset viewer.