[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
Thu Oct 29 13:44:03 PDT 2009


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





--- Comment #14 from Mark Mentovai <mark at chromium.org>  2009-10-29 13:44:03 PDT ---
The key problem here is that WebCore doesn't typically seem to distinguish
between SDK (MAX_ALLOWED) and deployment target (MIN_REQUIRED).  I suspect that
this is because within the Apple build, the SDK and the deployment target are
always (or usually) equal.  That's not always the case, though.

I think what we have here is a case where we really want to say:

If the deployment target >= 10.6, then USE_CGINTERPOLATION_MEDIUM.  I think
that this is undisputed.

The problem occurs when we don't fall into that configuration, but the SDK >=
10.6.  In that case, we HAVE_CGINTERPOLATION_MEDIUM, but we shouldn't
USE_CGINTERPOLATION_MEDIUM.

USE_CGINTERPOLATION_MEDIUM implies HAVE_CGINTERPOLATION_MEDIUM (but the
availability macros take care of this for you.)

USE_CGINTERPOLATION_MEDIUM determines whether you actually want to use
kCGInterpolationMedium.  If !USE_CGINTERPOLATION_MEDIUM, you don't want to map
anything TO kCGInterpolationMedium in setImageInterpolationQuality().

HAVE_CGINTERPOLATION_MEDIUM tells you if the constant exists in the headers
you're building against.  If HAVE_CGINTERPOLATION_MEDIUM, in the switch block
in imageInterpolationQuality(), you need to handle kCGInterpolationMedium, or
provide a default case, even if !USE_CGINTERPOLATION_MEDIUM.  Obviously, if
!HAVE_CGINTERPOLATION_MEDIUM, you can't do anything with it at all, because it
doesn't exist.

Is that clearer?

-- 
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