[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

simon.fraser at apple.com simon.fraser at apple.com
Wed Dec 22 13:25:48 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a39b74126a1c6c29b4fea29fc92547ad08c10129
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Sep 15 01:55:11 2010 +0000

    2010-09-14  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Oliver Hunt.
    
            Drawing an image outside the bounds of a canvas still causes repaints
            https://bugs.webkit.org/show_bug.cgi?id=45792
    
            Some canvas examples, such as http://www.phoboslab.org/biolab/, draw
            images outide the bounds of the canvas. If the canvas already had a
            non-empty m_dirtyRect, such draws would cause us to do a repaint of
            m_dirtyRect again (which goes through the platform-specific invalidation
            machinery, which can be slow).
    
            Optimize this by avoiding extra invalidation when the dirty rect
            does not intersect the canvas bounds.
    
            Not testable because this avoids additional repaints of m_dirtyRect, but
            m_dirtyRect has to be non-empty for this to benefit.
    
            * html/HTMLCanvasElement.cpp:
            (WebCore::HTMLCanvasElement::didDraw):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67526 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index edf0f40..e2fa2aa 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-09-14  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Oliver Hunt.
+
+        Drawing an image outside the bounds of a canvas still causes repaints
+        https://bugs.webkit.org/show_bug.cgi?id=45792
+        
+        Some canvas examples, such as http://www.phoboslab.org/biolab/, draw
+        images outide the bounds of the canvas. If the canvas already had a
+        non-empty m_dirtyRect, such draws would cause us to do a repaint of
+        m_dirtyRect again (which goes through the platform-specific invalidation
+        machinery, which can be slow).
+        
+        Optimize this by avoiding extra invalidation when the dirty rect
+        does not intersect the canvas bounds.
+        
+        Not testable because this avoids additional repaints of m_dirtyRect, but
+        m_dirtyRect has to be non-empty for this to benefit.
+
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::didDraw):
+
 2010-09-14  Yury Semikhatsky  <yurys at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/html/HTMLCanvasElement.cpp b/WebCore/html/HTMLCanvasElement.cpp
index 3838f14..6f46ab4 100644
--- a/WebCore/html/HTMLCanvasElement.cpp
+++ b/WebCore/html/HTMLCanvasElement.cpp
@@ -193,7 +193,7 @@ void HTMLCanvasElement::didDraw(const FloatRect& rect)
         FloatRect destRect = ro->contentBoxRect();
         FloatRect r = mapRect(rect, FloatRect(0, 0, size().width(), size().height()), destRect);
         r.intersect(destRect);
-        if (m_dirtyRect.contains(r))
+        if (r.isEmpty() || m_dirtyRect.contains(r))
             return;
 
         m_dirtyRect.unite(r);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list