Add canvas path tests
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Oct 2015 01:18:03 +0000 (01:18 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Oct 2015 01:18:03 +0000 (01:18 +0000)
commit6fa8de0a8ec10a24b23f36cf08ee6cc2667d4551
treec5462a1948111991ab2a83f501d19b0714877f0f
parentbbd608d90816b31f9c807f1f3e82075b919d8a37
Add canvas path tests
https://bugs.webkit.org/show_bug.cgi?id=150067
rdar://problem/23081463

Reviewed by Dean Jackson.

* Animometer/runner/resources/tests.js: Add a quadratic and bezier path test.

* Animometer/tests/simple/resources/simple-canvas.js:
(SimpleCanvasStage.prototype.tune): This kind of test joins all of the segments
into one long path, and tries to render that one path. Random points make it
difficult to tell what is going on, so add a parameter to the constructor to
confine the area where the random coordinates can land. The more complicated the
case is, the larger an area the path will cover. Add an artificial minimum so
that the first 200 points aren't confined to a space that is too small.

* Animometer/tests/simple/resources/simple-canvas-paths.js:
(SimpleCanvasPathStrokeStage): Add a new kind of stage that inherits from
SimpleCanvasStage. Each time the frame animates a random line width and stroke
color are chosen. The path setup is done outside of each paint object.
(CanvasQuadraticPoint): This point just calls quadraticCurveTo.
(CanvasPathBenchmark.prototype.createStage): Add the tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PerformanceTests/Animometer/runner/resources/tests.js
PerformanceTests/Animometer/tests/simple/resources/simple-canvas-paths.js
PerformanceTests/Animometer/tests/simple/resources/simple-canvas.js
PerformanceTests/ChangeLog