Changeset 47146 in webkit


Ignore:
Timestamp:
Aug 12, 2009 1:55:51 PM (15 years ago)
Author:
eric@webkit.org
Message:

2009-08-12 Maxime Simon <Maxime Simon>

Reviewed by Eric Seidel.

[Haiku] Modifying WebCore/platform/graphics files to allow Haiku port.
https://bugs.webkit.org/show_bug.cgi?id=28128

  • platform/graphics/BitmapImage.h: Adding getBBitmap() function.
  • platform/graphics/Color.h: rgb_color is the Color struct in Haiku.
  • platform/graphics/FloatPoint.h: BPoint is the Point class in Haiku.
  • platform/graphics/FloatRect.h: BRect is the Rect class in Haiku.
  • platform/graphics/GraphicsContext.cpp:
  • platform/graphics/GraphicsContext.h: BView is the PlatformGraphicsContext class for Haiku. Adding getHaikuStrokeStyle() function.
  • platform/graphics/Icon.h: Adding an empty Icon() constructor because this class isn't implemented for the moment.
  • platform/graphics/ImageSource.h: BBitmap is the native bitmap class for Haiku.
  • platform/graphics/IntPoint.h: BPoint is the Point class in Haiku.
  • platform/graphics/IntRect.h: BRect is the Rect class in Haiku.
  • platform/graphics/IntSize.h: BSize is the Size class in Haiku.
  • platform/graphics/Path.h: BRegion is the Path class in Haiku.
  • platform/graphics/Pattern.h: Adding the GraphicsDef.h header and the native pattern type.
  • platform/graphics/SimpleFontData.h: Adding Haiku's Font.h header.
Location:
trunk/WebCore
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r47145 r47146  
     12009-08-12  Maxime Simon  <simon.maxime@gmail.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [Haiku] Modifying WebCore/platform/graphics files to allow Haiku port.
     6        https://bugs.webkit.org/show_bug.cgi?id=28128
     7
     8        * platform/graphics/BitmapImage.h: Adding getBBitmap() function.
     9        * platform/graphics/Color.h: rgb_color is the Color struct in Haiku.
     10        * platform/graphics/FloatPoint.h: BPoint is the Point class in Haiku.
     11        * platform/graphics/FloatRect.h: BRect is the Rect class in Haiku.
     12        * platform/graphics/GraphicsContext.cpp:
     13        * platform/graphics/GraphicsContext.h: BView is the PlatformGraphicsContext
     14        class for Haiku. Adding getHaikuStrokeStyle() function.
     15        * platform/graphics/Icon.h: Adding an empty Icon() constructor because
     16        this class isn't implemented for the moment.
     17        * platform/graphics/ImageSource.h: BBitmap is the native bitmap class
     18        for Haiku.
     19        * platform/graphics/IntPoint.h: BPoint is the Point class in Haiku.
     20        * platform/graphics/IntRect.h: BRect is the Rect class in Haiku.
     21        * platform/graphics/IntSize.h: BSize is the Size class in Haiku.
     22        * platform/graphics/Path.h: BRegion is the Path class in Haiku.
     23        * platform/graphics/Pattern.h: Adding the GraphicsDef.h header and the
     24        native pattern type.
     25        * platform/graphics/SimpleFontData.h: Adding Haiku's Font.h header.
     26
    1272009-08-12  Maxime Simon  <simon.maxime@gmail.com>
    228
  • trunk/WebCore/platform/graphics/BitmapImage.h

    r46590 r47146  
    4646#endif
    4747
     48#if PLATFORM(HAIKU)
     49class BBitmap;
     50#endif
     51
    4852namespace WebCore {
    4953    struct FrameData;
     
    162166#endif
    163167    virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator);
     168
    164169#if PLATFORM(WX) || PLATFORM(WINCE)
    165170    virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const TransformationMatrix& patternTransform,
    166171                             const FloatPoint& phase, CompositeOperator, const FloatRect& destRect);
    167 #endif   
     172#endif
     173
     174#if PLATFORM(HAIKU)
     175    virtual BBitmap* getBBitmap() const;
     176#endif
     177
    168178    size_t currentFrame() const { return m_currentFrame; }
    169179    size_t frameCount();
  • trunk/WebCore/platform/graphics/Color.h

    r45569 r47146  
    4646#if PLATFORM(WX)
    4747class wxColour;
     48#endif
     49
     50#if PLATFORM(HAIKU)
     51struct rgb_color;
    4852#endif
    4953
     
    122126#endif
    123127
     128#if PLATFORM(HAIKU)
     129    Color(const rgb_color&);
     130    operator rgb_color() const;
     131#endif
     132
    124133    static bool parseHexColor(const String& name, RGBA32& rgb);
    125134
  • trunk/WebCore/platform/graphics/FloatPoint.h

    r44656 r47146  
    5252#endif
    5353
     54#if PLATFORM(HAIKU)
     55class BPoint;
     56#endif
     57
    5458#if PLATFORM(SKIA)
    5559struct SkPoint;
     
    8993    FloatPoint(const QPointF&);
    9094    operator QPointF() const;
     95#endif
     96
     97#if PLATFORM(HAIKU)
     98    FloatPoint(const BPoint&);
     99    operator BPoint() const;
    91100#endif
    92101
  • trunk/WebCore/platform/graphics/FloatRect.h

    r44656 r47146  
    5050#if PLATFORM(WX) && USE(WXGC)
    5151class wxRect2DDouble;
     52#endif
     53
     54#if PLATFORM(HAIKU)
     55class BRect;
    5256#endif
    5357
     
    139143#endif
    140144
     145#if PLATFORM(HAIKU)
     146    FloatRect(const BRect&);
     147    operator BRect() const;
     148#endif
     149
    141150#if PLATFORM(SKIA)
    142151    FloatRect(const SkRect&);
  • trunk/WebCore/platform/graphics/GraphicsContext.cpp

    r46590 r47146  
    541541#endif
    542542
    543 #if !PLATFORM(QT) && !PLATFORM(CAIRO) && !PLATFORM(SKIA)
     543#if !PLATFORM(QT) && !PLATFORM(CAIRO) && !PLATFORM(SKIA) && !PLATFORM(HAIKU)
    544544void GraphicsContext::setPlatformStrokeStyle(const StrokeStyle&)
    545545{
  • trunk/WebCore/platform/graphics/GraphicsContext.h

    r47016 r47146  
    6767#elif PLATFORM(SKIA)
    6868typedef class PlatformContextSkia PlatformGraphicsContext;
     69#elif PLATFORM(HAIKU)
     70class BView;
     71typedef BView PlatformGraphicsContext;
     72struct pattern;
    6973#elif PLATFORM(WINCE)
    7074typedef struct HDC__ PlatformGraphicsContext;
     
    382386#endif
    383387
     388#if PLATFORM(HAIKU)
     389        pattern getHaikuStrokeStyle();
     390#endif
     391
    384392    private:
    385393        void savePlatformState();
  • trunk/WebCore/platform/graphics/Icon.h

    r38057 r47146  
    7979    Icon(const PlatformIcon&);
    8080    PlatformIcon m_icon;
     81#elif PLATFORM(HAIKU)
     82    Icon();
    8183#endif
    8284};
  • trunk/WebCore/platform/graphics/ImageSource.h

    r46807 r47146  
    4848#elif PLATFORM(SKIA)
    4949class NativeImageSkia;
     50#elif PLATFORM(HAIKU)
     51class BBitmap;
    5052#elif PLATFORM(WINCE)
    5153#include "SharedBitmap.h"
     
    8284typedef ImageDecoder* NativeImageSourcePtr;
    8385typedef NativeImageSkia* NativeImagePtr;
     86#elif PLATFORM(HAIKU)
     87class ImageDecoder;
     88typedef ImageDecoder* NativeImageSourcePtr;
     89typedef BBitmap* NativeImagePtr;
    8490#elif PLATFORM(WINCE)
    8591class ImageDecoder;
  • trunk/WebCore/platform/graphics/IntPoint.h

    r45478 r47146  
    5656#elif PLATFORM(GTK)
    5757typedef struct _GdkPoint GdkPoint;
     58#elif PLATFORM(HAIKU)
     59class BPoint;
    5860#endif
    5961
     
    122124    IntPoint(const GdkPoint&);
    123125    operator GdkPoint() const;
     126#elif PLATFORM(HAIKU)
     127    explicit IntPoint(const BPoint&);
     128    operator BPoint() const;
    124129#endif
    125130
  • trunk/WebCore/platform/graphics/IntRect.h

    r44656 r47146  
    5050#elif PLATFORM(GTK)
    5151typedef struct _GdkRectangle GdkRectangle;
     52#elif PLATFORM(HAIKU)
     53class BRect;
    5254#endif
    5355
     
    145147    IntRect(const GdkRectangle&);
    146148    operator GdkRectangle() const;
     149#elif PLATFORM(HAIKU)
     150    explicit IntRect(const BRect&);
     151    operator BRect() const;
    147152#endif
    148153
  • trunk/WebCore/platform/graphics/IntSize.h

    r44656 r47146  
    4848class QSize;
    4949QT_END_NAMESPACE
     50#elif PLATFORM(HAIKU)
     51class BSize;
    5052#endif
    5153
     
    114116#endif
    115117
     118#if PLATFORM(HAIKU)
     119    explicit IntSize(const BSize&);
     120    operator BSize() const;
     121#endif
     122
    116123
    117124private:
  • trunk/WebCore/platform/graphics/Path.h

    r46590 r47146  
    5050class SkPath;
    5151typedef SkPath PlatformPath;
     52#elif PLATFORM(HAIKU)
     53class BRegion;
     54typedef BRegion PlatformPath;
    5255#elif PLATFORM(WINCE)
    5356namespace WebCore {
  • trunk/WebCore/platform/graphics/Pattern.h

    r46590 r47146  
    5454typedef wxBrush* PlatformPatternPtr;
    5555#endif // USE(WXGC)
     56#elif PLATFORM(HAIKU)
     57#include <interface/GraphicsDefs.h>
     58typedef pattern* PlatformPatternPtr;
    5659#elif PLATFORM(WINCE)
    5760typedef void* PlatformPatternPtr;
  • trunk/WebCore/platform/graphics/SimpleFontData.h

    r46388 r47146  
    4444#if PLATFORM(QT)
    4545#include <QFont>
     46#endif
     47
     48#if PLATFORM(HAIKU)
     49#include <Font.h>
    4650#endif
    4751
Note: See TracChangeset for help on using the changeset viewer.