2011-07-05 Igor Oliveira <igor.oliveira@openbossa.org>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jul 2011 21:29:42 +0000 (21:29 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jul 2011 21:29:42 +0000 (21:29 +0000)
commit77cf63bcd959d0f6ccbfed1b6ab1834ba6c3ffd4
tree456ca695d6f3e91146861b60fca25132e154ac72
parent44a35d913035278f6572e3cf9ff3d790fc8b77e6
2011-07-05  Igor Oliveira  <igor.oliveira@openbossa.org>

        [Qt] Add ShadowBlur support
        https://bugs.webkit.org/show_bug.cgi?id=62997

        Use ShadowBlur instead of ContextShadow to handle canvas and css shadows. ShadowBlur is
        a newer and platform independent shadow implementation.
        Qt QPainter does not have support for shadows so is necessary to create a layer support
        to draw complex shapes and fonts. The beginShadowLayer creates a temporary shadow buffer
        where the canvas can draw onto and endShadowLayer applies the blur filter, colors the
        shadow buffer and draw the final shadow to the graphics context.

        Reviewed by Andreas Kling.

        * WebCore.pro:
        * platform/graphics/GraphicsContext.cpp:
        * platform/graphics/GraphicsContext.h:
        * platform/graphics/ShadowBlur.cpp:
        (WebCore::ShadowBlur::ShadowBlur):
        (WebCore::ShadowBlur::setShadowValues):
        (WebCore::ShadowBlur::updateShadowBlurValues):
        (WebCore::ShadowBlur::clear):
        (WebCore::ShadowBlur::blurAndColorShadowBuffer):
        (WebCore::ShadowBlur::beginShadowLayer):
        (WebCore::ShadowBlur::endShadowLayer):
        * platform/graphics/ShadowBlur.h:
        (WebCore::ShadowBlur::type):
        * platform/graphics/qt/ContextShadowQt.cpp: Removed.
        * platform/graphics/qt/FontQt.cpp:
        (WebCore::drawTextCommon):
        (WebCore::Font::drawGlyphs):
        * platform/graphics/qt/GraphicsContextQt.cpp:
        (WebCore::GraphicsContextPlatformPrivate::mustUseShadowBlur):
        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
        (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
        (WebCore::GraphicsContext::savePlatformState):
        (WebCore::GraphicsContext::restorePlatformState):
        (WebCore::GraphicsContext::fillPath):
        (WebCore::GraphicsContext::strokePath):
        (WebCore::GraphicsContext::fillRect):
        (WebCore::GraphicsContext::fillRoundedRect):
        (WebCore::GraphicsContext::shadowBlur):
        (WebCore::GraphicsContext::clipBounds):
        (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: https://svn.webkit.org/repository/webkit/trunk@90406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.pro
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/ShadowBlur.cpp
Source/WebCore/platform/graphics/ShadowBlur.h
Source/WebCore/platform/graphics/qt/ContextShadowQt.cpp [deleted file]
Source/WebCore/platform/graphics/qt/FontQt.cpp
Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
Source/WebCore/platform/graphics/qt/ImageQt.cpp
Source/WebCore/platform/graphics/qt/StillImageQt.cpp