[Webkit-unassigned] [Bug 39123] New: Unneeded fillRect call in RenderBoxModelObject::paintFillLayerExtended
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri May 14 10:29:26 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=39123
Summary: Unneeded fillRect call in
RenderBoxModelObject::paintFillLayerExtended
Product: WebKit
Version: 528+ (Nightly build)
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: Enhancement
Priority: P4
Component: Layout and Rendering
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: pgalizia at codeaurora.org
For SVN version 59242 of RenderBoxModelObject (and earlier):
In the RenderBoxModelObject::paintFillLayerExtended method, there's a call to fillRect for the baseColor (line 587), then another one a few lines later for bgColor (line 594). If the alpha of the bgColor is set to the max value (i.e., no blending), then the first fillRect for baseColor should be unnecessary.
Example: starting at line 581:
#####################################
// If we have an alpha and we are painting the root element, go ahead and blend with the base background color.
if (isOpaqueRoot) {
Color baseColor = view()->frameView()->baseBackgroundColor();
if (baseColor.alpha() > 0) {
context->save();
context->setCompositeOperation(CompositeCopy);
context->fillRect(rect, baseColor, style()->colorSpace()); // Can we check here for bgColor's alpha, and drop the draw if 0xff?
context->restore();
} else
context->clearRect(rect);
}
if (bgColor.isValid() && bgColor.alpha() > 0)
context->fillRect(rect, bgColor, style()->colorSpace()); /// If this has alpha 0xff, for example, that should make the above
#####################################
We do have a proposed patch for that, which will be attached shortly.
Found on an ARM-based system, but should be applicable across all platforms.
--
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