[Webkit-unassigned] [Bug 30909] 10.6 SDK building for 10.5: GraphicsContextCG.cpp:1056: warning: enumeration value 'kCGInterpolationMedium' not handled in switch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 4 15:50:58 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=30909
--- Comment #27 from Mark Rowe (bdash) <mrowe at apple.com> 2009-11-04 15:50:57 PDT ---
(In reply to comment #26)
> (In reply to comment #25)
> > CoreGraphics is well above the Darwin layer so it’s odd to suggest that Darwin
> > is somehow relevant to this decision.
>
> The original code used PLATFORM(MAC), which suggested that
> kCGInterpolationMedium is not available on Windows.
It’s not at the moment though it will be in the future.
> Since this is a CG file, it's being built on Darwin, I figured it'd be safe to
> assume that the presence and usability of kCGInterpolationMedium could be gated
> on the headers and the target. If building on Darwin but not PLATFORM(MAC) and
> not USE(CG), then this file won't be seen at all.
I’m not sure what you’re trying to say here.
> Here's another option:
>
> #if (PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN)) &&
> !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
>
> but it's starting to get really verbose there, and it's still not strictly
> right, because there might be other "platforms" beyond MAC and CHROMIUM+DARWIN
> that run on the Mac and use Mac-style CG.
>
> This is a pattern that comes up for Chromium a lot, and it seems like we need
> to rehash it each and every time, without any real consensus on how to treat
> it. What do you prefer, Mark?
I’d prefer that this was handled in a manner consistent with how this has been
handled in other places. This will allow us to easily update the code at a
point in the future when we revisit how the platform defines are handled.
Something like:
#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && PLATFORM(DARWIN))
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
// Building on 10.6: kCGInterpolationMedium is defined in the
CGInterpolationQuality enum.
#define HAVE_CG_INTERPOLATION_MEDIUM 1
#endif
#if !defined(TARGETING_TIGER) && !defined(TARGETING_LEOPARD)
// Targeting 10.6: use kCGInterpolationMedium.
#define WTF_USE_CG_INTERPOLATION_MEDIUM 1
#endif
#endif
Which reminds me… The “Building on 10.6” and “Targeting 10.6” comments are too
specific. Given how the BUILDING_ON_ and TARGETING_ macros work this code is
not specific to 10.6, but is for all OS versions >= 10.6.
> I don't think that's the case.
You’re right. I misread the code.
So overall this looks fine, but we need to get the #if’s straightened out.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list