Use the proper clipping algorithm
authorstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 May 2007 07:00:11 +0000 (07:00 +0000)
committerstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 May 2007 07:00:11 +0000 (07:00 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@21554 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/graphics/qt/GraphicsContextQt.cpp

index 809743a0880af60bcbca1360d0beab36f07fd7d6..0ae9732787351654464cb52dbe80183eb9a0f9e9 100644 (file)
@@ -1,3 +1,13 @@
+2007-05-18  George Staikos  <staikos@kde.org>
+
+        Reviewed by Lars.
+
+        Use the proper clipping algorithm.  Might be a bit slow but we
+        can optimize it later.
+
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::clip):
+
 2007-05-17  Sam Weinig  <sam@webkit.org>
 
         Reviewed by George Staikos.
index a3c4e046ec37f1ddbe8923f7f23f8fe759c1a3bd..afc98ec2db301d03d3b805c83de2a4e28587ba74 100644 (file)
@@ -523,7 +523,9 @@ void GraphicsContext::clip(const IntRect& rect)
     if (paintingDisabled())
         return;
 
-    m_data->p().setClipRect(rect, Qt::UniteClip);
+    if (m_data->p().clipRegion().isEmpty())
+        m_data->p().setClipRect(rect);
+    else m_data->p().setClipRect(rect, Qt::IntersectClip);
 }
 
 /**