Add a new graphics test for CanvasRenderingContext2D functions: getImageData and...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Feb 2016 06:21:37 +0000 (06:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Feb 2016 06:21:37 +0000 (06:21 +0000)
commit50d523cd2d64949787f335a5f4afe3036a4bc8b7
tree95e19edc5382d2c573ddf1bcf8ec542a1d36bd82
parent7ceaa2e2f2dbaf577c1fa634e01c2ab44354d7f2
Add a new graphics test for CanvasRenderingContext2D functions: getImageData and putImageData
https://bugs.webkit.org/show_bug.cgi?id=151716

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-02-05
Reviewed by Darin Adler.

The purpose of this test is to measure the performance of getImageData
and putImageData functions. This test draws a background on the canvas
and then gets some random tiles from this background and draw them in
destinations different from their original sources.

* Animometer/resources/debug-runner/tests.js: Adding the new test to the canvas simple tests suite.

* Animometer/resources/extensions.js:
(Array.prototype.shuffle): Shuffles the elements of an array.

(Point.zero): Returns a new Point object whose x and y are equal zero.
(Point.prototype.str): Used for debugging the Point object.

* Animometer/tests/simple/resources/tiled-canvas-image.js: Added.
(CanvasImageTile):
(CanvasImageTile.prototype.getImageData):
(CanvasImageTile.prototype.putImageData):
(Stage.call.initialize):
(Stage.call._createTiles):
(Stage.call._nextTilePosition):
(Stage.call.tune):
(Stage.call._drawBackground):
(Stage.call.animate):
(Stage.call.complexity):
(Stage.call):
* Animometer/tests/simple/tiled-canvas-image.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PerformanceTests/Animometer/resources/debug-runner/tests.js
PerformanceTests/Animometer/resources/extensions.js
PerformanceTests/Animometer/tests/simple/resources/tiled-canvas-image.js [new file with mode: 0644]
PerformanceTests/Animometer/tests/simple/tiled-canvas-image.html [new file with mode: 0644]
PerformanceTests/ChangeLog