Commit cb723533 authored by eric@webkit.org's avatar eric@webkit.org

2010-06-04 Vangelis Kokkevis <vangelis@chromium.org>

        Reviewed by Dimitri Glazkov.

        [chromium] Fix scrolling bug with pages using accelerated compositing.
        https://bugs.webkit.org/show_bug.cgi?id=40037

        * platform/graphics/chromium/LayerRendererChromium.cpp:
        (WebCore::LayerRendererChromium::LayerRendererChromium):
        (WebCore::LayerRendererChromium::drawLayers):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 01c309b8
2010-06-04 Vangelis Kokkevis <vangelis@chromium.org>
Reviewed by Dimitri Glazkov.
[chromium] Fix scrolling bug with pages using accelerated compositing.
https://bugs.webkit.org/show_bug.cgi?id=40037
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::LayerRendererChromium):
(WebCore::LayerRendererChromium::drawLayers):
2010-06-04 Matthew Delaney <mdelaney@apple.com>
Reviewed by Darin Adler.
......
......@@ -173,6 +173,7 @@ LayerRendererChromium::LayerRendererChromium(Page* page)
, m_page(page)
, m_rootLayerTextureWidth(0)
, m_rootLayerTextureHeight(0)
, m_scrollPosition(IntPoint(-1, -1))
{
m_quadVboIds[Vertices] = m_quadVboIds[LayerElements] = 0;
m_hardwareCompositing = (initGL() && initializeSharedGLObjects());
......@@ -284,6 +285,9 @@ void LayerRendererChromium::drawLayers(const IntRect& updateRect, const IntRect&
glDisable(GL_DEPTH_TEST);
glDisable(GL_CULL_FACE);
if (m_scrollPosition == IntPoint(-1, -1))
m_scrollPosition = scrollPosition;
IntPoint scrollDelta = toPoint(scrollPosition - m_scrollPosition);
// Scroll only when the updateRect contains pixels for the newly uncovered region to avoid flashing.
if ((scrollDelta.x() && updateRect.width() >= abs(scrollDelta.x()) && updateRect.height() >= contentRect.height())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment