2011-01-30 Simon Fraser <simon.fraser@apple.com>
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Jan 2011 06:02:01 +0000 (06:02 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 31 Jan 2011 06:02:01 +0000 (06:02 +0000)
commit13122dffdc6b61fd6be0a3f1eae4f8463db37e84
treefefa309871b45004f162efe9d99112f8ff564a0d
parente2fd6598fda813df1df683993b46b8dd143cc539
2011-01-30  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Sam Weinig.

        Enhance ShadowBlur to render inset box shadows
        https://bugs.webkit.org/show_bug.cgi?id=51567

        Use ShadowBlur for inset box-shadows with CG. It
        currently lacks a tiled version, but is still much
        faster than CG shadows.

        Test: fast/box-shadow/inset-box-shadow-radius.html

        * platform/graphics/ShadowBlur.cpp:
        * platform/graphics/ShadowBlur.h: New method for inset
        shadows.
        (WebCore::ShadowBlur::drawInsetShadow):

        * platform/graphics/GraphicsContext.cpp: #ifdef out
        fillRectWithRoundedHole() for CG.

        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::fillRectWithRoundedHole): If there's
        a shadow with a radius > 0, use ShadowBlur.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@77110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/box-shadow/inset-box-shadow-radius.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/box-shadow/inset-box-shadow-radius-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/box-shadow/inset-box-shadow-radius-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/box-shadow/inset-box-shadow-radius-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/box-shadow/inset-expected.checksum
LayoutTests/platform/mac/fast/box-shadow/inset-expected.png
LayoutTests/platform/mac/fast/css/shadow-multiple-expected.checksum
LayoutTests/platform/mac/fast/css/shadow-multiple-expected.png
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/graphics/ShadowBlur.cpp
Source/WebCore/platform/graphics/ShadowBlur.h
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp