<rdar://problem/6164952> Use constant kCGInterpolationMedium in GraphicsContextCG...
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Oct 2008 22:20:10 +0000 (22:20 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Oct 2008 22:20:10 +0000 (22:20 +0000)
Reviewed by Sam Weinig.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37870 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/graphics/cg/GraphicsContextCG.cpp

index d3f0665..e3ba1a7 100644 (file)
@@ -1,3 +1,13 @@
+2008-10-24  Mark Rowe  <mrowe@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        <rdar://problem/6164952> Use constant kCGInterpolationMedium in GraphicsContextCG.cpp rather than hard-coded values.
+
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::setImageInterpolationQuality):
+        (WebCore::GraphicsContext::imageInterpolationQuality):
+
 2008-10-24  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Sam Weinig.
index dcfe61e..3f0e6e7 100644 (file)
@@ -987,8 +987,7 @@ void GraphicsContext::setImageInterpolationQuality(InterpolationQuality mode)
         // Fall through to InterpolationHigh if kCGInterpolationMedium is not available
         case InterpolationMedium:
 #if HAVE(CG_INTERPOLATION_MEDIUM)
-            // FIXME: <rdar://problem/6164952> Use constant kCGInterpolationMedium when everyone has a version of CG that defines it.
-            quality = static_cast<CGInterpolationQuality>(4); 
+            quality = kCGInterpolationMedium;
             break;
 #endif
         case InterpolationHigh:
@@ -1011,13 +1010,12 @@ InterpolationQuality GraphicsContext::imageInterpolationQuality() const
             return InterpolationNone;
         case kCGInterpolationLow:
             return InterpolationLow;
-        case kCGInterpolationHigh:
-            return InterpolationHigh;
 #if HAVE(CG_INTERPOLATION_MEDIUM)
-        // FIXME: <rdar://problem/6164952> Use constant kCGInterpolationMedium when everyone has a version of CG that defines it.
-        default:
+        case kCGInterpolationMedium:
             return InterpolationMedium;
 #endif
+        case kCGInterpolationHigh:
+            return InterpolationHigh;
     }
     return InterpolationDefault;
 }