2007-12-10 Alp Toker <alp@atoker.com>
authoralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Dec 2007 20:39:26 +0000 (20:39 +0000)
committeralp@webkit.org <alp@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Dec 2007 20:39:26 +0000 (20:39 +0000)
        Reviewed by Niko.

        Cairo implementation of GraphicsContext::setUseAntialiasing().

        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::setUseAntialiasing):

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

WebCore/ChangeLog
WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp

index f92bc5ab11c31a7b3800ed5d03c86b8755045246..be76cfa414ae8ea21d93a1c0148aecb2cdc11f6e 100644 (file)
@@ -1,3 +1,12 @@
+2007-12-10  Alp Toker  <alp@atoker.com>
+
+        Reviewed by Niko.
+
+        Cairo implementation of GraphicsContext::setUseAntialiasing().
+
+        * platform/graphics/cairo/GraphicsContextCairo.cpp:
+        (WebCore::GraphicsContext::setUseAntialiasing):
+
 2007-12-10  Rob Buis  <buis@kde.org>
 
         Reviewed by Darin.
 2007-12-10  Rob Buis  <buis@kde.org>
 
         Reviewed by Darin.
index d3f149c2d8324c0475597c7a4d1b5b208fa2b20f..bae71f924f0fe2616e7bde17e939c7a2c1debec6 100644 (file)
@@ -877,7 +877,11 @@ void GraphicsContext::setUseAntialiasing(bool enable)
 {
     if (paintingDisabled())
         return;
 {
     if (paintingDisabled())
         return;
-    notImplemented();
+
+    // When true, use the default Cairo backend antialias mode (usually this
+    // enables standard 'grayscale' antialiasing); false to explicitly disable
+    // antialiasing. This is the same strategy as used in drawConvexPolygon().
+    cairo_set_antialias(m_data->cr, enable ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE);
 }
 
 } // namespace WebCore
 }
 
 } // namespace WebCore