void PageClientQGraphicsWidget::setRootGraphicsLayer(TextureMapperPlatformLayer* layer) { if (rootGraphicsLayer && !layer) { delete rootGraphicsLayer; rootGraphicsLayer = 0; QWebFramePrivate::core(page->mainFrame())->view()->syncCompositingStateRecursive(); createOrDeleteOverlay(); return; } if (!rootGraphicsLayer) rootGraphicsLayer = new PlatformLayerQGraphicsItem(); rootGraphicsLayer->setPlatformLayer(static_cast<TextureMapperContentLayer*>(layer)); rootGraphicsLayer->setParentItem(view); rootGraphicsLayer->setZValue(RootGraphicsLayerZValue); updateCompositingScrollPosition(); createOrDeleteOverlay(); }
void PageClientQGraphicsWidget::update(const QRect& dirtyRect) { view->update(dirtyRect); createOrDeleteOverlay(); if (overlay) overlay->update(QRectF(dirtyRect)); #if USE(ACCELERATED_COMPOSITING) && !USE(TEXTURE_MAPPER) syncLayers(); #endif }
void QGraphicsWebViewPrivate::update(const QRect & dirtyRect) { q->update(QRectF(dirtyRect)); createOrDeleteOverlay(); if (overlay) overlay->update(QRectF(dirtyRect)); #if USE(ACCELERATED_COMPOSITING) updateCompositingScrollPosition(); syncLayers(); #endif }
void PageClientQGraphicsWidget::update(const QRect& dirtyRect) { view->update(dirtyRect); createOrDeleteOverlay(); if (overlay) overlay->update(QRectF(dirtyRect)); #if USE(ACCELERATED_COMPOSITING) syncLayers(); // This might be a slow-scroll. We ensure that the compositing layers are in the right position. updateCompositingScrollPosition(); #endif }
void PageClientQGraphicsWidget::setRootGraphicsLayer(GraphicsLayer* layer) { if (rootGraphicsLayer) { rootGraphicsLayer.data()->setParentItem(0); view->scene()->removeItem(rootGraphicsLayer.data()); QWebFramePrivate::core(page->mainFrame())->view()->syncCompositingStateIncludingSubframes(); } rootGraphicsLayer = layer ? layer->platformLayer() : 0; if (rootGraphicsLayer) { rootGraphicsLayer.data()->setParentItem(view); rootGraphicsLayer.data()->setZValue(RootGraphicsLayerZValue); } createOrDeleteOverlay(); }
void PageClientQGraphicsWidget::setRootGraphicsLayer(QGraphicsItem* layer) { if (rootGraphicsLayer) { rootGraphicsLayer.data()->setParentItem(0); view->scene()->removeItem(rootGraphicsLayer.data()); QWebFramePrivate::core(page->mainFrame())->view()->syncCompositingStateRecursive(); } rootGraphicsLayer = layer ? layer->toGraphicsObject() : 0; if (layer) { layer->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); layer->setParentItem(view); layer->setZValue(RootGraphicsLayerZValue); updateCompositingScrollPosition(); } createOrDeleteOverlay(); }
void QGraphicsWebViewPrivate::setRootGraphicsLayer(QGraphicsItem* layer) { if (rootGraphicsLayer) { rootGraphicsLayer->setParentItem(0); q->scene()->removeItem(rootGraphicsLayer); QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive(); } rootGraphicsLayer = layer; if (layer) { layer->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); layer->setParentItem(q); layer->setZValue(RootGraphicsLayerZValue); updateCompositingScrollPosition(); } createOrDeleteOverlay(); }