Changeset 89968 in webkit


Ignore:
Timestamp:
Jun 28, 2011 3:27:15 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-28 Cary Clark <caryclark@google.com>

Reviewed by James Robinson.

Use Skia if Skia on Mac Chrome is enabled
https://bugs.webkit.org/show_bug.cgi?id=62999

  • wtf/Platform.h: Add switch to use Skia if, externally, Skia has been enabled by a gyp define.

2011-06-28 Cary Clark <caryclark@google.com>

Reviewed by James Robinson.

Use Skia if Skia on Mac Chrome is enabled
https://bugs.webkit.org/show_bug.cgi?id=62999

No new tests. This does not affect existing
functionality.

  • WebCore.gyp/WebCore.gyp: Include Skia and related files and exclude CG and related files when building Chromium for Skia on the Mac.
  • loader/cache/CachedFont.cpp: Rename CHROME to CHROMIUM.
  • platform/chromium/DragImageRef.h:
  • platform/graphics/FloatPoint.h:
  • platform/graphics/FloatRect.h:
  • platform/graphics/FloatSize.h:
  • platform/graphics/FontPlatformData.h: (WebCore::FontPlatformData::hash):
  • platform/graphics/GlyphBuffer.h: (WebCore::GlyphBuffer::advanceAt): (WebCore::GlyphBuffer::add): (WebCore::GlyphBuffer::expandLastAdvance):
  • platform/graphics/IntPoint.h:
  • platform/graphics/IntRect.h:
  • platform/graphics/IntSize.h:
  • platform/graphics/SimpleFontData.h:
  • platform/graphics/cg/FloatPointCG.cpp:
  • platform/graphics/cg/FloatRectCG.cpp:
  • platform/graphics/cg/FloatSizeCG.cpp:
  • platform/graphics/cg/IntPointCG.cpp:
  • platform/graphics/cg/IntRectCG.cpp:
  • platform/graphics/cg/IntSizeCG.cpp:
  • platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData):
  • platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): Ditto.

2011-06-28 Cary Clark <caryclark@google.com>

Reviewed by James Robinson.

Use Skia if Skia on Mac Chrome is enabled
https://bugs.webkit.org/show_bug.cgi?id=62999

  • WebKit.gyp: If building for Skia, exclude CG files. If not, exclude Skia files.
  • features.gypi: Enable Skia on Chromium Mac if so instructed by the gyp define. Allow Skia to be hardware accelerated on the Mac.
  • public/WebCommon.h: If Skia is defined on the Mac, define it in the WebXXX interfaces as well.
Location:
trunk/Source
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r89964 r89968  
     12011-06-28  Cary Clark  <caryclark@google.com>
     2
     3        Reviewed by James Robinson.
     4
     5        Use Skia if Skia on Mac Chrome is enabled
     6        https://bugs.webkit.org/show_bug.cgi?id=62999
     7
     8        * wtf/Platform.h:
     9        Add switch to use Skia if, externally,
     10        Skia has been enabled by a gyp define.
     11
    1122011-06-28  Oliver Hunt  <oliver@apple.com>
    213
  • trunk/Source/JavaScriptCore/wtf/Platform.h

    r89732 r89968  
    544544#endif
    545545
    546 /* USE(SKIA) for Win/Linux, CG for Mac */
     546/* USE(SKIA) for Win/Linux, CG for Mac, unless enabled */
    547547#if PLATFORM(CHROMIUM)
    548548#if OS(DARWIN)
     549#if USE(SKIA_ON_MAC_CHROMIUM)
     550#define WTF_USE_SKIA 1
     551#else
    549552#define WTF_USE_CG 1
     553#endif
    550554#define WTF_USE_ATSUI 1
    551555#define WTF_USE_CORE_TEXT 1
  • trunk/Source/WebCore/ChangeLog

    r89952 r89968  
     12011-06-28  Cary Clark  <caryclark@google.com>
     2
     3        Reviewed by James Robinson.
     4
     5        Use Skia if Skia on Mac Chrome is enabled
     6        https://bugs.webkit.org/show_bug.cgi?id=62999
     7
     8        No new tests. This does not affect existing
     9        functionality.
     10
     11        * WebCore.gyp/WebCore.gyp:
     12        Include Skia and related files and exclude CG
     13        and related files when building Chromium for Skia
     14        on the Mac.
     15
     16        * loader/cache/CachedFont.cpp:
     17        Rename CHROME to CHROMIUM.
     18
     19        * platform/chromium/DragImageRef.h:
     20        * platform/graphics/FloatPoint.h:
     21        * platform/graphics/FloatRect.h:
     22        * platform/graphics/FloatSize.h:
     23        * platform/graphics/FontPlatformData.h:
     24        (WebCore::FontPlatformData::hash):
     25        * platform/graphics/GlyphBuffer.h:
     26        (WebCore::GlyphBuffer::advanceAt):
     27        (WebCore::GlyphBuffer::add):
     28        (WebCore::GlyphBuffer::expandLastAdvance):
     29        * platform/graphics/IntPoint.h:
     30        * platform/graphics/IntRect.h:
     31        * platform/graphics/IntSize.h:
     32        * platform/graphics/SimpleFontData.h:
     33        * platform/graphics/cg/FloatPointCG.cpp:
     34        * platform/graphics/cg/FloatRectCG.cpp:
     35        * platform/graphics/cg/FloatSizeCG.cpp:
     36        * platform/graphics/cg/IntPointCG.cpp:
     37        * platform/graphics/cg/IntRectCG.cpp:
     38        * platform/graphics/cg/IntSizeCG.cpp:
     39        * platform/graphics/mac/FontCustomPlatformData.cpp:
     40        (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
     41        (WebCore::createFontCustomPlatformData):
     42        * platform/graphics/mac/FontCustomPlatformData.h:
     43        (WebCore::FontCustomPlatformData::FontCustomPlatformData):
     44        Ditto.
     45
    1462011-06-28  Ryosuke Niwa  <rniwa@webkit.org>
    247
  • trunk/Source/WebCore/WebCore.gyp/WebCore.gyp

    r89874 r89968  
    261261        ],
    262262      }],
    263       ['OS=="mac"', {
     263      ['OS=="mac" and use_skia==0', {
    264264        'webcore_include_dirs+': [
    265265          # platform/graphics/cg and cocoa need to come before
     
    272272          '../platform/graphics/cg',
    273273        ],
     274      }],
     275      ['OS=="mac"', {
    274276        'webcore_include_dirs': [
    275277          # FIXME: Eliminate dependency on platform/mac and related
     
    283285          '../platform/mac',
    284286          '../platform/text/mac',
     287        ],
     288      }],
     289      ['OS=="mac" and use_skia==1', {
     290        'webcore_include_dirs': [
     291              '../platform/graphics/cocoa',
     292              '../platform/graphics/cg',
    285293        ],
    286294      }],
     
    13411349          ],
    13421350        }],
    1343         ['OS=="mac"', {
     1351        ['OS=="mac" and use_skia==0', {
     1352          'sources/': [
     1353            # The Mac build is PLATFORM_CG too.  platform/graphics/cg is the
     1354            # only place that CG files we want to build are located, and not
     1355            # all of them even have a CG suffix, so just add them by a
     1356            # regexp matching their directory.
     1357            ['include', 'platform/graphics/cg/[^/]*(?<!Win)?\\.(cpp|mm?)$'],
     1358          ],
     1359        }],['OS=="mac"', {
    13441360          # Necessary for Mac .mm stuff.
    13451361          'include_dirs': [
     
    13711387            ['exclude', 'network/cf/'],
    13721388
    1373             # The Mac build is PLATFORM_CG too.  platform/graphics/cg is the
    1374             # only place that CG files we want to build are located, and not
    1375             # all of them even have a CG suffix, so just add them by a
    1376             # regexp matching their directory.
    1377             ['include', 'platform/graphics/cg/[^/]*(?<!Win)?\\.(cpp|mm?)$'],
    1378 
    13791389            # Use native Mac font code from WebCore.
    13801390            ['include', 'platform/(graphics/)?mac/[^/]*Font[^/]*\\.(cpp|mm?)$'],
     
    13931403            ['include', 'platform/graphics/mac/FloatSizeMac\\.mm$'],
    13941404            ['include', 'platform/graphics/mac/GlyphPageTreeNodeMac\\.cpp$'],
    1395             ['include', 'platform/graphics/mac/GraphicsContextMac\\.mm$'],
    13961405            ['include', 'platform/graphics/mac/IntPointMac\\.mm$'],
    13971406            ['include', 'platform/graphics/mac/IntRectMac\\.mm$'],
     
    14091418            ['include', 'WebKit/mac/WebCoreSupport/WebSystemInterface\\.mm$'],
    14101419
    1411             # Chromium Mac does not use skia.
    1412             ['exclude', 'platform/graphics/skia/[^/]*Skia\\.(cpp|h)$'],
    1413 
    14141420            # The Mac uses platform/mac/KillRingMac.mm instead of the dummy
    14151421            # implementation.
     
    14231429            # related to ScrollbarThemeChromium.cpp.
    14241430            ['exclude', 'platform/chromium/ScrollbarThemeChromium\\.cpp$'],
    1425 
    1426             # The Mac currently uses ImageChromiumMac.mm from
    1427             # platform/graphics/chromium, included by regex above, instead.
    1428             ['exclude', 'platform/graphics/chromium/ImageChromium\\.cpp$'],
    14291431
    14301432            # The Mac does not use ImageSourceCG.cpp from platform/graphics/cg
     
    14331435            ['exclude', 'platform/graphics/cg/PDFDocumentImage\\.cpp$'],
    14341436
    1435             # ImageDecoderSkia is not used on mac.  ImageDecoderCG is used instead.
    1436             ['exclude', 'platform/image-decoders/skia/ImageDecoderSkia\\.cpp$'],
    1437             ['include', 'platform/image-decoders/cg/ImageDecoderCG\\.cpp$'],
    1438 
    1439             # Again, Skia is not used on Mac.
    1440             ['exclude', 'platform/chromium/DragImageChromiumSkia\\.cpp$'],
     1437            ['include', '/chrome/junk\\.txt$'],
    14411438          ],
    14421439        },{ # OS!="mac"
     
    14451442            # only used on mac.
    14461443            ['exclude', 'platform/graphics/FontPlatformData\\.cpp$'],
    1447 
    1448             # Linux uses FontLinux; Windows uses FontWin. Additionally, FontSkia
    1449             # is excluded by a rule above if WebKit uses CG instead of Skia.
    1450             ['exclude', 'platform/graphics/skia/FontSkia\\.cpp$'],
     1444          ],
     1445        }],
     1446        ['OS=="mac" and use_skia==0', {
     1447          'sources/': [
     1448            # Cherry-pick some files that can't be included by broader regexps.
     1449            # Some of these are used instead of Chromium platform files, see
     1450            # the specific exclusions in the "sources!" list below.
     1451            ['include', 'platform/graphics/mac/GraphicsContextMac\\.mm$'],
     1452
     1453            # Chromium Mac does not use skia.
     1454            ['exclude', 'platform/graphics/skia/[^/]*Skia\\.(cpp|h)$'],
     1455
     1456            # The Mac currently uses ImageChromiumMac.mm from
     1457            # platform/graphics/chromium, included by regex above, instead.
     1458            ['exclude', 'platform/graphics/chromium/ImageChromium\\.cpp$'],
     1459
     1460            # ImageDecoderSkia is not used on mac.  ImageDecoderCG is used instead.
     1461            ['exclude', 'platform/image-decoders/skia/ImageDecoderSkia\\.cpp$'],
     1462            ['include', 'platform/image-decoders/cg/ImageDecoderCG\\.cpp$'],
     1463
     1464            # Again, Skia is not used on Mac.
     1465            ['exclude', 'platform/chromium/DragImageChromiumSkia\\.cpp$'],
     1466          ],
     1467        }],
     1468        ['OS=="mac" and use_skia==1', {
     1469          'sources/': [
     1470            ['include', 'platform/graphics/cg/FloatPointCG\\.cpp$'],
     1471            ['include', 'platform/graphics/cg/FloatRectCG\\.cpp$'],
     1472            ['include', 'platform/graphics/cg/FloatSizeCG\\.cpp$'],
     1473            ['include', 'platform/graphics/cg/IntPointCG\\.cpp$'],
     1474            ['include', 'platform/graphics/cg/IntRectCG\\.cpp$'],
     1475            ['include', 'platform/graphics/cg/IntSizeCG\\.cpp$'],
     1476            ['exclude', 'platform/graphics/mac/FontMac\\.mm$'],
     1477            ['exclude', 'platform/graphics/skia/GlyphPageTreeNodeSkia\\.cpp$'],
     1478            ['exclude', 'platform/chromium/DragImageChromiumMac\\.cpp$'],
    14511479          ],
    14521480        }],
     
    14551483            ['exclude', '(Gtk|Linux)\\.cpp$'],
    14561484            ['exclude', 'Harfbuzz[^/]+\\.(cpp|h)$'],
     1485          ],
     1486        }],
     1487        ['toolkit_uses_gtk == 0 and use_skia==0', {
     1488          'sources/': [
    14571489            ['exclude', 'VDMX[^/]+\\.(cpp|h)$'],
    14581490          ],
    14591491        }],
    14601492        ['OS!="mac"', {
    1461           'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
     1493          'sources/': [
     1494            ['exclude', 'Mac\\.(cpp|mm?)$'],
     1495
     1496            # Linux uses FontLinux; Windows uses FontWin. Additionally, FontSkia
     1497            # is excluded by a rule above if WebKit uses CG instead of Skia.
     1498            ['exclude', 'platform/graphics/skia/FontSkia\\.cpp$'],
     1499          ],
    14621500        }],
    14631501        ['OS!="win"', {
  • trunk/Source/WebCore/loader/cache/CachedFont.cpp

    r89496 r89968  
    2929
    3030// FIXME: This should really be a blacklist instead of a whitelist
    31 #if USE(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (!OS(DARWIN) || USE(SKIA_ON_MAC_CHROME))) || PLATFORM(HAIKU) || OS(WINCE) || PLATFORM(ANDROID) || PLATFORM(BREWMP)
     31#if USE(CG) || PLATFORM(QT) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && (!OS(DARWIN) || USE(SKIA_ON_MAC_CHROMIUM))) || PLATFORM(HAIKU) || OS(WINCE) || PLATFORM(ANDROID) || PLATFORM(BREWMP)
    3232#define STORE_FONT_CUSTOM_PLATFORM_DATA
    3333#endif
  • trunk/Source/WebCore/platform/chromium/DragImageRef.h

    r89496 r89968  
    3030#define DragImageRef_h
    3131
    32 #if OS(DARWIN) && !USE(SKIA_ON_MAC_CHROME)
     32#if USE(CG)
    3333typedef struct CGImage* CGImageRef;
    3434#else
     
    3838namespace WebCore {
    3939
    40 #if OS(DARWIN) && !USE(SKIA_ON_MAC_CHROME)
     40#if USE(CG)
    4141typedef CGImageRef DragImageRef;
    4242#else
  • trunk/Source/WebCore/platform/graphics/FloatPoint.h

    r89625 r89968  
    3232#include <wtf/MathExtras.h>
    3333
    34 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     34#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    3535typedef struct CGPoint CGPoint;
    3636#endif
     
    131131    }
    132132
    133 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     133#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    134134    FloatPoint(const CGPoint&);
    135135    operator CGPoint() const;
  • trunk/Source/WebCore/platform/graphics/FloatRect.h

    r89625 r89968  
    3030#include "FloatPoint.h"
    3131
    32 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     32#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    3333typedef struct CGRect CGRect;
    3434#endif
     
    175175    void fitToPoints(const FloatPoint& p0, const FloatPoint& p1, const FloatPoint& p2, const FloatPoint& p3);
    176176
    177 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     177#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    178178    FloatRect(const CGRect&);
    179179    operator CGRect() const;
  • trunk/Source/WebCore/platform/graphics/FloatSize.h

    r89625 r89968  
    3232#include <wtf/MathExtras.h>
    3333
    34 #if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROME)
     34#if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROMIUM)
    3535typedef struct CGSize CGSize;
    3636#endif
     
    103103    }
    104104
    105 #if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROME)
     105#if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROMIUM)
    106106    explicit FloatSize(const CGSize&); // don't do this implicitly since it's lossy
    107107    operator CGSize() const;
  • trunk/Source/WebCore/platform/graphics/FontPlatformData.h

    r89496 r89968  
    8383#endif
    8484
    85 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     85#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    8686typedef struct CGFont* CGFontRef;
    8787#if OS(DARWIN)
     
    177177    FontPlatformData(NSFont*, float size, bool syntheticBold = false, bool syntheticOblique = false, FontOrientation = Horizontal,
    178178                     TextOrientation = TextOrientationVerticalRight, FontWidthVariant = RegularWidth);
    179 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     179#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    180180    FontPlatformData(CGFontRef cgFont, float size, bool syntheticBold, bool syntheticOblique, FontOrientation orientation,
    181181                     TextOrientation textOrientation, FontWidthVariant widthVariant)
     
    213213#endif
    214214
    215 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     215#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    216216#if OS(DARWIN)
    217217    CGFontRef cgFont() const { return m_cgFont.get(); }
     
    246246        return m_font ? m_font->hash() : 0;
    247247#elif OS(DARWIN)
    248 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     248#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    249249        ASSERT(m_font || !m_cgFont);
    250250#endif
     
    322322#endif
    323323
    324 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     324#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    325325#if PLATFORM(WIN)
    326326    RetainPtr<CGFontRef> m_cgFont;
  • trunk/Source/WebCore/platform/graphics/GlyphBuffer.h

    r89496 r89968  
    3636#include <wtf/Vector.h>
    3737
    38 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     38#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    3939#include <CoreGraphics/CGGeometry.h>
    4040#endif
     
    6363// CG uses CGSize instead of FloatSize so that the result of advances()
    6464// can be passed directly to CGContextShowGlyphsWithAdvances in FontMac.mm
    65 #if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROME)
     65#if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROMIUM)
    6666typedef CGSize GlyphBufferAdvance;
    6767#elif OS(WINCE)
     
    127127    float advanceAt(int index) const
    128128    {
    129 #if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROME)
     129#if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROMIUM)
    130130        return m_advances[index].width;
    131131#elif OS(WINCE)
     
    158158#endif
    159159
    160 #if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROME)
     160#if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROMIUM)
    161161        CGSize advance = { width, 0 };
    162162        m_advances.append(advance);
     
    197197        ASSERT(!isEmpty());
    198198        GlyphBufferAdvance& lastAdvance = m_advances.last();
    199 #if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROME)
     199#if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROMIUM)
    200200        lastAdvance.width += width;
    201201#elif OS(WINCE)
  • trunk/Source/WebCore/platform/graphics/IntPoint.h

    r89496 r89968  
    3434#endif
    3535
    36 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     36#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    3737typedef struct CGPoint CGPoint;
    3838#endif
     
    122122    }
    123123
    124 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     124#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    125125    explicit IntPoint(const CGPoint&); // don't do this implicitly since it's lossy
    126126    operator CGPoint() const;
  • trunk/Source/WebCore/platform/graphics/IntRect.h

    r89496 r89968  
    3030#include <wtf/Vector.h>
    3131
    32 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     32#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    3333typedef struct CGRect CGRect;
    3434#endif
     
    203203#endif
    204204
    205 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     205#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    206206    operator CGRect() const;
    207207#endif
     
    249249}
    250250
    251 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     251#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    252252IntRect enclosingIntRect(const CGRect&);
    253253#endif
  • trunk/Source/WebCore/platform/graphics/IntSize.h

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

    r89733 r89968  
    138138    void setSpaceWidth(float spaceWidth) { m_spaceWidth = spaceWidth; }
    139139
    140 #if USE(CG) || USE(CAIRO) || PLATFORM(WX) || USE(SKIA_ON_MAC_CHROME)
     140#if USE(CG) || USE(CAIRO) || PLATFORM(WX) || USE(SKIA_ON_MAC_CHROMIUM)
    141141    float syntheticBoldOffset() const { return m_syntheticBoldOffset; }
    142142#endif
     
    271271    mutable OwnPtr<DerivedFontData> m_derivedFontData;
    272272
    273 #if USE(CG) || USE(CAIRO) || PLATFORM(WX) || USE(SKIA_ON_MAC_CHROME)
     273#if USE(CG) || USE(CAIRO) || PLATFORM(WX) || USE(SKIA_ON_MAC_CHROMIUM)
    274274    float m_syntheticBoldOffset;
    275275#endif
  • trunk/Source/WebCore/platform/graphics/cg/FloatPointCG.cpp

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

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

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

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

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

    r89496 r89968  
    2727#include "IntSize.h"
    2828
    29 #if USE(CG) || USE(SKIA_ON_MAC_CHROME)
     29#if USE(CG) || USE(SKIA_ON_MAC_CHROMIUM)
    3030
    3131#include <ApplicationServices/ApplicationServices.h>
  • trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp

    r89496 r89968  
    2828#include <ApplicationServices/ApplicationServices.h>
    2929
    30 #if USE(SKIA_ON_MAC_CHROME)
     30#if USE(SKIA_ON_MAC_CHROMIUM)
    3131#include "SkStream.h"
    3232#include "SkTypeface.h"
     
    3535namespace WebCore {
    3636
    37 #if USE(SKIA_ON_MAC_CHROME)
     37#if USE(SKIA_ON_MAC_CHROMIUM)
    3838class RemoteFontStream : public SkStream {
    3939public:
     
    8383        ATSFontDeactivate(m_atsContainer, NULL, kATSOptionFlagsDefault);
    8484#endif
    85 #if USE(SKIA_ON_MAC_CHROME)
     85#if USE(SKIA_ON_MAC_CHROMIUM)
    8686    SkSafeUnref(m_typeface);
    8787#endif
     
    161161
    162162    FontCustomPlatformData* fontCustomPlatformData = new FontCustomPlatformData(containerRef, cgFontRef.releaseRef());
    163 #if USE(SKIA_ON_MAC_CHROME)
     163#if USE(SKIA_ON_MAC_CHROMIUM)
    164164    RemoteFontStream* stream = new RemoteFontStream(buffer);
    165165    fontCustomPlatformData->m_typeface = SkTypeface::CreateFromStream(stream);
  • trunk/Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h

    r89496 r89968  
    3434typedef UInt32 ATSFontRef;
    3535
    36 #if USE(SKIA_ON_MAC_CHROME)
     36#if USE(SKIA_ON_MAC_CHROMIUM)
    3737struct SkTypeface;
    3838#endif
     
    4949        : m_atsContainer(container)
    5050        , m_cgFont(cgFont)
    51 #if USE(SKIA_ON_MAC_CHROME)
     51#if USE(SKIA_ON_MAC_CHROMIUM)
    5252        , m_typeface(0)
    5353#endif
     
    6363    ATSFontContainerRef m_atsContainer;
    6464    CGFontRef m_cgFont;
    65 #if USE(SKIA_ON_MAC_CHROME)
     65#if USE(SKIA_ON_MAC_CHROMIUM)
    6666    SkTypeface* m_typeface;
    6767#endif
  • trunk/Source/WebKit/chromium/ChangeLog

    r89953 r89968  
     12011-06-28  Cary Clark  <caryclark@google.com>
     2
     3        Reviewed by James Robinson.
     4
     5        Use Skia if Skia on Mac Chrome is enabled
     6        https://bugs.webkit.org/show_bug.cgi?id=62999
     7
     8        * WebKit.gyp:
     9        If building for Skia, exclude CG files.
     10        If not, exclude Skia files.
     11
     12        * features.gypi:
     13        Enable Skia on Chromium Mac if so instructed by the gyp define.
     14        Allow Skia to be hardware accelerated on the Mac.
     15
     16        * public/WebCommon.h:
     17        If Skia is defined on the Mac, define it in the WebXXX
     18        interfaces as well.
     19
    1202011-06-28  Ryosuke Niwa  <rniwa@webkit.org>
    221
  • trunk/Source/WebKit/chromium/WebKit.gyp

    r89496 r89968  
    685685                        'public/mac',
    686686                    ],
    687                     'sources/': [
    688                         ['exclude', 'Skia\\.cpp$'],
     687                    'conditions': [
     688                        ['use_skia==0', {
     689                            'sources/': [
     690                                ['exclude', 'Skia\\.cpp$'],
     691                            ],
     692                        },{ # use_skia
     693                            'sources/': [
     694                                ['exclude', 'CG\\.cpp$'],
     695                            ],
     696                        }],
    689697                    ],
    690698                }, { # else: OS!="mac"
  • trunk/Source/WebKit/chromium/features.gypi

    r89693 r89968  
    107107      'enable_touch_events%': 1,
    108108      'use_skia_gpu%': 0,
     109      'use_skia%': 0,
    109110      'enable_touch_icon_loading%' : 0,
    110111      'enable_smooth_scrolling%': 0,
     
    116117    'enable_touch_events%': '<(enable_touch_events)',
    117118    'enable_smooth_scrolling%': '<(enable_smooth_scrolling)',
     119    'use_skia%': '<(use_skia)',
    118120    'conditions': [
    119121      ['use_accelerated_compositing==1', {
     
    123125        ],
    124126      }],
    125       ['use_accelerated_compositing==1 and OS!="mac"', {
     127      ['use_accelerated_compositing==1 and (OS!="mac" or use_skia==1)', {
    126128        'feature_defines': [
    127129          'ENABLE_ACCELERATED_2D_CANVAS=1',
     
    141143          'WTF_USE_WEBAUDIO_FFMPEG=1',
    142144        ],
     145        'use_skia%': 1,
    143146      }],
    144147      ['enable_register_protocol_handler==1', {
    145148        'feature_defines': [
    146149          'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
     150        ],
     151      }],
     152      ['OS=="mac"', {
     153        'feature_defines': [
     154          'WTF_USE_SKIA_ON_MAC_CHROMIUM=<(use_skia)',
    147155        ],
    148156      }],
  • trunk/Source/WebKit/chromium/public/WebCommon.h

    r89496 r89968  
    4040
    4141#if !defined(WEBKIT_USING_SKIA)
    42     #if !defined(__APPLE__)
     42    #if !defined(__APPLE__) || defined(USE_SKIA)
    4343        #define WEBKIT_USING_SKIA 1
    4444    #else
Note: See TracChangeset for help on using the changeset viewer.