Skip to content

Commit

Permalink
✏️ Clarify performance optimization documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoLegends committed May 26, 2018
1 parent ad7d15e commit b7dfcef
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,12 @@ export default class KenBurnsCarousel extends HTMLElement {

/*
* Here we wrap the image element into a surrounding div that is promoted
* onto a separate GPU layer using `will-change: transform`. If the filter applied
* to the image using CSS var `img-filter` is expensive (such as `blur`) this
* leads the browser to pre-compute the image filter and only really apply the 3D
* transformation that is very cheap every frame.
* onto a separate GPU layer using `will-change: transform`. The wrapping div
* is then ken-burns-animated instead of the image itself.
*
* This leads the browser to pre-computing the image filter (--img-filter)
* instead of computing it every frame. This can be a massive performance boost
* if the filter is expensive.
*
* See https://developers.google.com/web/updates/2017/10/animated-blur for
* more information.
Expand Down

0 comments on commit b7dfcef

Please sign in to comment.