summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2011-12-07 18:02:35 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-12-07 18:02:35 -0800
commitc00fdf0b571ebaa5ded52f4eade28e12beea36d2 (patch)
tree82101f1b31d07edbda16cc76f42bf441113bfa61 /Source
parent1d9cab1bc5a505a47c7a314699520dcd56ee9d4f (diff)
parent3d0d375adaf3c93bcafebdb15fa6675e463aa565 (diff)
downloadexternal_webkit-c00fdf0b571ebaa5ded52f4eade28e12beea36d2.zip
external_webkit-c00fdf0b571ebaa5ded52f4eade28e12beea36d2.tar.gz
external_webkit-c00fdf0b571ebaa5ded52f4eade28e12beea36d2.tar.bz2
Merge "Fix the repaint inval mechanism for layers - DO NOT MERGE" into ics-mr1
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/platform/graphics/android/BaseTile.cpp3
-rw-r--r--Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp9
-rw-r--r--Source/WebCore/rendering/RenderLayer.cpp7
3 files changed, 15 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/android/BaseTile.cpp b/Source/WebCore/platform/graphics/android/BaseTile.cpp
index 2ff27bf..27bd482 100644
--- a/Source/WebCore/platform/graphics/android/BaseTile.cpp
+++ b/Source/WebCore/platform/graphics/android/BaseTile.cpp
@@ -205,11 +205,8 @@ void BaseTile::markAsDirty(int unsigned pictureCount,
cliperator.next();
}
- /*
- NOT FUNCTIONING CORRECTLY, TEMPORARILY DISABLED
if (!intersect)
return;
- */
m_dirty = true;
if (m_state == UpToDate) {
diff --git a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
index ab45f1b..6990503 100644
--- a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
@@ -611,7 +611,14 @@ bool GraphicsLayerAndroid::repaint()
m_foregroundLayer->setPosition(-x, -y);
// Set the scrollable bounds of the layer.
m_foregroundLayer->setScrollLimits(-x, -y, m_size.width(), m_size.height());
- m_foregroundLayer->markAsDirty(m_dirtyRegion);
+
+ // Invalidate the entire layer for now, as webkit will only send the
+ // setNeedsDisplayInRect() for the visible (clipped) scrollable area,
+ // offsetting the invals by the scroll position would not be enough.
+ // TODO: have webkit send us invals even for non visible area
+ SkRegion region;
+ region.setRect(0, 0, contentsRect.width(), contentsRect.height());
+ m_foregroundLayer->markAsDirty(region);
m_foregroundLayer->needsRepaint();
} else {
// If there is no contents clip, we can draw everything into one
diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp
index 904b1b2..cdc4c05 100644
--- a/Source/WebCore/rendering/RenderLayer.cpp
+++ b/Source/WebCore/rendering/RenderLayer.cpp
@@ -1419,8 +1419,15 @@ void RenderLayer::scrollTo(int x, int y)
}
// Just schedule a full repaint of our object.
+#if ENABLE(ANDROID_OVERFLOW_SCROLL)
+ // On android, scrollable areas are put on composited layers, so we
+ // do not need to repaint simply because we are scrolling
+ if (view && !hasOverflowScroll())
+ renderer()->repaintUsingContainer(repaintContainer, rectForRepaint);
+#else
if (view)
renderer()->repaintUsingContainer(repaintContainer, rectForRepaint);
+#endif
// Schedule the scroll DOM event.
renderer()->node()->document()->eventQueue()->enqueueOrDispatchScrollEvent(renderer()->node(), EventQueue::ScrollEventElementTarget);