Changeset 83818 in webkit


Ignore:
Timestamp:
Apr 13, 2011 11:25:57 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-13 Cary Clark <caryclark@chromium.org>

Reviewed by Eric Seidel.

[Chromium] allow concurrent Skia and CG datatypes
https://bugs.webkit.org/show_bug.cgi?id=57848

The Chromium port is experimenting with running Skia as the WebKit rendering engine, and CoreGraphics
as the UI rendering engine. This permits Chromium to unify its graphics story while leveraging OS X to
draw elements like scrollbars and buttons.

Restructure the common graphics units, points, and rectangles, to convert to Sk-types and CG-types at
the same time. This requires only adding to the existing preprocessor commands, and will have no effect
on any existing platform.

Eventually, WTF_USE_SKIA_ON_MAC_CHROME will be defined to enable this, but for now, there's no
functional change.

No new tests as this provides no new functionality.

  • platform/graphics/FloatPoint.h: Add USE(SKIA_ON_MAC_CHROME) to make CG type and operators visible to a Skia-based Chrome Mac build.
  • platform/graphics/FloatRect.h: Ditto.
  • platform/graphics/FloatSize.h: Ditto.
  • platform/graphics/IntPoint.h: Ditto.
  • platform/graphics/IntRect.h: Ditto.
  • platform/graphics/IntSize.h: Ditto.
  • platform/graphics/cg/FloatPointCG.cpp: Ditto.
  • platform/graphics/cg/FloatRectCG.cpp: Ditto.
  • platform/graphics/cg/FloatSizeCG.cpp: Ditto.
  • platform/graphics/cg/IntPointCG.cpp: Ditto.
  • platform/graphics/cg/IntRectCG.cpp: Ditto.
  • platform/graphics/cg/IntSizeCG.cpp: Ditto.
Location:
trunk/Source/WebCore
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83816 r83818  
     12011-04-13  Cary Clark  <caryclark@chromium.org>
     2 
     3         Reviewed by Eric Seidel.
     4         
     5         [Chromium] allow concurrent Skia and CG datatypes
     6         https://bugs.webkit.org/show_bug.cgi?id=57848
     7
     8         The Chromium port is experimenting with running Skia as the WebKit rendering engine, and CoreGraphics
     9         as the UI rendering engine. This permits Chromium to unify its graphics story while leveraging OS X to
     10         draw elements like scrollbars and buttons.
     11 
     12         Restructure the common graphics units, points, and rectangles, to convert to Sk-types and CG-types at
     13         the same time. This requires only adding to the existing preprocessor commands, and will have no effect
     14         on any existing platform.
     15         
     16         Eventually, WTF_USE_SKIA_ON_MAC_CHROME will be defined to enable this, but for now, there's no
     17         functional change.
     18 
     19         No new tests as this provides no new functionality.
     20 
     21         * platform/graphics/FloatPoint.h: Add USE(SKIA_ON_MAC_CHROME) to make CG type and operators visible
     22         to a Skia-based Chrome Mac build.
     23         * platform/graphics/FloatRect.h: Ditto.
     24         * platform/graphics/FloatSize.h: Ditto.
     25         * platform/graphics/IntPoint.h: Ditto.
     26         * platform/graphics/IntRect.h: Ditto.
     27         * platform/graphics/IntSize.h: Ditto.
     28         * platform/graphics/cg/FloatPointCG.cpp: Ditto.
     29         * platform/graphics/cg/FloatRectCG.cpp: Ditto.
     30         * platform/graphics/cg/FloatSizeCG.cpp: Ditto.
     31         * platform/graphics/cg/IntPointCG.cpp: Ditto.
     32         * platform/graphics/cg/IntRectCG.cpp: Ditto.
     33         * platform/graphics/cg/IntSizeCG.cpp: Ditto.
     34 
    1352011-04-13  Roland Steiner  <rolandsteiner@chromium.org>
    236
  • trunk/Source/WebCore/platform/graphics/FloatPoint.h

    r79578 r83818  
    3232#include <wtf/MathExtras.h>
    3333
    34 #if PLATFORM(CG)
     34#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    3535typedef struct CGPoint CGPoint;
    3636#endif
     
    110110    }
    111111
    112 #if PLATFORM(CG)
     112#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    113113    FloatPoint(const CGPoint&);
    114114    operator CGPoint() const;
  • trunk/Source/WebCore/platform/graphics/FloatRect.h

    r83075 r83818  
    3030#include "FloatPoint.h"
    3131
    32 #if PLATFORM(CG)
     32#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    3333typedef struct CGRect CGRect;
    3434#endif
     
    138138    void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoint& p2, const FloatPoint& p3);
    139139
    140 #if PLATFORM(CG)
     140#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    141141    FloatRect(const CGRect&);
    142142    operator CGRect() const;
  • trunk/Source/WebCore/platform/graphics/FloatSize.h

    r83422 r83818  
    3232#include <wtf/MathExtras.h>
    3333
    34 #if PLATFORM(CG) || (PLATFORM(WX) && OS(DARWIN))
     34#if PLATFORM(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROME)
    3535typedef struct CGSize CGSize;
    3636#endif
     
    9090    }
    9191
    92 #if PLATFORM(CG) || (PLATFORM(WX) && OS(DARWIN))
     92#if PLATFORM(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROME)
    9393    explicit FloatSize(const CGSize&); // don't do this implicitly since it's lossy
    9494    operator CGSize() const;
  • trunk/Source/WebCore/platform/graphics/IntPoint.h

    r79578 r83818  
    3333#endif
    3434
    35 #if PLATFORM(CG)
     35#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    3636typedef struct CGPoint CGPoint;
    3737#endif
     
    115115    }
    116116
    117 #if PLATFORM(CG)
     117#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    118118    explicit IntPoint(const CGPoint&); // don't do this implicitly since it's lossy
    119119    operator CGPoint() const;
  • trunk/Source/WebCore/platform/graphics/IntRect.h

    r83075 r83818  
    3030#include <wtf/Vector.h>
    3131
    32 #if PLATFORM(CG)
     32#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    3333typedef struct CGRect CGRect;
    3434#endif
     
    184184#endif
    185185
    186 #if PLATFORM(CG)
     186#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    187187    operator CGRect() const;
    188188#endif
     
    230230}
    231231
    232 #if PLATFORM(CG)
     232#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    233233IntRect enclosingIntRect(const CGRect&);
    234234#endif
  • trunk/Source/WebCore/platform/graphics/IntSize.h

    r71700 r83818  
    2727#define IntSize_h
    2828
    29 #if PLATFORM(CG)
     29#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    3030typedef struct CGSize CGSize;
    3131#endif
     
    110110    }
    111111
    112 #if PLATFORM(CG)
     112#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    113113    explicit IntSize(const CGSize&); // don't do this implicitly since it's lossy
    114114    operator CGSize() const;
  • trunk/Source/WebCore/platform/graphics/cg/FloatPointCG.cpp

    r15999 r83818  
    2828#include "FloatPoint.h"
    2929
    30 #if PLATFORM(CG)
     30#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    3131
    3232#include <ApplicationServices/ApplicationServices.h>
  • trunk/Source/WebCore/platform/graphics/cg/FloatRectCG.cpp

    r15999 r83818  
    2828#include "FloatRect.h"
    2929
    30 #if PLATFORM(CG)
     30#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    3131
    3232#include <ApplicationServices/ApplicationServices.h>
  • trunk/Source/WebCore/platform/graphics/cg/FloatSizeCG.cpp

    r15999 r83818  
    2828#include "FloatSize.h"
    2929
    30 #if PLATFORM(CG)
     30#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    3131
    3232#include <ApplicationServices/ApplicationServices.h>
  • trunk/Source/WebCore/platform/graphics/cg/IntPointCG.cpp

    r15999 r83818  
    2727#include "IntPoint.h"
    2828
    29 #if PLATFORM(CG)
     29#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    3030
    3131#include <ApplicationServices/ApplicationServices.h>
  • trunk/Source/WebCore/platform/graphics/cg/IntRectCG.cpp

    r15999 r83818  
    2727#include "IntRect.h"
    2828
    29 #if PLATFORM(CG)
     29#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    3030
    3131#include <ApplicationServices/ApplicationServices.h>
  • trunk/Source/WebCore/platform/graphics/cg/IntSizeCG.cpp

    r15999 r83818  
    2727#include "IntSize.h"
    2828
    29 #if PLATFORM(CG)
     29#if PLATFORM(CG) || USE(SKIA_ON_MAC_CHROME)
    3030
    3131#include <ApplicationServices/ApplicationServices.h>
Note: See TracChangeset for help on using the changeset viewer.