WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 55534
Clean up macros in Extensions3DOpenGL.cpp
https://bugs.webkit.org/show_bug.cgi?id=55534
Summary
Clean up macros in Extensions3DOpenGL.cpp
David Kilzer (:ddkilzer)
Reported
2011-03-01 17:18:39 PST
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(-)
Attachments
Patch
(2.92 KB, patch)
2011-03-01 17:18 PST
,
David Kilzer (:ddkilzer)
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2011-03-01 17:31:30 PST
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.
David Kilzer (:ddkilzer)
Comment 2
2011-03-02 06:46:37 PST
(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.
David Kilzer (:ddkilzer)
Comment 3
2011-03-02 06:48:47 PST
Committed
r80124
: <
http://trac.webkit.org/changeset/80124
>
Adam Roben (:aroben)
Comment 4
2011-03-02 06:55:35 PST
(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?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug