Title: [92596] trunk/Source/WebCore
Revision
92596
Author
[email protected]
Date
2011-08-08 08:29:46 -0700 (Mon, 08 Aug 2011)

Log Message

[Qt] Implement WebGL antialiasing (part 3)
https://bugs.webkit.org/show_bug.cgi?id=64879

Patch by Andrew Wason <[email protected]> on 2011-08-08
Reviewed by Noam Rosenthal.

Existing WebGL layout tests.

Adopt Extensions3DOpenGL for Qt desktop as a prerequisite
for implementing WebGL antialiasing.
Extensions3DQt is still used for ES2.

* WebCore.pri:
* WebCore.pro:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::createVertexArrayOES):
(WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
(WebCore::Extensions3DOpenGL::isVertexArrayOES):
(WebCore::Extensions3DOpenGL::bindVertexArrayOES):
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::getExtensions):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3D::layerComposited):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (92595 => 92596)


--- trunk/Source/WebCore/ChangeLog	2011-08-08 15:05:00 UTC (rev 92595)
+++ trunk/Source/WebCore/ChangeLog	2011-08-08 15:29:46 UTC (rev 92596)
@@ -1,3 +1,29 @@
+2011-08-08  Andrew Wason  <[email protected]>
+
+        [Qt] Implement WebGL antialiasing (part 3)
+        https://bugs.webkit.org/show_bug.cgi?id=64879
+
+        Reviewed by Noam Rosenthal.
+
+        Existing WebGL layout tests.
+
+        Adopt Extensions3DOpenGL for Qt desktop as a prerequisite
+        for implementing WebGL antialiasing.
+        Extensions3DQt is still used for ES2.
+
+        * WebCore.pri:
+        * WebCore.pro:
+        * platform/graphics/GraphicsContext3D.h:
+        * platform/graphics/opengl/Extensions3DOpenGL.cpp:
+        (WebCore::Extensions3DOpenGL::createVertexArrayOES):
+        (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
+        (WebCore::Extensions3DOpenGL::isVertexArrayOES):
+        (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
+        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
+        (WebCore::GraphicsContext3D::getExtensions):
+        * platform/graphics/qt/GraphicsContext3DQt.cpp:
+        (WebCore::GraphicsContext3D::layerComposited):
+
 2011-08-08  Benjamin Poulain  <[email protected]>
 
         Build fix after r92589, defaultSize is not used.

Modified: trunk/Source/WebCore/WebCore.pri (92595 => 92596)


--- trunk/Source/WebCore/WebCore.pri	2011-08-08 15:05:00 UTC (rev 92595)
+++ trunk/Source/WebCore/WebCore.pri	2011-08-08 15:29:46 UTC (rev 92596)
@@ -124,6 +124,7 @@
 WEBCORE_INCLUDEPATH = \
     $$SOURCE_DIR/WebCore/bridge/qt \
     $$SOURCE_DIR/WebCore/page/qt \
+    $$SOURCE_DIR/WebCore/platform/graphics/opengl \
     $$SOURCE_DIR/WebCore/platform/graphics/qt \
     $$SOURCE_DIR/WebCore/platform/network/qt \
     $$SOURCE_DIR/WebCore/platform/qt \

Modified: trunk/Source/WebCore/WebCore.pro (92595 => 92596)


--- trunk/Source/WebCore/WebCore.pro	2011-08-08 15:05:00 UTC (rev 92595)
+++ trunk/Source/WebCore/WebCore.pro	2011-08-08 15:29:46 UTC (rev 92596)
@@ -3659,7 +3659,11 @@
     INCLUDEPATH += $$PWD/platform/graphics/gpu
 
     !contains(QT_CONFIG, opengles2) {
+        HEADERS += \
+            platform/graphics/opengl/Extensions3DOpenGL.h
+
         SOURCES += \
+            platform/graphics/opengl/Extensions3DOpenGL.cpp \
             platform/graphics/opengl/GraphicsContext3DOpenGL.cpp
 
         ANGLE_DIR = $$replace(PWD, "WebCore", "ThirdParty/ANGLE")

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (92595 => 92596)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h	2011-08-08 15:05:00 UTC (rev 92595)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h	2011-08-08 15:29:46 UTC (rev 92596)
@@ -88,9 +88,10 @@
 class CanvasRenderingContext;
 class DrawingBuffer;
 class Extensions3D;
-#if PLATFORM(MAC) || PLATFORM(GTK)
+#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(QT)
 class Extensions3DOpenGL;
-#elif PLATFORM(QT)
+#endif
+#if PLATFORM(QT)
 class Extensions3DQt;
 #endif
 class HostWindow;
@@ -918,7 +919,7 @@
     HashMap<Platform3DObject, ShaderSourceEntry> m_shaderSourceMap;
 
     ANGLEWebKitBridge m_compiler;
-#if PLATFORM(QT)
+#if PLATFORM(QT) && defined(QT_OPENGL_ES_2)
     friend class Extensions3DQt;
     OwnPtr<Extensions3DQt> m_extensions;
 #else

Modified: trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp (92595 => 92596)


--- trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp	2011-08-08 15:05:00 UTC (rev 92595)
+++ trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp	2011-08-08 15:29:46 UTC (rev 92596)
@@ -37,6 +37,8 @@
 #include <OpenGL/gl.h>
 #elif PLATFORM(GTK)
 #include "OpenGLShims.h"
+#elif PLATFORM(QT)
+#include <cairo/OpenGLShims.h>
 #endif
 
 namespace WebCore {
@@ -147,7 +149,7 @@
 Platform3DObject Extensions3DOpenGL::createVertexArrayOES()
 {
     m_context->makeContextCurrent();
-#if !PLATFORM(GTK) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object
+#if !PLATFORM(GTK) && !PLATFORM(QT) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object
     GLuint array = 0;
     glGenVertexArraysAPPLE(1, &array);
     return array;
@@ -162,7 +164,7 @@
         return;
     
     m_context->makeContextCurrent();
-#if !PLATFORM(GTK) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object
+#if !PLATFORM(GTK) && !PLATFORM(QT) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object
     glDeleteVertexArraysAPPLE(1, &array);
 #endif
 }
@@ -173,7 +175,7 @@
         return GL_FALSE;
     
     m_context->makeContextCurrent();
-#if !PLATFORM(GTK) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object
+#if !PLATFORM(GTK) && !PLATFORM(QT) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object
     return glIsVertexArrayAPPLE(array);
 #else
     return GL_FALSE;
@@ -186,7 +188,7 @@
         return;
 
     m_context->makeContextCurrent();
-#if !PLATFORM(GTK) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object
+#if !PLATFORM(GTK) && !PLATFORM(QT) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object
     glBindVertexArrayAPPLE(array);
 #endif
 }

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp (92595 => 92596)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp	2011-08-08 15:05:00 UTC (rev 92595)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp	2011-08-08 15:29:46 UTC (rev 92596)
@@ -1523,14 +1523,12 @@
     return m_layerComposited;
 }
 
-#if !PLATFORM(QT)
 Extensions3D* GraphicsContext3D::getExtensions()
 {
     if (!m_extensions)
         m_extensions = adoptPtr(new Extensions3DOpenGL(this));
     return m_extensions.get();
 }
-#endif
 
 }
 

Modified: trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp (92595 => 92596)


--- trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp	2011-08-08 15:05:00 UTC (rev 92595)
+++ trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp	2011-08-08 15:29:46 UTC (rev 92596)
@@ -23,7 +23,11 @@
 #include "WebGLObject.h"
 #include <cairo/OpenGLShims.h>
 #include "CanvasRenderingContext.h"
+#if defined(QT_OPENGL_ES_2)
 #include "Extensions3DQt.h"
+#else
+#include "Extensions3DOpenGL.h"
+#endif
 #include "GraphicsContext.h"
 #include "HTMLCanvasElement.h"
 #include "HostWindow.h"
@@ -1495,7 +1499,6 @@
 {
     return m_layerComposited;
 }
-#endif
 
 Extensions3D* GraphicsContext3D::getExtensions()
 {
@@ -1503,6 +1506,7 @@
         m_extensions = adoptPtr(new Extensions3DQt);
     return m_extensions.get();
 }
+#endif
 
 bool GraphicsContext3D::getImageData(Image* image,
                                      GC3Denum format,
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to