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)); }
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); }
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()); } } }
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 }
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)); }