[Webkit-unassigned] [Bug 28268] adjustLineToPixelBoundaries used in platform/GraphicsContext drawLine needs refactoring finished.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 18 09:28:17 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28268


Eric Seidel <eric at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #35044|review?                     |review+, commit-queue+
               Flag|                            |




--- Comment #33 from Eric Seidel <eric at webkit.org>  2009-08-18 09:28:16 PDT ---
(From update of attachment 35044)
This seems unneeded:
+    // Special case 1px dotted borders for speed.
+    if (width == 1)
+        return 1.0f;

A few floating point divisions should not going to outweigh the cost of a
function call.

We don't even have to subtract the remainder here, do we?
 602     int numSegments = (distance - remainder) / width;
unless I'm forgetting how int / int works.
(It's fine to do so, just surprised to see it).

It seems that patternOffsetForDashes could probably use a bit more commentary
around the math.

Looks OK though.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list