Refactor Cairo and CoreGraphics to use platform ifdefs. This patch
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Aug 2006 00:02:51 +0000 (00:02 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Aug 2006 00:02:51 +0000 (00:02 +0000)
commit7810a00f5ca1708ce46ec3b84571c85044dfe1aa
tree3a04d6e93503600c7b05b40a09a4a17f738f1b20
parentce7d24fcbb7dbaaa9398e181114086cdee2028e5
    Refactor Cairo and CoreGraphics to use platform ifdefs.  This patch
        separates the graphics engines from their respective platforms and replaces
        #ifdef PLATFORM(MAC) and PLATFORM(WIN) with PLATFORM(CG) and PLATFORM(CAIRO).

        Reviewed by darin

        * WebCore.xcodeproj/project.pbxproj:
        * platform/AffineTransform.h:
        * platform/Color.h:
        * platform/Cursor.h:
        * platform/FloatPoint.h:
        * platform/FloatRect.h:
        * platform/FloatSize.h:
        * platform/Font.h:
        * platform/FontData.h:
        * platform/GlyphBuffer.h:
        (WebCore::GlyphBuffer::glyphAt):
        (WebCore::GlyphBuffer::advanceAt):
        (WebCore::GlyphBuffer::add):
        * platform/GraphicsContext.h:
        * platform/Image.h:
        * platform/ImageSource.h:
        * platform/IntPoint.h:
        * platform/IntRect.h:
        * platform/IntSize.h:
        * platform/ResourceLoader.h:
        * platform/ResourceLoaderClient.h:
        * platform/Widget.h:
        * platform/cairo/GraphicsContextCairo.cpp:
        * platform/cairo/ImageCairo.cpp:
        * platform/cairo/ImageSourceCairo.cpp:
        * platform/cg/AffineTransformCG.cpp:
        * platform/cg/FloatPointCG.cpp: Added.
        * platform/cg/FloatRectCG.cpp: Added.
        * platform/cg/FloatSizeCG.cpp: Added.
        * platform/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::GraphicsContext):
        (WebCore::GraphicsContext::~GraphicsContext):
        (WebCore::GraphicsContext::setFocusRingClip):
        (WebCore::GraphicsContext::clearFocusRingClip):
        (WebCore::GraphicsContext::platformContext):
        (WebCore::GraphicsContext::drawRect):
        (WebCore::GraphicsContext::drawLine):
        * platform/cg/GraphicsContextPlatformPrivate.h: Added.
        (WebCore::GraphicsContextPlatformPrivate:::m_cgContext):
        (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
        * platform/cg/ImageCG.cpp: Added.
        (WebCore::Image::drawTiled):
        * platform/cg/ImageSourceCG.cpp: Added.
        * platform/cg/IntPointCG.cpp: Added.
        * platform/cg/IntRectCG.cpp: Added.
        * platform/cg/IntSizeCG.cpp: Added.
        * platform/cg/PDFDocumentImage.cpp: Added.
        (WebCore::PDFDocumentImage::adjustCTM):
        * platform/cg/PDFDocumentImage.h: Added.
        * platform/cg/PathCG.cpp:
        * platform/image-decoders/bmp/BMPImageDecoder.cpp:
        * platform/image-decoders/gif/GIFImageDecoder.cpp:
        * platform/image-decoders/gif/GIFImageReader.cpp:
        * platform/image-decoders/ico/ICOImageDecoder.cpp:
        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
        * platform/image-decoders/png/PNGImageDecoder.cpp:
        * platform/image-decoders/xbm/XBMImageDecoder.cpp:
        * platform/mac/FloatPointMac.mm:
        * platform/mac/FloatRectMac.mm:
        * platform/mac/FloatSizeMac.mm:
        * platform/mac/GraphicsContextMac.mm:
        * platform/mac/ImageMac.mm:
        * platform/mac/ImageSourceMac.cpp: Removed.
        * platform/mac/IntPointMac.mm:
        * platform/mac/IntRectMac.mm:
        * platform/mac/IntSizeMac.mm:
        * platform/mac/PDFDocumentImage.h: Removed.
        * platform/mac/PDFDocumentImage.mm: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15999 268f45cc-cd09-0410-ab3c-d52691b4dbfc
52 files changed:
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/platform/AffineTransform.h
WebCore/platform/Color.h
WebCore/platform/Cursor.h
WebCore/platform/FloatPoint.h
WebCore/platform/FloatRect.h
WebCore/platform/FloatSize.h
WebCore/platform/Font.h
WebCore/platform/FontData.h
WebCore/platform/GlyphBuffer.h
WebCore/platform/GraphicsContext.h
WebCore/platform/Image.h
WebCore/platform/ImageSource.h
WebCore/platform/IntPoint.h
WebCore/platform/IntRect.h
WebCore/platform/IntSize.h
WebCore/platform/ResourceLoader.h
WebCore/platform/ResourceLoaderClient.h
WebCore/platform/Widget.h
WebCore/platform/cairo/GraphicsContextCairo.cpp
WebCore/platform/cairo/ImageCairo.cpp
WebCore/platform/cairo/ImageSourceCairo.cpp
WebCore/platform/cg/AffineTransformCG.cpp
WebCore/platform/cg/FloatPointCG.cpp [new file with mode: 0644]
WebCore/platform/cg/FloatRectCG.cpp [new file with mode: 0644]
WebCore/platform/cg/FloatSizeCG.cpp [new file with mode: 0644]
WebCore/platform/cg/GraphicsContextCG.cpp
WebCore/platform/cg/GraphicsContextPlatformPrivate.h [new file with mode: 0644]
WebCore/platform/cg/ImageCG.cpp [new file with mode: 0644]
WebCore/platform/cg/ImageSourceCG.cpp [moved from WebCore/platform/mac/ImageSourceMac.cpp with 98% similarity]
WebCore/platform/cg/IntPointCG.cpp [new file with mode: 0644]
WebCore/platform/cg/IntRectCG.cpp [new file with mode: 0644]
WebCore/platform/cg/IntSizeCG.cpp [new file with mode: 0644]
WebCore/platform/cg/PDFDocumentImage.cpp [moved from WebCore/platform/mac/PDFDocumentImage.mm with 95% similarity]
WebCore/platform/cg/PDFDocumentImage.h [moved from WebCore/platform/mac/PDFDocumentImage.h with 98% similarity]
WebCore/platform/cg/PathCG.cpp
WebCore/platform/image-decoders/bmp/BMPImageDecoder.cpp
WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
WebCore/platform/image-decoders/gif/GIFImageReader.cpp
WebCore/platform/image-decoders/ico/ICOImageDecoder.cpp
WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
WebCore/platform/image-decoders/xbm/XBMImageDecoder.cpp
WebCore/platform/mac/FloatPointMac.mm
WebCore/platform/mac/FloatRectMac.mm
WebCore/platform/mac/FloatSizeMac.mm
WebCore/platform/mac/GraphicsContextMac.mm
WebCore/platform/mac/ImageMac.mm
WebCore/platform/mac/IntPointMac.mm
WebCore/platform/mac/IntRectMac.mm
WebCore/platform/mac/IntSizeMac.mm