Title: [152282] trunk
- Revision
- 152282
- Author
- [email protected]
- Date
- 2013-07-02 04:04:48 -0700 (Tue, 02 Jul 2013)
Log Message
[Qt][WK1] Support WebGL with EGL on Linux
https://bugs.webkit.org/show_bug.cgi?id=118251
Reviewed by Kenneth Rohde Christiansen.
Source/WebCore:
Let GraphicsContext3D work without a GraphicsSurface.
* Target.pri:
* platform/graphics/OpenGLShims.cpp:
(WebCore::getProcAddress):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
Tools:
* qmake/mkspecs/features/features.prf:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (152281 => 152282)
--- trunk/Source/WebCore/ChangeLog 2013-07-02 07:43:19 UTC (rev 152281)
+++ trunk/Source/WebCore/ChangeLog 2013-07-02 11:04:48 UTC (rev 152282)
@@ -1,3 +1,19 @@
+2013-07-02 Allan Sandfeld Jensen <[email protected]>
+
+ [Qt][WK1] Support WebGL with EGL on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=118251
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Let GraphicsContext3D work without a GraphicsSurface.
+
+ * Target.pri:
+ * platform/graphics/OpenGLShims.cpp:
+ (WebCore::getProcAddress):
+ * platform/graphics/qt/GraphicsContext3DQt.cpp:
+ (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
+ (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
+
2013-07-02 Catalin Badea <[email protected]>
[CSS-Regions] OverrideLogicalHeight used by both regions and flexbox
Modified: trunk/Source/WebCore/Target.pri (152281 => 152282)
--- trunk/Source/WebCore/Target.pri 2013-07-02 07:43:19 UTC (rev 152281)
+++ trunk/Source/WebCore/Target.pri 2013-07-02 11:04:48 UTC (rev 152282)
@@ -4249,7 +4249,7 @@
win32 {
SOURCES += platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp
}
- have?(XCOMPOSITE) {
+ use?(glx) {
HEADERS += \
platform/graphics/surfaces/glx/X11Helper.h \
platform/graphics/surfaces/glx/GLXConfigSelector.h
Modified: trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp (152281 => 152282)
--- trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp 2013-07-02 07:43:19 UTC (rev 152281)
+++ trunk/Source/WebCore/platform/graphics/OpenGLShims.cpp 2013-07-02 11:04:48 UTC (rev 152282)
@@ -40,7 +40,9 @@
#if PLATFORM(QT)
static void* getProcAddress(const char* procName)
{
- return reinterpret_cast<void*>(QOpenGLContext::currentContext()->getProcAddress(procName));
+ if (QOpenGLContext* context = QOpenGLContext::currentContext())
+ return reinterpret_cast<void*>(context->getProcAddress(procName));
+ return 0;
}
#else
typedef void* (*glGetProcAddressType) (const char* procName);
Modified: trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp (152281 => 152282)
--- trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp 2013-07-02 07:43:19 UTC (rev 152281)
+++ trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp 2013-07-02 11:04:48 UTC (rev 152282)
@@ -120,7 +120,6 @@
return;
}
-#if USE(GRAPHICS_SURFACE)
#if QT_VERSION >= 0x050100
QOffscreenSurface* surface = new QOffscreenSurface;
surface->create();
@@ -140,6 +139,8 @@
return;
makeCurrentIfNeeded();
+
+#if USE(GRAPHICS_SURFACE)
IntSize surfaceSize(m_context->m_currentWidth, m_context->m_currentHeight);
m_surfaceFlags = GraphicsSurface::SupportsTextureTarget
| GraphicsSurface::SupportsSharing;
@@ -228,8 +229,9 @@
m_context->markLayerComposited();
blitMultisampleFramebufferAndRestoreContext();
+#if USE(GRAPHICS_SURFACE)
+ ASSERT(m_graphicsSurface);
if (textureMapper->accelerationMode() == TextureMapper::OpenGLMode) {
-#if USE(GRAPHICS_SURFACE)
// CGL only provides us the context, but not the view the context is currently bound to.
// To make sure the context is bound the the right surface we have to do a makeCurrent through QOpenGL again.
// FIXME: Remove this code as soon as GraphicsSurfaceMac makes use of NSOpenGL.
@@ -246,9 +248,9 @@
TextureMapperGL* texmapGL = static_cast<TextureMapperGL*>(textureMapper);
m_graphicsSurface->paintToTextureMapper(texmapGL, targetRect, matrix, opacity);
-#endif
return;
}
+#endif
GraphicsContext* context = textureMapper->graphicsContext();
QPainter* painter = context->platformContext();
Modified: trunk/Tools/ChangeLog (152281 => 152282)
--- trunk/Tools/ChangeLog 2013-07-02 07:43:19 UTC (rev 152281)
+++ trunk/Tools/ChangeLog 2013-07-02 11:04:48 UTC (rev 152282)
@@ -1,3 +1,12 @@
+2013-07-02 Allan Sandfeld Jensen <[email protected]>
+
+ [Qt][WK1] Support WebGL with EGL on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=118251
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * qmake/mkspecs/features/features.prf:
+
2013-07-01 Nick Diego Yamane <[email protected]>
[Efl][Gtk] Look at WEBKIT_OUTPUTDIR instead of WEBKITOUTPUTDIR in jhbuildrc
Modified: trunk/Tools/qmake/mkspecs/features/features.prf (152281 => 152282)
--- trunk/Tools/qmake/mkspecs/features/features.prf 2013-07-02 07:43:19 UTC (rev 152281)
+++ trunk/Tools/qmake/mkspecs/features/features.prf 2013-07-02 11:04:48 UTC (rev 152282)
@@ -140,7 +140,7 @@
use?(3d_graphics) {
mac: WEBKIT_CONFIG += use_graphics_surface
win32:contains(QT_CONFIG, opengles2): WEBKIT_CONFIG += use_graphics_surface
- linux-*:contains(WEBKIT_CONFIG, have_glx):contains(WEBKIT_CONFIG, have_xcomposite):contains(WEBKIT_CONFIG, have_xrender): WEBKIT_CONFIG += use_graphics_surface use_glx
+ have?(glx):have?(xcomposite):have?(xrender): WEBKIT_CONFIG += use_graphics_surface use_glx
}
# Slider Touch is sensible to use when compiling WebKit2
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes