Skip to content
  • ariya@webkit.org's avatar
    2010-08-14 Ariya Hidayat <ariya@sencha.com> · e5062cad
    ariya@webkit.org authored
            Reviewed by Simon Hausmann and Kenneth Rohde Christiansen.
    
            [Qt] Refactor shadow state handling in GraphicsContextQt
            https://bugs.webkit.org/show_bug.cgi?id=44006
    
            * platform/graphics/qt/GraphicsContextQt.cpp:
            (WebCore::GraphicsContextPlatformPrivate::): Added shadow states as
            member variables.
            (WebCore::GraphicsContextPlatformPrivate::hasShadow): Convenient
            function to check whether there is shadow or not.
            (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
            (WebCore::GraphicsContext::drawRect): Use shadow states instead of
            calling getShadow.
            (WebCore::GraphicsContext::drawLine): ditto.
            (WebCore::GraphicsContext::strokeArc): ditto.
            (WebCore::GraphicsContext::drawConvexPolygon): ditto.
            (WebCore::GraphicsContext::fillPath): ditto.
            (WebCore::GraphicsContext::strokePath): ditto.
            (WebCore::GraphicsContext::fillRect): Removes the use of helper function
            drawBorderlessRectShadow as the code already becomes a lot simpler.
            (WebCore::GraphicsContext::fillRoundedRect): Removes the use of helper
    		function drawFilledShadowPath as the code already becomes a lot simpler.
            (WebCore::GraphicsContext::setPlatformShadow): Store shadow states
            and find out the shadow type (complexity) for future use.
            (WebCore::GraphicsContext::clearPlatformShadow): Reset shadow states.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    e5062cad