Esempio n. 1
0
WebKit::LayerTreeRenderer* QRawWebView::layerTreeRenderer() const
{
    WebKit::DrawingAreaProxy* drawingArea = d->m_webPageProxy->drawingArea();
    if (!drawingArea)
        return 0;
    WebKit::CoordinatedLayerTreeHostProxy* coordinatedLayerTreeHostProxy = drawingArea->coordinatedLayerTreeHostProxy();
    if (!coordinatedLayerTreeHostProxy)
        return 0;
    return coordinatedLayerTreeHostProxy->layerTreeRenderer();
}
Esempio n. 2
0
WebCore::CoordinatedGraphicsScene* QRawWebView::coordinatedGraphicsScene() const
{
    WebKit::DrawingAreaProxy* drawingArea = d->m_webPageProxy->drawingArea();
    if (!drawingArea)
        return 0;
    WebKit::CoordinatedLayerTreeHostProxy* coordinatedLayerTreeHostProxy = drawingArea->coordinatedLayerTreeHostProxy();
    if (!coordinatedLayerTreeHostProxy)
        return 0;
    return coordinatedLayerTreeHostProxy->coordinatedGraphicsScene();
}
Esempio n. 3
0
WebKit::LayerTreeRenderer* QRawWebView::layerTreeRenderer() const
{
    WebKit::DrawingAreaProxy* drawingArea = d->m_webPageProxy->drawingArea();
    if (!drawingArea)
        return 0;
    WebKit::LayerTreeCoordinatorProxy* layerTreeCoordinatorProxy = drawingArea->layerTreeCoordinatorProxy();
    if (!layerTreeCoordinatorProxy)
        return 0;
    return layerTreeCoordinatorProxy->layerTreeRenderer();
}
Esempio n. 4
0
void QRawWebView::setSize(const QSize& size)
{
    d->m_size = size;
    d->m_webPageProxy->setViewportSize(size);


    WebKit::DrawingAreaProxy* drawingArea = d->m_webPageProxy->drawingArea();
    if (!drawingArea)
        return;


    drawingArea->setSize(d->m_size, WebCore::IntSize());
    drawingArea->setVisibleContentsRect(WebCore::IntRect(WebCore::IntPoint(), d->m_size), 1 /*scale*/, WebCore::FloatPoint());
}
Esempio n. 5
0
void QRawWebView::setSize(const QSize& size)
{
    WebKit::DrawingAreaProxy* drawingArea = d->m_webPageProxy->drawingArea();
    if (!drawingArea)
        return;

    if (d->m_webPageProxy->useFixedLayout())
        drawingArea->setSize(size, WebCore::IntSize());

    d->m_size = size;

    drawingArea->setSize(d->m_size, WebCore::IntSize());
    drawingArea->setVisibleContentsRect(WebCore::IntRect(WebCore::IntPoint(), d->m_size), WebCore::FloatPoint());
}
Esempio n. 6
0
void QRawWebView::setSize(const QSize& size)
{
    WebKit::DrawingAreaProxy* drawingArea = d->m_webPageProxy->drawingArea();
    if (!drawingArea)
        return;

    if (d->m_webPageProxy->useFixedLayout())
        d->m_webPageProxy->setViewportSize(size);
    else {
        WebKit::CoordinatedLayerTreeHostProxy* coordinator = drawingArea->coordinatedLayerTreeHostProxy();
        if (!coordinator)
            return;
        coordinator->setContentsSize(WebCore::FloatSize(size.width(), size.height()));
    }

    d->m_size = size;

    drawingArea->setSize(d->m_size, WebCore::IntSize());
    drawingArea->setVisibleContentsRect(WebCore::IntRect(WebCore::IntPoint(), d->m_size), 1 /*scale*/, WebCore::FloatPoint());
}
Esempio n. 7
0
void QRawWebView::paint(const QMatrix4x4& transform, float opacity, unsigned paintFlags)
{
    WebKit::DrawingAreaProxy* drawingArea = d->m_webPageProxy->drawingArea();
    if (!drawingArea)
        return;

    WebKit::LayerTreeCoordinatorProxy* coordinatorProxy = drawingArea->layerTreeCoordinatorProxy();
    if (!coordinatorProxy)
        return;

    WebKit::LayerTreeRenderer* renderer = coordinatorProxy->layerTreeRenderer();
    if (!renderer)
        return;

    renderer->setActive(true);
    renderer->syncRemoteContent();

    WebCore::FloatRect rect(0, 0, d->m_size.width(), d->m_size.height());

    renderer->paintToCurrentGLContext(transform, opacity, transform.mapRect(rect), paintFlags);
}