Ejemplo n.º 1
0
void WebFullScreenManagerWin::setRootFullScreenLayer(WebCore::GraphicsLayer* layer)
{
    // Host the full screen layer if its given to us; otherwise it will be disconnected 
    // from the layer heirarchy and cause an ASSERT during resync.
    // FIXME: Disable setting RenderLayer::setAnimating() to make this unnecessary.
    if (m_fullScreenRootLayer == layer)
        return;
    m_fullScreenRootLayer = layer;

    if (!m_fullScreenRootLayer) {
        m_page->send(Messages::WebFullScreenManagerProxy::ExitAcceleratedCompositingMode());
        if (m_rootLayer) {
            m_rootLayer->removeAllChildren();
            m_rootLayer = 0;
        }
        return;
    }

    if (!m_rootLayer) {
        m_rootLayer = GraphicsLayer::create(0);
#ifndef NDEBUG
        m_rootLayer->setName("Full screen root layer");
#endif
        m_rootLayer->setDrawsContent(false);
        m_rootLayer->setSize(getFullScreenRect().size());
    }

    m_rootLayer->removeAllChildren();

    if (m_fullScreenRootLayer)
        m_rootLayer->addChild(m_fullScreenRootLayer);

    m_rootLayer->syncCompositingStateForThisLayerOnly();
    m_page->corePage()->mainFrame()->view()->syncCompositingStateIncludingSubframes();
}
Ejemplo n.º 2
0
void WinSnippingArea::setFullScreen()
{
    auto fullScreenRect = getFullScreenRect();
    setGeometry(fullScreenRect);
    QWidget::show();
}