Changeset 35852

Show
Ignore:
Timestamp:
08/19/08 16:33:07 (3 months ago)
Author:
eric@webkit.org
Message:

Reviewed by Geoff Garen.

Add the beginnings of Skia graphics support to WebCore
as I try to begin the long process of un-forking the changes
needed to WebCore to make Andriod's WebCore build.

I'll follow this up with actual *Skia.cpp files in a separate patch.

  • platform/graphics/AffineTransform.h:
  • platform/graphics/FloatPoint.h:
  • platform/graphics/FloatRect.h:
  • platform/graphics/Gradient.h:
  • platform/graphics/GraphicsContext.h:
  • platform/graphics/Image.h:
  • platform/graphics/ImageBuffer.h:
  • platform/graphics/ImageSource.h:
  • platform/graphics/IntPoint.h:
  • platform/graphics/IntRect.h:
  • platform/graphics/Path.h:
  • platform/graphics/Pattern.h:
  • svg/graphics/SVGPaintServerPattern.h:
  • svg/graphics/SVGPaintServerSolid.h:
Location:
trunk/WebCore
Files:
15 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r35851 r35852  
     12008-08-19  Eric Seidel  <eric@webkit.org> 
     2 
     3        Reviewed by Geoff Garen. 
     4 
     5        Add the beginnings of Skia graphics support to WebCore 
     6        as I try to begin the long process of un-forking the changes 
     7        needed to WebCore to make Andriod's WebCore build. 
     8 
     9        I'll follow this up with actual *Skia.cpp files in a separate patch. 
     10 
     11        * platform/graphics/AffineTransform.h: 
     12        * platform/graphics/FloatPoint.h: 
     13        * platform/graphics/FloatRect.h: 
     14        * platform/graphics/Gradient.h: 
     15        * platform/graphics/GraphicsContext.h: 
     16        * platform/graphics/Image.h: 
     17        * platform/graphics/ImageBuffer.h: 
     18        * platform/graphics/ImageSource.h: 
     19        * platform/graphics/IntPoint.h: 
     20        * platform/graphics/IntRect.h: 
     21        * platform/graphics/Path.h: 
     22        * platform/graphics/Pattern.h: 
     23        * svg/graphics/SVGPaintServerPattern.h: 
     24        * svg/graphics/SVGPaintServerSolid.h: 
     25 
    1262008-08-19  Steve Falkenburg  <sfalken@apple.com> 
    227 
  • trunk/WebCore/platform/graphics/AffineTransform.h

    r35773 r35852  
    3636#include <cairo.h> 
    3737typedef cairo_matrix_t PlatformAffineTransform; 
     38#elif PLATFORM(SKIA) 
     39#include "SkMatrix.h" 
     40typedef SkMatrix PlatformAffineTransform; 
    3841#elif PLATFORM(WX) && USE(WXGC) 
    3942#include <wx/defs.h> 
  • trunk/WebCore/platform/graphics/FloatPoint.h

    r31899 r35852  
    5454#endif 
    5555 
     56#if PLATFORM(SKIA) 
     57struct SkPoint; 
     58#endif 
     59 
    5660namespace WebCore { 
    5761 
     
    9195#if PLATFORM(SYMBIAN) 
    9296    operator TPoint() const; 
    93     FloatPoint(const TPoint& ); 
     97    FloatPoint(const TPoint&); 
     98#endif 
     99 
     100#if PLATFORM(SKIA) 
     101    operator SkPoint() const; 
     102    FloatPoint(const SkPoint&); 
    94103#endif 
    95104 
  • trunk/WebCore/platform/graphics/FloatRect.h

    r31899 r35852  
    5050#if PLATFORM(WX) && USE(WXGC) 
    5151class wxRect2DDouble; 
     52#endif 
     53 
     54#if PLATFORM(SKIA) 
     55struct SkRect; 
    5256#endif 
    5357 
     
    140144#endif 
    141145 
     146#if PLATFORM(SKIA) 
     147    FloatRect(const SkRect&); 
     148    operator SkRect() const; 
     149#endif 
     150 
    142151private: 
    143152    FloatPoint m_location; 
  • trunk/WebCore/platform/graphics/Gradient.h

    r35731 r35852  
    4444typedef struct _cairo_pattern cairo_pattern_t; 
    4545typedef cairo_pattern_t* PlatformGradient; 
     46#elif PLATFORM(SKIA) 
     47class SkShader; 
     48typedef class SkShader* PlatformGradient; 
     49typedef class SkShader* PlatformPattern; 
    4650#else 
    4751typedef void* PlatformGradient; 
  • trunk/WebCore/platform/graphics/GraphicsContext.h

    r35743 r35852  
    6363    typedef wxWindowDC PlatformGraphicsContext; 
    6464#endif 
     65#elif PLATFORM(SKIA) 
     66typedef class PlatformContextSkia PlatformGraphicsContext; 
    6567#else 
    6668typedef void PlatformGraphicsContext; 
     
    7476#if PLATFORM(WIN) 
    7577typedef struct HDC__* HDC; 
     78#if !PLATFORM(CG) 
     79// UInt8 is defined in CoreFoundation/CFBase.h 
     80typedef unsigned char UInt8; 
     81#endif 
    7682#endif 
    7783 
  • trunk/WebCore/platform/graphics/Image.h

    r35731 r35852  
    4949#if PLATFORM(WIN) 
    5050typedef struct HBITMAP__ *HBITMAP; 
     51#endif 
     52 
     53#if PLATFORM(SKIA) 
     54class NativeImageSkia; 
    5155#endif 
    5256 
  • trunk/WebCore/platform/graphics/ImageBuffer.h

    r35731 r35852  
    3333#include <wtf/PassRefPtr.h> 
    3434#include <memory> 
     35 
     36#if PLATFORM(SKIA) 
     37class SkBitmap; 
     38#endif 
    3539 
    3640namespace WebCore { 
     
    7680        ImageBuffer(cairo_surface_t*); 
    7781        mutable cairo_surface_t* m_surface; 
     82#elif PLATFORM(SKIA) 
     83        ImageBuffer(const IntSize&); 
    7884#endif 
    7985    }; 
  • trunk/WebCore/platform/graphics/ImageSource.h

    r35761 r35852  
    4444struct _cairo_surface; 
    4545typedef struct _cairo_surface cairo_surface_t; 
     46#elif PLATFORM(SKIA) 
     47class NativeImageSkia; 
    4648#endif 
    4749 
     
    6365typedef ImageDecoderQt* NativeImageSourcePtr; 
    6466typedef QPixmap* NativeImagePtr; 
    65 #else 
     67#elif PLATFORM(CAIRO) 
    6668class ImageDecoder; 
    6769typedef ImageDecoder* NativeImageSourcePtr; 
    6870typedef cairo_surface_t* NativeImagePtr; 
     71#elif PLATFORM(SKIA) 
     72class ImageDecoder; 
     73typedef ImageDecoder* NativeImageSourcePtr; 
     74typedef NativeImageSkia* NativeImagePtr; 
    6975#endif 
    7076 
  • trunk/WebCore/platform/graphics/IntPoint.h

    r31899 r35852  
    6060#endif 
    6161 
     62#if PLATFORM(SKIA) 
     63struct SkPoint; 
     64struct SkIPoint; 
     65#endif 
     66 
    6267namespace WebCore { 
    6368 
     
    107112#endif 
    108113 
     114#if PLATFORM(SKIA) 
     115    IntPoint(const SkIPoint&); 
     116    operator SkIPoint() const; 
     117    operator SkPoint() const; 
     118#endif 
     119 
    109120private: 
    110121    int m_x, m_y; 
  • trunk/WebCore/platform/graphics/IntRect.h

    r31899 r35852  
    5959#endif 
    6060 
     61#if PLATFORM(SKIA) 
     62struct SkRect; 
     63struct SkIRect; 
     64#endif 
     65 
    6166namespace WebCore { 
    6267 
     
    154159#endif 
    155160 
     161#if PLATFORM(SKIA) 
     162    IntRect(const SkIRect&); 
     163    operator SkRect() const; 
     164    operator SkIRect() const; 
     165#endif 
     166 
    156167#if PLATFORM(MAC) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES) 
    157168    operator NSRect() const; 
  • trunk/WebCore/platform/graphics/Path.h

    r31899 r35852  
    4444} 
    4545typedef WebCore::CairoPath PlatformPath; 
     46#elif PLATFORM(SKIA) 
     47class SkPath; 
     48typedef SkPath PlatformPath; 
    4649#else 
    4750typedef void PlatformPath; 
  • trunk/WebCore/platform/graphics/Pattern.h

    r35759 r35852  
    3737#include <cairo.h> 
    3838typedef cairo_pattern_t* PlatformPatternPtr; 
     39#elif PLATFORM(SKIA) 
     40class SkShader; 
     41typedef SkShader* PlatformPatternPtr; 
    3942#elif PLATFORM(QT) 
    4043#include <QBrush> 
  • trunk/WebCore/svg/graphics/SVGPaintServerPattern.h

    r30430 r35852  
    6363        virtual TextStream& externalRepresentation(TextStream&) const; 
    6464 
     65        virtual bool setup(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText) const; 
    6566#if PLATFORM(CG) 
    66         virtual bool setup(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText) const; 
    67         virtual void teardown(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText) const;  
    68 #endif 
    69  
    70 #if PLATFORM(QT) || PLATFORM(CAIRO) 
    71         virtual bool setup(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText) const; 
     67        virtual void teardown(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText) const; 
    7268#endif 
    7369 
  • trunk/WebCore/svg/graphics/SVGPaintServerSolid.h

    r30430 r35852  
    4646        virtual TextStream& externalRepresentation(TextStream&) const; 
    4747 
    48 #if PLATFORM(CG) || PLATFORM(QT) || PLATFORM(CAIRO) 
    4948        virtual bool setup(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText) const; 
    50 #endif 
    5149 
    5250    private: