void QQuickWebPagePrivate::resetPaintNode() { m_paintNode = 0; DrawingAreaProxy* drawingArea = webPageProxy->drawingArea(); if (drawingArea && drawingArea->layerTreeHostProxy()) drawingArea->layerTreeHostProxy()->purgeGLResources(); }
void QQuickWebPagePrivate::updateSize() { QSizeF scaledSize = contentsSize * contentsScale; DrawingAreaProxy* drawingArea = webPageProxy->drawingArea(); if (drawingArea && drawingArea->layerTreeHostProxy()) drawingArea->layerTreeHostProxy()->setContentsSize(contentsSize); q->setSize(scaledSize); if (viewportItem->experimental()->flickableViewportEnabled()) { // Make sure that the content is sized to the page if the user did not // add other flickable items. If that is not the case, the user needs to // disable the default content item size property on the WebView and // bind the contentWidth and contentHeight accordingly, in accordance // accordance with normal Flickable behaviour. if (viewportItem->experimental()->useDefaultContentItemSize()) { viewportItem->setContentWidth(scaledSize.width()); viewportItem->setContentHeight(scaledSize.height()); } } }