[Webkit-unassigned] [Bug 64878] [Qt] Adopt GraphicsContext3DOpenGL.cpp and ANGLE (part 2)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 21 14:10:04 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=64878
--- Comment #3 from Andrew Wason <rectalogic at rectalogic.com> 2011-07-21 14:10:05 PST ---
(In reply to comment #2)
>
> > Source/WebCore/WebCore.pro:3641
> > + *g++* {
> > + QMAKE_CXXFLAGS += -Wno-unused-variable
> > + QMAKE_CXXFLAGS += -Wno-missing-noreturn
> > + QMAKE_CXXFLAGS += -Wno-unused-function
> > + QMAKE_CXXFLAGS += -Wno-parentheses
> > + QMAKE_CXXFLAGS += -Wno-reorder
> > + # g++ < 4.3 doesn't support -Wno-type-limits
> > + system( $$QMAKE_CXX --version | grep -e "\\<[4-9]\\.[3-9]\\.[0-9]" ) {
> > + QMAKE_CXXFLAGS += -Wno-type-limits
> > + }
>
> Please explain :)
These are the g++ warnings that need to be disabled for ANGLE to build without generating warnings.
The nasty bit at the end is because g++ 4.3 generates an additional warning, and the flag to disable
that is 4.3 specific.
Let me check if all these are still needed since ANGLE has been updated since jarkko worked on this (he came up with most of that list)
> > Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:32
> > +#if ENABLE(WEBGL) && !defined(QT_OPENGL_ES_2)
>
> So, does this mean we use GraphicsContext3DQt for ES, and GraphicsContext3DOpenGL for desktop?
> Maybe we should make this decision in the pro file rather than pollute the #ifdef space, especially in files shared by other ports.
Yes, all these changes are just for desktop. But I can't figure out how to determine if we are ES2 or desktop in the pro file - QT_OPENGL_ES_2 I believe would be defined in <Qt/qconfig.h> and that file is generated as part of the Qt configure/build process. If I could determine we are ES2 in the pro, then I can just not include the file in SOURCES in that case.
> > Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp:336
> > + // Always set to 1 for OpenGL ES.
>
> Shouldn't we allow more if we're not in ES?
Hmm, this whole ANGLE init block (including that comment) was copied from GraphicsContext3DGtk.cpp and GraphicsContext3DMac.mm (which initialize it identically).
I think the "ES" in the comment refers to the WebGL spec being based on ES 2.0 which only supports 1 drawing buffer - i.e. it's a requirement of the WebGL spec.
But actually that whole ANGLE initialization block in GraphicsContext3DQt.cpp needs to be wrapped in
#if !defined(QT_OPENGL_ES_2) because we're only using ANGLE for desktop.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list