[Webkit-unassigned] [Bug 51869] Shadows are not drawn when filling a rect with a gradient fillStyle on Mac and Chromium-Mac
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 5 17:22:29 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=51869
Simon Fraser (smfr) <simon.fraser at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #78073|review?, commit-queue? |review-, commit-queue-
Flag| |
--- Comment #14 from Simon Fraser (smfr) <simon.fraser at apple.com> 2011-01-05 17:22:29 PST ---
(From update of attachment 78073)
View in context: https://bugs.webkit.org/attachment.cgi?id=78073&action=review
Does this patch alter any of the canvas/ test results?
> WebCore/ChangeLog:10
> + The solution is to draw the gradient into a transparency layer,
Strictly speaking, a transparency layer is something else. This is just a CGLayer.
> WebCore/platform/graphics/cg/GraphicsContextCG.cpp:608
> - CGContextSaveGState(context);
> - CGContextClipToRect(context, rect);
> + CGLayerRef layer = CGLayerCreateWithContext(context, CGSizeMake(rect.width(), rect.height()), 0);
> + CGContextRef layerContext = CGLayerGetContext(layer);
> + m_state.fillGradient->paint(layerContext);
> CGContextConcatCTM(context, m_state.fillGradient->gradientSpaceTransform());
> - m_state.fillGradient->paint(this);
> - CGContextRestoreGState(context);
> + CGContextDrawLayerAtPoint(context, CGPointMake(rect.left(), rect.top()), layer);
> + CGLayerRelease(layer);
You should only create the CGLayerRef if you know it should render with a shadow.
--
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