[webkit-reviews] review granted: [Bug 217568] [MotionMark] Add an inline path data type to represent a circular sector : [Attachment 411081] Work in progress

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 11 19:10:13 PDT 2020

Darin Adler <darin at apple.com> has granted Wenson Hsieh
<wenson_hsieh at apple.com>'s request for review:
Bug 217568: [MotionMark] Add an inline path data type to represent a circular

Attachment 411081: Work in progress


--- Comment #4 from Darin Adler <darin at apple.com> ---
Comment on attachment 411081
  --> https://bugs.webkit.org/attachment.cgi?id=411081
Work in progress

View in context: https://bugs.webkit.org/attachment.cgi?id=411081&action=review

> Source/WebCore/platform/graphics/InlinePathData.h:52
>      bool hasStart { false };
> +    bool endsAtStart { false };

Not great to have these be separate booleans. These two booleans together have
only 3 valid states, not 4.

> Source/WebCore/platform/graphics/Path.cpp:270
> +	       arc.center.x() + arc.radius * acosf(arc.endAngle),
> +	       arc.center.y() + arc.radius * asinf(arc.endAngle)

I suggest using std::acos and std::asin instead of acosf and asinf

More information about the webkit-reviews mailing list