Changeset 145366 in webkit
- Timestamp:
- Mar 11, 2013 8:43:06 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r145363 r145366 1 2013-03-11 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 3 [Qt] Enable tiled shadow blur for inset box shadows 4 https://bugs.webkit.org/show_bug.cgi?id=111736 5 6 Reviewed by Noam Rosenthal. 7 8 Paint inset box-shadows using the optimized tiled shadow blur, instead of 9 applying shadow blur to the entire painted rect. 10 11 This optimizes the default CSS on common pastebin sites. 12 13 Tested by existing tests. 14 15 * platform/graphics/GraphicsContext.cpp: 16 * platform/graphics/ShadowBlur.cpp: 17 (WebCore::ShadowBlur::drawInsetShadowWithTiling): 18 Must set fill color before calling clearShadow, as that might clear m_color. 19 (WebCore::ShadowBlur::drawLayerPieces): 20 Ditto. 21 * platform/graphics/qt/GraphicsContextQt.cpp: 22 (WebCore::GraphicsContext::fillPath): 23 (WebCore::GraphicsContext::fillRectWithRoundedHole): 24 1 25 2013-03-11 Alberto Garcia <agarcia@igalia.com> 2 26 -
trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp
r143646 r145366 678 678 } 679 679 680 #if !USE(CG) 680 #if !USE(CG) && !PLATFORM(QT) 681 681 void GraphicsContext::fillRectWithRoundedHole(const IntRect& rect, const RoundedRect& roundedHoleRect, const Color& color, ColorSpace colorSpace) 682 682 { -
trunk/Source/WebCore/platform/graphics/ShadowBlur.cpp
r133836 r145366 697 697 { 698 698 GraphicsContextStateSaver fillStateSaver(*graphicsContext); 699 graphicsContext->clearShadow();700 699 graphicsContext->setFillRule(RULE_EVENODD); 701 700 graphicsContext->setFillColor(m_color, m_colorSpace); 701 graphicsContext->clearShadow(); 702 702 graphicsContext->fillPath(exteriorPath); 703 703 } … … 773 773 774 774 GraphicsContextStateSaver stateSaver(*graphicsContext); 775 graphicsContext->setFillColor(m_color, m_colorSpace); 775 776 graphicsContext->clearShadow(); 776 graphicsContext->setFillColor(m_color, m_colorSpace);777 777 778 778 // Note that drawing the ImageBuffer is faster than creating a Image and drawing that, -
trunk/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
r141542 r145366 865 865 } 866 866 867 void GraphicsContext::fillRectWithRoundedHole(const IntRect& rect, const RoundedRect& roundedHoleRect, const Color& color, ColorSpace colorSpace) 868 { 869 if (paintingDisabled() || !color.isValid()) 870 return; 871 872 Path path; 873 path.addRect(rect); 874 if (!roundedHoleRect.radii().isZero()) 875 path.addRoundedRect(roundedHoleRect); 876 else 877 path.addRect(roundedHoleRect.rect()); 878 879 QPainterPath platformPath = path.platformPath(); 880 platformPath.setFillRule(Qt::OddEvenFill); 881 882 QPainter* p = m_data->p(); 883 if (hasShadow()) { 884 ShadowBlur* shadow = shadowBlur(); 885 if (shadow->mustUseShadowBlur(this)) 886 shadow->drawInsetShadow(this, rect, roundedHoleRect.rect(), roundedHoleRect.radii()); 887 else { 888 const QPointF shadowOffset(m_state.shadowOffset.width(), m_state.shadowOffset.height()); 889 p->translate(shadowOffset); 890 p->fillPath(platformPath, QColor(m_state.shadowColor)); 891 p->translate(-shadowOffset); 892 } 893 } 894 895 p->fillPath(platformPath, QColor(color)); 896 } 897 867 898 bool GraphicsContext::isInTransparencyLayer() const 868 899 {
Note: See TracChangeset
for help on using the changeset viewer.