Add some new controllers, and refine tests
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Mar 2016 08:22:32 +0000 (08:22 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Mar 2016 08:22:32 +0000 (08:22 +0000)
commitd5cfe5c111f96294eca0b68b43129dbe9193ba11
tree0c132d0e24036523be94539d6a9a8132e5387593
parent451b0f1347ad2a960022fe62e60d4859b1546899
Add some new controllers, and refine tests
https://bugs.webkit.org/show_bug.cgi?id=154914

Reviewed by Simon Fraser.

Improve tests.

* Animometer/tests/master/focus.html: Move each particle into a layer. Put the particle
in a container element. Expand the container element by the max blur radius, and clip
overflow. This way, when the blur is applied, it avoids causing layer resizes.
* Animometer/tests/master/resources/focus.js:
(FocusElement.Utilities.createClass): Create a container element, and put the particle
inside.
(hide): Set display:none.
(show): Set display:block.
(animate): Apply filters to the container element.
(FocusStage.call.initialize): Instead of inserting and removing elements from the DOM,
keep them in the stage, but set the display style instead. Use this._offsetIndex to
keep track of which elements are displayed.
(FocusStage.call.animate): Move some calculations around to avoid doing unneeded math.
(FocusStage.call.getBlurValue): Make sure elements are always blurred.
(FocusStage.call.getOpacityValue): Make sure elements have some opacity.
* Animometer/tests/master/resources/multiply.js: Have the particles on the edge of the
stage appear less black when the complexity gets large enough.
(tune): Have this._distanceFactor calculate the factor. Avoid calculating square root each
frame.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PerformanceTests/Animometer/tests/master/focus.html
PerformanceTests/Animometer/tests/master/resources/focus.js
PerformanceTests/Animometer/tests/master/resources/multiply.js
PerformanceTests/ChangeLog