Re: [csswg-drafts] [css-images] @image rule for manipulating images (#6807)

There's another interesting use-case, I've mentioned it to @LeaVerou at CSSDay, having the `@image-manipulation` add filters to the image and have the browser cache that, so that animating it later, using `transform` for instance, will not cause cause browsers to melt down.
We had these exp. at Wix, where when applying both at the same time caused havoc, but when animating a canvas that already applied the filters, i.e. with effects already composited, the results were order(s) of magnitude better.

So, the idea is to somehow hint to the browser that this image `will-not-change`, something like:

```CSS
@image-manipulation --recolor-effect {
  filter: url(recolor-filter.svg#filter);
  will-change: none;
}

.bg-parallax {
  backgorund-image: manipulate-image(image(url(bg.webp)));
}
```

And then animate `.bg-parallax` without extra damage.

-- 
GitHub Notification of comment by ydaniv
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6807#issuecomment-1153282253 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 12 June 2022 20:12:46 UTC