Changeset 128315 in webkit
- Timestamp:
- Sep 12, 2012 8:36:45 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r128313 r128315 1 2012-09-12 Roland Takacs <rtakacs@inf.u-szeged.hu> 2 3 [Qt] Segmentation fault when closing QtTestBrowser 4 https://bugs.webkit.org/show_bug.cgi?id=95003 5 6 Reviewed by Simon Hausmann. 7 8 Defined a new QObject* variable. 9 If WebKit1 is used, it points to the QGLWidget that was 10 created in 'createPlatformGraphicsContext3DFromWidget'. 11 If WebKit2 is used, it points to the QWindow that was 12 created in GraphicsContext3DPrivate's constructor. 13 It is neccessary for deallocating them. 14 15 * platform/graphics/qt/GraphicsContext3DQt.cpp: 16 (GraphicsContext3DPrivate): 17 (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): 18 (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): 19 * platform/qt/QWebPageClient.h: 20 (QWebPageClient): 21 1 22 2012-09-12 Ryuan Choi <ryuan.choi@samsung.com> 2 23 -
trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp
r126635 r128315 85 85 PlatformGraphicsSurface3D m_surface; 86 86 PlatformGraphicsContext3D m_platformContext; 87 QObject* m_surfaceOwner; 87 88 #if USE(GRAPHICS_SURFACE) 88 89 GraphicsSurface::Flags m_surfaceFlags; … … 112 113 , m_surface(0) 113 114 , m_platformContext(0) 115 , m_surfaceOwner(0) 114 116 { 115 117 if (m_hostWindow && m_hostWindow->platformPageClient()) { 116 118 // This is the WebKit1 code path. 117 119 QWebPageClient* webPageClient = m_hostWindow->platformPageClient(); 118 webPageClient->createPlatformGraphicsContext3D(&m_platformContext, &m_surface );120 webPageClient->createPlatformGraphicsContext3D(&m_platformContext, &m_surface, &m_surfaceOwner); 119 121 if (!m_surface) 120 122 return; … … 138 140 window->create(); 139 141 m_surface = window; 142 m_surfaceOwner = window; 140 143 141 144 m_platformContext = new QOpenGLContext(window); … … 209 212 GraphicsContext3DPrivate::~GraphicsContext3DPrivate() 210 213 { 211 if (m_hostWindow) { 212 delete m_surface; 213 m_surface = 0; 214 // Platform context is assumed to be owned by surface. 215 m_platformContext = 0; 216 } 214 delete m_surfaceOwner; 215 m_surfaceOwner = 0; 217 216 } 218 217 -
trunk/Source/WebCore/platform/qt/QWebPageClient.h
r124879 r128315 109 109 #if USE(3D_GRAPHICS) 110 110 virtual void createPlatformGraphicsContext3D(PlatformGraphicsContext3D*, 111 PlatformGraphicsSurface3D*) = 0; 111 PlatformGraphicsSurface3D*, 112 QObject** = 0) = 0; 112 113 #endif 113 114 virtual QWindow* ownerWindow() const; -
trunk/Source/WebKit/qt/ChangeLog
r128282 r128315 1 2012-09-12 Roland Takacs <rtakacs@inf.u-szeged.hu> 2 3 [Qt] Segmentation fault when closing QtTestBrowser 4 https://bugs.webkit.org/show_bug.cgi?id=95003 5 6 Reviewed by Simon Hausmann. 7 8 Defined a new QObject* variable that points to the QGLWidget that was created 9 in 'createPlatformGraphicsContext3DFromWidget'. 10 It is neccessary for deallocating it. 11 12 * WebCoreSupport/PageClientQt.cpp: 13 (createPlatformGraphicsContext3DFromWidget): 14 (WebCore::PageClientQWidget::createPlatformGraphicsContext3D): 15 (WebCore::PageClientQGraphicsWidget::createPlatformGraphicsContext3D): 16 * WebCoreSupport/PageClientQt.h: 17 (PageClientQWidget): 18 (PageClientQGraphicsWidget): 19 1 20 2012-09-12 Andras Becsi <andras.becsi@nokia.com> 2 21 -
trunk/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp
r124879 r128315 37 37 38 38 static void createPlatformGraphicsContext3DFromWidget(QWidget* widget, PlatformGraphicsContext3D* context, 39 PlatformGraphicsSurface3D* surface )39 PlatformGraphicsSurface3D* surface, QObject** surfaceOwner) 40 40 { 41 41 #ifdef QT_OPENGL_LIB 42 42 *context = 0; 43 43 *surface = 0; 44 if (surfaceOwner) 45 *surfaceOwner = 0; 44 46 QAbstractScrollArea* scrollArea = qobject_cast<QAbstractScrollArea*>(widget); 45 47 if (!scrollArea) … … 53 55 // Geometry can be set to zero because m_glWidget is used only for its QGLContext. 54 56 glWidget->setGeometry(0, 0, 0, 0); 57 if (surfaceOwner) 58 *surfaceOwner = glWidget; 55 59 *surface = glWidget->windowHandle(); 56 60 *context = glWidget->context()->contextHandle(); … … 236 240 #if USE(3D_GRAPHICS) 237 241 void PageClientQWidget::createPlatformGraphicsContext3D(PlatformGraphicsContext3D* context, 238 PlatformGraphicsSurface3D* surface) 239 { 240 createPlatformGraphicsContext3DFromWidget(view, context, surface); 242 PlatformGraphicsSurface3D* surface, 243 QObject** surfaceOwner) 244 { 245 createPlatformGraphicsContext3DFromWidget(view, context, surface, surfaceOwner); 241 246 } 242 247 #endif … … 425 430 #if USE(3D_GRAPHICS) 426 431 void PageClientQGraphicsWidget::createPlatformGraphicsContext3D(PlatformGraphicsContext3D* context, 427 PlatformGraphicsSurface3D* surface) 428 { 429 createPlatformGraphicsContext3DFromWidget(ownerWidget(), context, surface); 432 PlatformGraphicsSurface3D* surface, 433 QObject** surfaceOwner) 434 { 435 createPlatformGraphicsContext3DFromWidget(ownerWidget(), context, surface, surfaceOwner); 430 436 } 431 437 #endif -
trunk/Source/WebKit/qt/WebCoreSupport/PageClientQt.h
r122175 r128315 102 102 #if USE(3D_GRAPHICS) 103 103 virtual void createPlatformGraphicsContext3D(PlatformGraphicsContext3D*, 104 PlatformGraphicsSurface3D*); 104 PlatformGraphicsSurface3D*, 105 QObject**); 105 106 #endif 106 107 … … 210 211 #if USE(3D_GRAPHICS) 211 212 virtual void createPlatformGraphicsContext3D(PlatformGraphicsContext3D*, 212 PlatformGraphicsSurface3D*); 213 PlatformGraphicsSurface3D*, 214 QObject**); 213 215 #endif 214 216
Note: See TracChangeset
for help on using the changeset viewer.