本文整理汇总了C++中DrawingAreaProxy类的典型用法代码示例。如果您正苦于以下问题:C++ DrawingAreaProxy类的具体用法?C++ DrawingAreaProxy怎么用?C++ DrawingAreaProxy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DrawingAreaProxy类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resetPaintNode
void QQuickWebPagePrivate::resetPaintNode()
{
m_paintNode = 0;
DrawingAreaProxy* drawingArea = webPageProxy->drawingArea();
if (drawingArea && drawingArea->layerTreeHostProxy())
drawingArea->layerTreeHostProxy()->purgeGLResources();
}
示例2: setDrawingAreaSize
void QQuickWebPagePrivate::setDrawingAreaSize(const QSize& size)
{
DrawingAreaProxy* drawingArea = webPageProxy->drawingArea();
if (!drawingArea)
return;
drawingArea->setSize(WebCore::IntSize(size), WebCore::IntSize());
}
示例3: page
void WebViewNix::didChangeContentPosition(const WebCore::FloatPoint& trajectoryVector)
{
DrawingAreaProxy* drawingArea = page()->drawingArea();
if (!drawingArea)
return;
FloatRect visibleContentsRect(contentPosition(), visibleContentsSize());
visibleContentsRect.intersect(FloatRect(FloatPoint(), contentsSize()));
drawingArea->setVisibleContentsRect(visibleContentsRect, trajectoryVector);
}
示例4: ENABLE
void QGraphicsWKView::takeSnapshot(const QSize& size, const QRect& contentsRect)
{
#if ENABLE(TILED_BACKING_STORE)
DrawingAreaProxy* drawingArea = page()->d->page->drawingArea();
if (drawingArea->info().type != DrawingAreaProxy::TiledDrawingAreaType)
return;
TiledDrawingAreaProxy* tiledDrawingArea = static_cast<TiledDrawingAreaProxy*>(drawingArea);
tiledDrawingArea->takeSnapshot(size, contentsRect);
#endif
}
示例5: ASSERT_NOT_REACHED
const RemoteLayerTreeHost* RemoteScrollingCoordinatorProxy::layerTreeHost() const
{
DrawingAreaProxy* drawingArea = m_webPageProxy.drawingArea();
if (!drawingArea || drawingArea->type() != DrawingAreaTypeRemoteLayerTree) {
ASSERT_NOT_REACHED();
return nullptr;
}
RemoteLayerTreeDrawingAreaProxy* remoteDrawingArea = toRemoteLayerTreeDrawingAreaProxy(drawingArea);
return &remoteDrawingArea->remoteLayerTreeHost();
}
示例6: coordinatedGraphicsScene
CoordinatedGraphicsScene* WebView::coordinatedGraphicsScene()
{
DrawingAreaProxy* drawingArea = m_page->drawingArea();
if (!drawingArea)
return 0;
WebKit::CoordinatedLayerTreeHostProxy* layerTreeHostProxy = drawingArea->coordinatedLayerTreeHostProxy();
if (!layerTreeHostProxy)
return 0;
return layerTreeHostProxy->coordinatedGraphicsScene();
}
示例7: syncVisibleContents
void PageViewportController::syncVisibleContents(const FloatPoint& trajectoryVector)
{
DrawingAreaProxy* drawingArea = m_webPageProxy->drawingArea();
if (!drawingArea || m_viewportSize.isEmpty() || m_contentsSize.isEmpty())
return;
FloatRect visibleContentsRect(clampViewportToContents(m_viewportPos, m_effectiveScale), viewportSizeInContentsCoordinates());
visibleContentsRect.intersect(FloatRect(FloatPoint::zero(), m_contentsSize));
drawingArea->setVisibleContentsRect(visibleContentsRect, m_effectiveScale, trajectoryVector);
m_client->didChangeVisibleContents();
}
示例8: ENABLE
void QGraphicsWKViewPrivate::commitScale()
{
#if ENABLE(TILED_BACKING_STORE)
DrawingAreaProxy* drawingArea = page->d->page->drawingArea();
float newScale = q->scale();
if (drawingArea->type() == DrawingAreaTypeTiled) {
TiledDrawingAreaProxy* tiledDrawingArea = static_cast<TiledDrawingAreaProxy*>(drawingArea);
if (tiledDrawingArea->contentsScale() == newScale)
return;
tiledDrawingArea->setContentsScale(newScale);
}
#endif
}
示例9: computeEffectiveOpacity
void QQuickWebPagePrivate::paintToCurrentGLContext()
{
if (!q->isVisible())
return;
QTransform transform = q->itemTransform(0, 0);
transform.scale(contentsScale, contentsScale);
float opacity = computeEffectiveOpacity(q);
QRectF clipRect = viewportItem->mapRectToScene(viewportItem->boundingRect());
if (!clipRect.isValid())
return;
DrawingAreaProxy* drawingArea = webPageProxy->drawingArea();
if (!drawingArea)
return;
drawingArea->paintToCurrentGLContext(transform, opacity, clipRect);
}
示例10: informVisibleContentChange
void QtViewportHandler::informVisibleContentChange(const QPointF& trajectoryVector)
{
DrawingAreaProxy* drawingArea = m_webPageProxy->drawingArea();
if (!drawingArea)
return;
if (m_lastVisibleContentsRect == visibleContentsRect())
return;
qreal scale = m_pageItem->contentsScale();
if (scale != m_lastCommittedScale)
emit m_viewportItem->experimental()->test()->contentsScaleCommitted();
m_lastCommittedScale = scale;
m_lastVisibleContentsRect = visibleContentsRect();
drawingArea->setVisibleContentsRect(visibleContentsRect(), scale, trajectoryVector, m_viewportItem->contentPos());
// Ensure that updatePaintNode is always called before painting.
m_pageItem->update();
}
示例11: updateSize
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());
}
}
}