Skip to content

Commit

Permalink
[qtwebkit] Disable persistent SG/GL when WebView is used.
Browse files Browse the repository at this point in the history
It is not working and this prevents webkit from invalidating itself
which will result in blank views and potentially crashes.

The persistent SG / GL toggle whether the scene graph and
opengl context is released when the window is hidden. Starting
with the 5.2 update, all QML applications have these flags
set.
  • Loading branch information
sletta committed Aug 12, 2014
1 parent 940abe6 commit 7c0d2b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions qtwebkit/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp
Expand Up @@ -76,7 +76,7 @@ QSGNode* QQuickWebPage::updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData*)

QtWebPageSGNode* node = static_cast<QtWebPageSGNode*>(oldNode);

const QWindow* window = this->window();
QQuickWindow* window = this->window();
ASSERT(window);

WKPageRef pageRef = webViewPrivate->webPage.get();
Expand All @@ -87,8 +87,11 @@ QSGNode* QQuickWebPage::updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData*)
emit d->viewportItem->experimental()->test()->devicePixelRatioChanged();
}

if (!node)
if (!node) {
node = new QtWebPageSGNode;
window->setPersistentOpenGLContext(true);
window->setPersistentSceneGraph(true);
}

node->setCoordinatedGraphicsScene(scene);

Expand Down

0 comments on commit 7c0d2b7

Please sign in to comment.