[Webkit-unassigned] [Bug 39123] Unneeded fillRect call in RenderBoxModelObject::paintFillLayerExtended
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 2 12:56:27 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=39123
Simon Fraser (smfr) <simon.fraser at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #57679|review? |review-
Flag| |
--- Comment #15 from Simon Fraser (smfr) <simon.fraser at apple.com> 2010-06-02 12:56:26 PST ---
(From update of attachment 57679)
> Index: WebCore/rendering/RenderBoxModelObject.cpp
> ===================================================================
> + // If the bgColor alpha isn't 255, then we can apply the
> + // baseColor to fillRect. If bgColor's alpha is 255, then
> + // this would be overwritten anyway, so there's not much
> + // sense in doing it. It slightly helps performance in
> + // smaller devices.
The comment is slightly verbose. I think it would be better as:
// Don't bother filling with the base color if the background color is opaque.
You don't need to explain the performanc implications.
> + if (bgColor.alpha() != 255) {
Better as
if (!bgColor.hasAlpha())
> + context->save();
> + context->setCompositeOperation(CompositeCopy);
> + context->fillRect(rect, baseColor, style()->colorSpace());
> + context->restore();
> + }
> } else
> context->clearRect(rect);
Can't you also avoid the clearRect() if the bgColor is opaque?
--
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