Changeset 152222 in webkit
- Timestamp:
- Jul 1, 2013 7:29:22 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r152220 r152222 1 2013-07-01 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 3 [Qt] Avoid creating a QWindow for offscreen GraphicsContext3D 4 https://bugs.webkit.org/show_bug.cgi?id=118244 5 6 Reviewed by Noam Rosenthal. 7 8 In Qt 5.0 we had to create invisible windows, but in Qt 5.1 9 we can now create specific offscreen surfaces. 10 11 * platform/graphics/qt/GraphicsContext3DQt.cpp: 12 (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): 13 1 14 2013-07-01 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 15 -
trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
r149980 r152222 36 36 #include "SharedBuffer.h" 37 37 #include "TextureMapperPlatformLayer.h" 38 #include <QWindow>39 38 #include <qpa/qplatformpixmap.h> 40 39 #include <wtf/text/CString.h> 40 41 #if QT_VERSION >= 0x050100 42 #include <QOffscreenSurface> 43 #else 44 #include <QWindow> 45 #endif 41 46 42 47 #if USE(TEXTURE_MAPPER_GL) … … 117 122 118 123 #if USE(GRAPHICS_SURFACE) 119 // FIXME: Find a way to create a QOpenGLContext without creating a QWindow at all. 120 // We need to create a surface in order to create a QOpenGLContext and make it current. 124 #if QT_VERSION >= 0x050100 125 QOffscreenSurface* surface = new QOffscreenSurface; 126 surface->create(); 127 m_surface = surface; 128 m_surfaceOwner = surface; 129 #else 121 130 QWindow* window = new QWindow; 122 131 window->setSurfaceType(QSurface::OpenGLSurface); … … 125 134 m_surface = window; 126 135 m_surfaceOwner = window; 127 128 m_platformContext = new QOpenGLContext(window); 136 #endif 137 138 m_platformContext = new QOpenGLContext(m_surfaceOwner); 129 139 if (!m_platformContext->create()) 130 140 return;
Note: See TracChangeset
for help on using the changeset viewer.