コード例 #1
0
void CoordinatedLayerTreeHost::syncLayerFilters(CoordinatedLayerID id, const FilterOperations& filters)
{
    m_shouldSyncFrame = true;
#if ENABLE(CSS_SHADERS)
    checkCustomFilterProgramProxies(filters);
#endif
    m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::SetCompositingLayerFilters(id, filters));
}
コード例 #2
0
void CoordinatedLayerTreeHost::prepareCustomFilterProxiesIfNeeded(CoordinatedGraphicsLayerState& state)
{
    if (state.animationsChanged) {
        GraphicsLayerAnimations& activeAnimations = state.animations;
        for (size_t i = 0; i < activeAnimations.animations().size(); ++i) {
            const KeyframeValueList& keyframes = activeAnimations.animations().at(i).keyframes();
            if (keyframes.property() != AnimatedPropertyWebkitFilter)
                continue;
            for (size_t j = 0; j < keyframes.size(); ++j) {
                const FilterAnimationValue* filterValue = static_cast<const FilterAnimationValue*>(keyframes.at(i));
                checkCustomFilterProgramProxies(*filterValue->value());
            }
        }
    }

    if (state.filtersChanged)
        checkCustomFilterProgramProxies(state.filters);
}
コード例 #3
0
void CoordinatedLayerTreeHost::prepareCustomFilterProxiesForAnimations(GraphicsLayerAnimations& activeAnimations)
{
    for (size_t i = 0; i < activeAnimations.animations().size(); ++i) {
        const KeyframeValueList& keyframes = activeAnimations.animations().at(i).keyframes();
        if (keyframes.property() != AnimatedPropertyWebkitFilter)
            continue;
        for (size_t j = 0; j < keyframes.size(); ++j) {
            const FilterAnimationValue& filterValue = static_cast<const FilterAnimationValue&>(keyframes.at(j));
            checkCustomFilterProgramProxies(filterValue.value());
        }
    }
}
コード例 #4
0
void CoordinatedLayerTreeHost::willSyncLayerState(CoordinatedGraphicsLayerState& state)
{
#if ENABLE(CSS_SHADERS)
    if (state.animationsChanged)
        prepareCustomFilterProxiesForAnimations(state.animations);

    if (state.filtersChanged)
        checkCustomFilterProgramProxies(state.filters);
#else
    UNUSED_PARAM(state);
#endif
}
コード例 #5
0
void CoordinatedLayerTreeHost::setLayerAnimations(CoordinatedLayerID layerID, const GraphicsLayerAnimations& animations)
{
    m_shouldSyncFrame = true;
    GraphicsLayerAnimations activeAnimations = animations.getActiveAnimations();
#if ENABLE(CSS_SHADERS)
    for (size_t i = 0; i < activeAnimations.animations().size(); ++i) {
        const KeyframeValueList& keyframes = animations.animations().at(i).keyframes();
        if (keyframes.property() != AnimatedPropertyWebkitFilter)
            continue;
        for (size_t j = 0; j < keyframes.size(); ++j) {
            const FilterAnimationValue* filterValue = static_cast<const FilterAnimationValue*>(keyframes.at(i));
            checkCustomFilterProgramProxies(*filterValue->value());
        }
    }
#endif
    m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::SetLayerAnimations(layerID, activeAnimations));
}