Changeset 95777 in webkit
- Timestamp:
- Sep 22, 2011 8:00:38 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r95776 r95777 1 2011-09-22 Darin Adler <darin@apple.com> 2 3 Refactor checks for antialiasing lines to share a single function 4 https://bugs.webkit.org/show_bug.cgi?id=68666 5 6 Reviewed by Dan Bernstein. 7 8 * rendering/RenderBlock.cpp: 9 (WebCore::RenderBlock::paintColumnRules): Call shouldAntialiasLines. 10 * rendering/RenderBoxModelObject.cpp: 11 (WebCore::RenderBoxModelObject::paintBorder): Ditto. 12 (WebCore::RenderBoxModelObject::shouldAntialiasLines): Added. 13 * rendering/RenderBoxModelObject.h: Added shouldAntialiasLines function. 14 * rendering/RenderInline.cpp: 15 (WebCore::RenderInline::paintOutlineForLine): Call shouldAntialiasLines. 16 * rendering/RenderTableCell.cpp: 17 (WebCore::RenderTableCell::paintCollapsedBorder): Ditto. 18 1 19 2011-09-22 Antoine Labour <piman@chromium.org> 2 20 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r95756 r95777 2343 2343 LayoutUnit ruleLogicalLeft = style()->isLeftToRightDirection() ? 0 : contentLogicalWidth(); 2344 2344 2345 const AffineTransform& currentCTM = paintInfo.context->getCTM(); 2346 bool antialias = !currentCTM.isIdentityOrTranslationOrFlipped(); 2345 bool antialias = shouldAntialiasLines(paintInfo.context); 2347 2346 2348 2347 for (unsigned i = 0; i < colCount; i++) { -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r95697 r95777 1538 1538 RoundedRect innerBorder = style->getRoundedInnerBorderFor(rect, includeLogicalLeftEdge, includeLogicalRightEdge); 1539 1539 1540 const AffineTransform& currentCTM = graphicsContext->getCTM();1541 // FIXME: this isn't quite correct. We may want to antialias when scaled by a non-integral value, or when the translation is non-integral.1542 bool antialias = !currentCTM.isIdentityOrTranslationOrFlipped();1543 1544 1540 bool haveAlphaColor = false; 1545 1541 bool haveAllSolidEdges = true; … … 1627 1623 } 1628 1624 1625 bool antialias = shouldAntialiasLines(graphicsContext); 1629 1626 if (haveAlphaColor) 1630 1627 paintTranslucentBorderSides(graphicsContext, style, outerBorder, innerBorder, edges, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge, antialias); … … 2476 2473 } 2477 2474 2475 bool RenderBoxModelObject::shouldAntialiasLines(GraphicsContext* context) 2476 { 2477 // FIXME: We may want to not antialias when scaled by an integral value, 2478 // and we may want to antialias when translated by a non-integral value. 2479 return !context->getCTM().isIdentityOrTranslationOrFlipped(); 2480 } 2481 2478 2482 } // namespace WebCore -
trunk/Source/WebCore/rendering/RenderBoxModelObject.h
r93435 r95777 190 190 RenderBoxModelObject* continuation() const; 191 191 void setContinuation(RenderBoxModelObject*); 192 193 static bool shouldAntialiasLines(GraphicsContext*); 192 194 193 195 private: -
trunk/Source/WebCore/rendering/RenderInline.cpp
r95721 r95777 1422 1422 EBorderStyle outlineStyle = styleToUse->outlineStyle(); 1423 1423 1424 const AffineTransform& currentCTM = graphicsContext->getCTM(); 1425 bool antialias = !currentCTM.isIdentityOrTranslationOrFlipped(); 1424 bool antialias = shouldAntialiasLines(graphicsContext); 1426 1425 1427 1426 LayoutUnit offset = style()->outlineOffset(); -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r95573 r95777 945 945 borders.addBorder(rightVal, BSRight, renderRight, x + w - rightWidth, y, x + w, y + h, rightStyle); 946 946 947 const AffineTransform& currentCTM = graphicsContext->getCTM(); 948 bool antialias = !currentCTM.isIdentityOrTranslationOrFlipped(); 947 bool antialias = shouldAntialiasLines(graphicsContext); 949 948 950 949 for (CollapsedBorder* border = borders.nextBorder(); border; border = borders.nextBorder()) {
Note: See TracChangeset
for help on using the changeset viewer.