Created attachment 84332 [details] Patch Reviewed by NOBODY (OOPS!). 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). --- 2 files changed, 25 insertions(+), 7 deletions(-)
Comment on attachment 84332 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=84332&action=review > Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp:137 > -#if GL_APPLE_vertex_array_object > +#if defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object I think this only works properly in MSVC if you leave off the parentheses. #if defined GL_APPLE_vertex_array_object && GL_APPLE_vertex_array_object I think it would be best to use the syntax that works in MSVC even if that’s not a real issue here.
(In reply to comment #1) > I think it would be best to use the syntax that works in MSVC even if that’s not a real issue here. Done.
Committed r80124: <http://trac.webkit.org/changeset/80124>
(In reply to comment #1) > (From update of attachment 84332 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=84332&action=review > > > Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp:137 > > -#if GL_APPLE_vertex_array_object > > +#if defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object > > I think this only works properly in MSVC if you leave off the parentheses. > > #if defined GL_APPLE_vertex_array_object && GL_APPLE_vertex_array_object > > I think it would be best to use the syntax that works in MSVC even if that’s not a real issue here. I believe MSVC can handle the parentheses in this case just fine. For some reason it doesn't like them if you add them to the definition of the PLATFORM() macro, though; maybe it's something about the ## operator?