Skip to content
  • allan.jensen@digia.com's avatar
    [Qt] Create ShadowBlur on demand. · c054201c
    allan.jensen@digia.com authored
    https://bugs.webkit.org/show_bug.cgi?id=113506
    
    Reviewed by Noam Rosenthal.
    
    This patch creates ShadowBlur objects on demand instead of keeping a single one alive for
    each GraphicsContext. This matches what other platforms does and fixes the problem with
    an active shadowblur being affected by changing shadow settings on the GraphicsContext.
    
    The method mustUseShadowBlur is moved from ShadowBlur to GraphcisContext, so that it can
    be used to determine if a ShadowBlur object should even be generated.
    
    * platform/graphics/GraphicsContext.cpp:
    (WebCore::GraphicsContext::hasBlurredShadow):
    (WebCore::GraphicsContext::mustUseShadowBlur):
    * platform/graphics/GraphicsContext.h:
    (GraphicsContext):
    * platform/graphics/ShadowBlur.cpp:
    (WebCore::ShadowBlur::ShadowBlur):
    * platform/graphics/ShadowBlur.h:
    * platform/graphics/cairo/FontCairo.cpp:
    (WebCore::drawGlyphsShadow):
    * platform/graphics/cg/GraphicsContextCG.cpp:
    (WebCore::GraphicsContext::fillRect):
    (WebCore::GraphicsContext::fillRoundedRect):
    (WebCore::GraphicsContext::fillRectWithRoundedHole):
    * platform/graphics/qt/FontQt.cpp:
    (WebCore::drawQtGlyphRun):
    * platform/graphics/qt/GraphicsContextQt.cpp:
    (GraphicsContextPlatformPrivate):
    (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
    (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
    (WebCore::GraphicsContext::restorePlatformState):
    (WebCore::GraphicsContext::fillPath):
    (WebCore::GraphicsContext::strokePath):
    (WebCore::GraphicsContext::fillRect):
    (WebCore::GraphicsContext::fillRoundedRect):
    (WebCore::GraphicsContext::fillRectWithRoundedHole):
    (WebCore::GraphicsContext::setPlatformShadow):
    (WebCore::GraphicsContext::clearPlatformShadow):
    * platform/graphics/qt/ImageQt.cpp:
    (WebCore::BitmapImage::draw):
    * platform/graphics/qt/StillImageQt.cpp:
    (WebCore::StillImage::draw):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    c054201c