Changeset 54502 in webkit


Ignore:
Timestamp:
Feb 8, 2010 12:25:21 PM (14 years ago)
Author:
senorblanco@chromium.org
Message:

2010-02-08 Stephen White <senorblanco@chromium.org>

Reviewed by Dimitri Glazkov.

Make an inline function containing a static var out-of-line. This is
a workaround for Xcode 3.1 bug radar 7070016. We tripped on this in
deviceRGBColorSpaceRef on the Chromium canaries. This is a proactive
fix for the same problem in sRGBColorSpaceRef().

https://bugs.webkit.org/show_bug.cgi?id=34663

  • platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::sRGBColorSpaceRef):
  • platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r54499 r54502  
     12010-02-08  Stephen White  <senorblanco@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Make an inline function containing a static var out-of-line.  This is
     6        a workaround for Xcode 3.1 bug radar 7070016.  We tripped on this in
     7        deviceRGBColorSpaceRef on the Chromium canaries.  This is a proactive
     8        fix for the same problem in sRGBColorSpaceRef().
     9
     10        https://bugs.webkit.org/show_bug.cgi?id=34663
     11
     12        * platform/graphics/cg/GraphicsContextCG.cpp:
     13        (WebCore::sRGBColorSpaceRef):
     14        * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
     15
    1162010-02-08  Nate Chapin  <japhet@chromium.org>
    217
  • trunk/WebCore/platform/graphics/cg/GraphicsContextCG.cpp

    r54465 r54502  
    133133}
    134134
     135CGColorSpaceRef sRGBColorSpaceRef()
     136{
     137    // FIXME: Windows should be able to use kCGColorSpaceSRGB, this is tracked by http://webkit.org/b/31363.
     138#if PLATFORM(WIN) || defined(BUILDING_ON_TIGER)
     139    return deviceRGBColorSpaceRef();
     140#else
     141    static CGColorSpaceRef sRGBSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
     142    return sRGBSpace;
     143#endif
     144}
     145
    135146GraphicsContext::GraphicsContext(CGContextRef cgContext)
    136147    : m_common(createGraphicsContextPrivate())
  • trunk/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h

    r54465 r54502  
    3232
    3333// FIXME: This would be in GraphicsContextCG.h if that existed.
    34 inline CGColorSpaceRef sRGBColorSpaceRef()
    35 {
    36     // FIXME: Windows should be able to use kCGColorSpaceSRGB, this is tracked by http://webkit.org/b/31363.
    37 #if PLATFORM(WIN) || defined(BUILDING_ON_TIGER)
    38     return deviceRGBColorSpaceRef();
    39 #else
    40     static CGColorSpaceRef sRGBSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
    41     return sRGBSpace;
    42 #endif
    43 }
     34CGColorSpaceRef sRGBColorSpaceRef();
    4435
    4536class GraphicsContextPlatformPrivate {
Note: See TracChangeset for help on using the changeset viewer.