https://bugs.webkit.org/show_bug.cgi?id=150076
<rdar://problem/
23082285>
Reviewed by Dean Jackson.
* Animometer/runner/resources/tests.js: Add new line path tests, with different
line joins.
* Animometer/tests/simple/resources/simple-canvas-paths.js:
(CanvasLinePathStage): The stage is the same as the SimpleCanvasPathStrokeStage
but sets the lineJoin on the context.
(CanvasPathBenchmark.prototype.createStage): Add the tests.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190920
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
url: "simple/simple-canvas-paths.html?pathType=line&lineCap=square",
name: "Canvas line segments, square caps"
},
+ {
+ url: "simple/simple-canvas-paths.html?pathType=linePath&lineJoin=bevel",
+ name: "Canvas line path, bevel join"
+ },
+ {
+ url: "simple/simple-canvas-paths.html?pathType=linePath&lineJoin=round",
+ name: "Canvas line path, round join"
+ },
+ {
+ url: "simple/simple-canvas-paths.html?pathType=linePath&lineJoin=miter",
+ name: "Canvas line path, miter join"
+ },
{
url: "simple/simple-canvas-paths.html?pathType=quadratic",
name: "Canvas quadratic segments"
CanvasLineSegmentStage.prototype = Object.create(SimpleCanvasStage.prototype);
CanvasLineSegmentStage.prototype.constructor = CanvasLineSegmentStage;
+function CanvasLinePathStage(element, options)
+{
+ SimpleCanvasPathStrokeStage.call(this, element, options, CanvasLinePoint);
+ this.context.lineJoin = options["lineJoin"] || "bevel";
+}
+CanvasLinePathStage.prototype = Object.create(SimpleCanvasPathStrokeStage.prototype);
+CanvasLinePathStage.prototype.constructor = CanvasLinePathStage;
+
// === BENCHMARK ===
function CanvasPathBenchmark(suite, test, options, recordTable, progressBar) {
switch (this._options["pathType"]) {
case "line":
return new CanvasLineSegmentStage(element, this._options);
+ case "linePath": {
+ if ("lineJoin" in this._options)
+ return new CanvasLinePathStage(element, this._options);
+ break;
+ }
case "quadratic":
return new SimpleCanvasStage(element, this._options, CanvasQuadraticSegment);
case "quadraticPath":
+2015-10-12 Jon Lee <jonlee@apple.com>
+
+ Add canvas line path tests
+ https://bugs.webkit.org/show_bug.cgi?id=150076
+ <rdar://problem/23082285>
+
+ Reviewed by Dean Jackson.
+
+ * Animometer/runner/resources/tests.js: Add new line path tests, with different
+ line joins.
+ * Animometer/tests/simple/resources/simple-canvas-paths.js:
+ (CanvasLinePathStage): The stage is the same as the SimpleCanvasPathStrokeStage
+ but sets the lineJoin on the context.
+ (CanvasPathBenchmark.prototype.createStage): Add the tests.
+
2015-10-12 Jon Lee <jonlee@apple.com>
Add missing paint objects for arc and arcTo fills