Beispiel #1
0
void WKCACFLayerRenderer::destroyRenderer()
{
    if (m_context) {
        CACFContextSetLayer(m_context.get(), 0);
        windowsForContexts().remove(m_context.get());
        WKCACFContextFlusher::shared().removeContext(m_context.get());
    }

    if (m_renderer)
        CARenderOGLDestroy(m_renderer);
    m_renderer = 0;
    m_d3dDevice = 0;
    if (s_d3d)
        s_d3d->Release();

    s_d3d = 0;
    m_rootLayer = 0;
    m_rootChildLayer = 0;

    m_mightBeAbleToCreateDeviceLater = true;
}
Beispiel #2
0
void WKCACFLayer::becomeRootLayerForContext(CACFContextRef context)
{
    CACFContextSetLayer(context, layer());
    setNeedsCommit();
}