Changeset 190912 in webkit
- Timestamp:
- Oct 12, 2015 6:11:45 PM (8 years ago)
- Location:
- trunk/PerformanceTests
- Files:
-
- 5 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PerformanceTests/Animometer/runner/resources/tests.js
r190903 r190912 137 137 )); 138 138 139 Suites.push(new Suite("Basic canvas path suite", 140 [ 141 { 142 url: "simple/simple-canvas-paths.html?pathType=quadratic", 143 name: "Canvas quadratic segments" 144 }, 145 { 146 url: "simple/simple-canvas-paths.html?pathType=bezier", 147 name: "Canvas bezier segments" 148 }, 149 { 150 url: "simple/simple-canvas-paths.html?&pathType=arcTo", 151 name: "Canvas arcTo segments" 152 }, 153 { 154 url: "simple/simple-canvas-paths.html?pathType=arc", 155 name: "Canvas arc segments" 156 }, 157 { 158 url: "simple/simple-canvas-paths.html?pathType=rect", 159 name: "Canvas rects" 160 }, 161 { 162 url: "simple/simple-canvas-paths.html?&pathType=arcToFill", 163 name: "Canvas arcTo segments, fill" 164 }, 165 { 166 url: "simple/simple-canvas-paths.html?pathType=arcFill", 167 name: "Canvas arc segments, fill" 168 }, 169 { 170 url: "simple/simple-canvas-paths.html?pathType=rectFill", 171 name: "Canvas rects, fill" 172 } 173 ] 174 )); 175 139 176 Suites.push(new Suite("Complex examples", 140 177 [ -
trunk/PerformanceTests/Animometer/tests/resources/stage.js
r190575 r190912 56 56 }, 57 57 58 randomBool: function() 59 { 60 return !!Math.round(this.random(0, 1)); 61 }, 62 58 63 randomInt: function(min, max) 59 64 { 60 return Math. floor(this.random(min, max));65 return Math.round(this.random(min, max)); 61 66 }, 62 67 -
trunk/PerformanceTests/ChangeLog
r190908 r190912 1 2015-10-12 Jon Lee <jonlee@apple.com> 2 3 Add basic canvas tests 4 https://bugs.webkit.org/show_bug.cgi?id=150066 5 rdar://problem/23081143 6 7 Reviewed by Dean Jackson. 8 9 This adds a new test suite that will cover all of the path-based canvas calls. 10 The patch will be divided up to cover tests with similar techniques. 11 12 The simplest version uses a SimpleCanvasStage. 13 14 * Animometer/runner/resources/tests.js: Add tests for quadratic, bezier, arcTo, 15 arc, and rect segments. Also include arcTo, arc, and rect fills. 16 * Animometer/tests/resources/stage.js: 17 (Stage.prototype.randomBool): Added for counterclockwise property for arc segments. 18 (Stage.prototype.randomInt): Fix how values are rounded, used by randomBool. It should 19 round instead of flooring everything. 20 * Animometer/tests/simple/resources/simple-canvas.js: Added. Defines common classes 21 used by all simple canvas tests. The page reads best bottom to top. 22 (SimpleCanvasStage): Basic stage. Pass a canvasObject which will be used to create new 23 objects as needed in tune(). 24 (SimpleCanvasStage.prototype.tune): Modeled on other tests. Adds and removed objects 25 as specified by the provided |count|. 26 (SimpleCanvasStage.prototype.animate): Iterate over all the objects and ask them to draw. 27 There is no "animating" of the objects; they will just paint statically on the canvas. 28 (SimpleCanvasAnimator): Basic animator clears the canvas prior to painting. 29 (SimpleCanvasBenchmark): Hard-code the feedback loop parameters instead of including 30 them in the query parameters to the test URLs. 31 (SimpleCanvasBenchmark.prototype.createAnimator): 32 * Animometer/tests/simple/simple-canvas-paths.html: Added. 33 34 * Animometer/tests/simple/resources/simple-canvas-paths.js: Added. There is no "animating" 35 of these objects--they just paint statically on the canvas. 36 (CanvasQuadraticSegment): Paint a quadratic segment stroke. 37 (CanvasBezierSegment): Paint a bezier segment stroke. 38 (CanvasArcToSegment): Paint an arcTo stroke. 39 (CanvasArcSegment): Paint an arc stroke. 40 (CanvasRect): Paint a rect. 41 (CanvasRectFill): Paint a filled rect. 42 43 (CanvasPathBenchmark): 44 (CanvasPathBenchmark.prototype.createStage): Look for the pathType and create the 45 stage using the right paint object. 46 (window.benchmarkClient.create): 47 1 48 2015-10-12 Jon Lee <jonlee@apple.com> 2 49
Note: See TracChangeset
for help on using the changeset viewer.