[webkit-reviews] review granted: [Bug 55436] No shadow when stroking a path with a gradient : [Attachment 84170] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Feb 28 22:12:42 PST 2011
Simon Fraser (smfr) <simon.fraser at apple.com> has granted Helder Correia
<helder at sencha.com>'s request for review:
Bug 55436: No shadow when stroking a path with a gradient
https://bugs.webkit.org/show_bug.cgi?id=55436
Attachment 84170: Patch
https://bugs.webkit.org/attachment.cgi?id=84170&action=review
------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=84170&action=review
> Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:616
> + const FloatRect rect = path.boundingRect();
> + const float lineWidth = strokeThickness();
> + const float doubleLineWidth = lineWidth * 2;
> + const float layerWidth = ceilf(rect.width() + doubleLineWidth);
> + const float layerHeight = ceilf(rect.height() +
doubleLineWidth);
It's not really customary to use const for local variables; just follow the
style in the rest of the file.
> Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:636
> + const float destinationX = roundf(rect.x() - lineWidth);
> + const float destinationY = roundf(rect.y() - lineWidth);
I don't think there's any point using 'const' for variables that are declared
just before you use them.
More information about the webkit-reviews
mailing list