GraphicsContext* FilterEffectRendererHelper::applyFilterEffect()
{
    ASSERT(m_haveFilterEffect && m_renderLayer->filterRenderer());
    FilterEffectRenderer* filter = m_renderLayer->filterRenderer();
    filter->inputContext()->restore();

    filter->apply();

    // Get the filtered output and draw it in place.
    m_savedGraphicsContext->drawImageBuffer(filter->output(), filter->outputRect());

    filter->clearIntermediateResults();

    return m_savedGraphicsContext;
}
示例#2
0
GraphicsContext* FilterEffectRendererHelper::applyFilterEffect()
{
    ASSERT(m_haveFilterEffect && m_renderLayer->filter());
    FilterEffectRenderer* filter = m_renderLayer->filter();
    filter->apply();
    
    filter->inputContext()->restore();
    
    // Get the filtered output and draw it in place.
    IntRect destRect = filter->outputRect();
    destRect.move(m_paintOffset.x(), m_paintOffset.y());
    
    m_savedGraphicsContext->drawImageBuffer(filter->output(), m_renderLayer->renderer()->style()->colorSpace(), destRect, CompositeSourceOver);
    
    return m_savedGraphicsContext;
}
示例#3
0
void FilterEffectRendererHelper::applyFilterEffect(GraphicsContext* destinationContext)
{
    ASSERT(m_haveFilterEffect && m_renderLayer->filterRenderer());
    FilterEffectRenderer* filter = m_renderLayer->filterRenderer();
    filter->inputContext()->restore();

    filter->apply();
    
    // Get the filtered output and draw it in place.
    LayoutRect destRect = filter->outputRect();
    destRect.move(m_paintOffset.x(), m_paintOffset.y());
    
    destinationContext->drawImageBuffer(filter->output(), m_renderLayer->renderer().style()->colorSpace(), pixelSnappedIntRect(destRect), CompositeSourceOver);
    
    filter->clearIntermediateResults();
}
void FilterEffectRendererHelper::applyFilterEffect(GraphicsContext& destinationContext)
{
    ASSERT(m_haveFilterEffect && m_renderLayer->filterRenderer());
    FilterEffectRenderer* filter = m_renderLayer->filterRenderer();
    filter->inputContext()->restore();

    filter->apply();
    
    // Get the filtered output and draw it in place.
    LayoutRect destRect = filter->outputRect();
    destRect.move(m_paintOffset.x(), m_paintOffset.y());

    destinationContext.drawImageBuffer(filter->output(), m_renderLayer->renderer().style().colorSpace(),
        snapRectToDevicePixels(destRect, m_renderLayer->renderer().document().deviceScaleFactor()));

    filter->clearIntermediateResults();
}
GraphicsContext* FilterEffectRendererHelper::applyFilterEffect()
{
    ASSERT(m_haveFilterEffect && m_renderLayer->filterRenderer());
    FilterEffectRenderer* filter = m_renderLayer->filterRenderer();

    if (m_renderLayer->renderer()->document().settings()->deferredFiltersEnabled()) {
        GraphicsContext* context = m_savedGraphicsContext;
        context->endLayer();
        context->restore();
        return context;
    }

    filter->inputContext()->restore();

    filter->apply();

    // Get the filtered output and draw it in place.
    m_savedGraphicsContext->drawImageBuffer(filter->output(), filter->outputRect());

    filter->clearIntermediateResults();

    return m_savedGraphicsContext;
}