Skip to content
  • simon.fraser@apple.com's avatar
    2011-01-30 Simon Fraser <simon.fraser@apple.com> · 6651a517
    simon.fraser@apple.com authored
            Reviewed by Sam Weinig.
    
            Make ContextShadow code cross-platform
            https://bugs.webkit.org/show_bug.cgi?id=51312
    
            Add a new class, ShadowBlur, that contains most of the
            code from ContextShadow, but is fully cross-platform.
            It depends on one new method, GraphicsContext::clipBounds(),
            which platforms will have to implement.
    
            Add ShadowBlur to the Mac Xcode project, but don't use it
            anywhere yet.
    
            * WebCore.xcodeproj/project.pbxproj:
            * platform/graphics/GraphicsContext.cpp:
            (WebCore::GraphicsContext::clipBounds):
            * platform/graphics/GraphicsContext.h:
            * platform/graphics/ShadowBlur.cpp: Added.
            (WebCore::roundUpToMultipleOf32):
            (WebCore::ScratchBuffer::ScratchBuffer):
            (WebCore::ScratchBuffer::getScratchBuffer):
            (WebCore::ScratchBuffer::scheduleScratchBufferPurge):
            (WebCore::ScratchBuffer::timerFired):
            (WebCore::ScratchBuffer::clearScratchBuffer):
            (WebCore::ScratchBuffer::shared):
            (WebCore::ShadowBlur::ShadowBlur):
            (WebCore::ShadowBlur::blurLayerImage):
            (WebCore::ShadowBlur::adjustBlurDistance):
            (WebCore::ShadowBlur::calculateLayerBoundingRect):
            (WebCore::ShadowBlur::beginShadowLayer):
            (WebCore::ShadowBlur::endShadowLayer):
            (WebCore::ShadowBlur::drawRectShadow):
            (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
            (WebCore::ShadowBlur::drawRectShadowWithTiling):
            (WebCore::ShadowBlur::clipBounds):
            * platform/graphics/ShadowBlur.h: Added.
            (WebCore::ShadowBlur::setShadowsIgnoreTransforms):
            (WebCore::ShadowBlur::shadowsIgnoreTransforms):
            * platform/graphics/cg/GraphicsContextCG.cpp:
            (WebCore::GraphicsContext::clipBounds):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    6651a517