Add missing paint objects for arc and arcTo fills
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Oct 2015 02:11:06 +0000 (02:11 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Oct 2015 02:11:06 +0000 (02:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150075
<rdar://problem/23082233>

Reviewed by Dean Jackson.

* Animometer/tests/simple/resources/simple-canvas-paths.js: Add missing paint objects
for arcTo and arc segment fills.
(CanvasArcToSegmentFill):
(CanvasArcToSegmentFill.prototype.draw):
(CanvasArcSegmentFill):
(CanvasArcSegmentFill.prototype.draw):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190919 268f45cc-cd09-0410-ab3c-d52691b4dbfc

PerformanceTests/Animometer/tests/simple/resources/simple-canvas-paths.js
PerformanceTests/ChangeLog

index 4d4fc30..25caec5 100644 (file)
@@ -104,6 +104,17 @@ CanvasArcToSegment.prototype.draw = function(context) {
     context.stroke();
 };
 
+function CanvasArcToSegmentFill(stage) {
+    CanvasArcToSegment.call(this, stage);
+};
+CanvasArcToSegmentFill.prototype.draw = function(context) {
+    context.fillStyle = this._color;
+    context.beginPath();
+    context.moveTo(this._point1.x, this._point1.y);
+    context.arcTo(this._point2.x, this._point2.y, this._point3.x, this._point3.y, this._radius);
+    context.fill();
+};
+
 function CanvasArcSegment(stage) {
     var maxSize = stage.randomInt(20, 200);
     var toCenter = stage.randomPosition(stage.size).subtract(new Point(maxSize/2, maxSize/2));
@@ -124,6 +135,16 @@ CanvasArcSegment.prototype.draw = function(context) {
     context.stroke();
 };
 
+function CanvasArcSegmentFill(stage) {
+    CanvasArcSegment.call(this, stage);
+};
+CanvasArcSegmentFill.prototype.draw = function(context) {
+    context.fillStyle = this._color;
+    context.beginPath();
+    context.arc(this._point.x, this._point.y, this._radius, this._startAngle, this._endAngle, this._counterclockwise);
+    context.fill();
+};
+
 function CanvasRect(stage) {
     this._width = stage.randomInt(20, 200);
     this._height = stage.randomInt(20, 200);
index 80b33d9..d74559f 100644 (file)
@@ -1,5 +1,20 @@
 2015-10-12  Jon Lee  <jonlee@apple.com>
 
+        Add missing paint objects for arc and arcTo fills
+        https://bugs.webkit.org/show_bug.cgi?id=150075
+        <rdar://problem/23082233>
+
+        Reviewed by Dean Jackson.
+
+        * Animometer/tests/simple/resources/simple-canvas-paths.js: Add missing paint objects
+        for arcTo and arc segment fills.
+        (CanvasArcToSegmentFill):
+        (CanvasArcToSegmentFill.prototype.draw):
+        (CanvasArcSegmentFill):
+        (CanvasArcSegmentFill.prototype.draw):
+
+2015-10-12  Jon Lee  <jonlee@apple.com>
+
         Add canvas line segment tests
         https://bugs.webkit.org/show_bug.cgi?id=150073
         <rdar://problem/23082138>