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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 12:19:11 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6bd835c8736cd882c15df00a20b82b71bfcdda11
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 19 05:38:12 2010 +0000

    2010-08-18  Alexey Marinichev  <amarinichev at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [chromium] scrolling issues when accelerated compositor is enabled
            https://bugs.webkit.org/show_bug.cgi?id=43992
    
            Corrected scroll position not being updated, and an off-by-half error.
            Int cast and floorf are taken out because they produce incorrect
            transformation matrix.  The information lost there is not immediately
            obvious because of rounding that happens when texture is mapped with
            GL_NEAREST filtering mode.  These errors accumulate, and after some
            scrolling it becomes more apparent.
    
            To test the former, follow instructions in the bug.  To test the
            latter, change GL_NEAREST to GL_LINEAR in LayerRendererChromium.cpp.
            Scrolling should work properly for all window sizes, without blurring
            images and shifting them to the left.
    
            * platform/graphics/chromium/LayerRendererChromium.cpp:
            (WebCore::LayerRendererChromium::drawLayers):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65651 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2b809c1..adc7b9d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-08-18  Alexey Marinichev  <amarinichev at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [chromium] scrolling issues when accelerated compositor is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=43992
+
+        Corrected scroll position not being updated, and an off-by-half error.
+        Int cast and floorf are taken out because they produce incorrect
+        transformation matrix.  The information lost there is not immediately
+        obvious because of rounding that happens when texture is mapped with
+        GL_NEAREST filtering mode.  These errors accumulate, and after some
+        scrolling it becomes more apparent.
+
+        To test the former, follow instructions in the bug.  To test the
+        latter, change GL_NEAREST to GL_LINEAR in LayerRendererChromium.cpp.
+        Scrolling should work properly for all window sizes, without blurring
+        images and shifting them to the left.
+
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::drawLayers):
+
 2010-08-18  Simon Hausmann  <simon.hausmann at nokia.com>
 
         Reviewed by Ariya Hidayat.
diff --git a/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp b/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
index 2f70efa..6bb82b0 100644
--- a/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
+++ b/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
@@ -390,8 +390,8 @@ void LayerRendererChromium::drawLayers(const IntRect& updateRect, const IntRect&
 #error "Need to implement for your platform."
 #endif
 
-        scrolledLayerMatrix.translate3d((int)floorf(0.5 * visibleRect.width()) - scrollDelta.x(),
-            (int)floorf(0.5 * visibleRect.height()) + scaleFactor * scrollDelta.y(), 0);
+        scrolledLayerMatrix.translate3d(0.5 * visibleRect.width() - scrollDelta.x(),
+            0.5 * visibleRect.height() + scaleFactor * scrollDelta.y(), 0);
         scrolledLayerMatrix.scale3d(1, -1, 1);
 
         // Switch shaders to avoid RGB swizzling.
@@ -406,6 +406,10 @@ void LayerRendererChromium::drawLayers(const IntRect& updateRect, const IntRect&
 
         checkGLError();
         m_scrollPosition = scrollPosition;
+    } else if (abs(scrollDelta.y()) > contentRect.height() || abs(scrollDelta.x()) > contentRect.width()) {
+        // Scrolling larger than the contentRect size does not preserve any of the pixels, so there is
+        // no need to copy framebuffer pixels back into the texture.
+        m_scrollPosition = scrollPosition;
     }
 
     // FIXME: The following check should go away when the compositor renders independently from its own thread.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list