summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-08-15 16:23:32 -0700
committerChris Craik <ccraik@google.com>2011-08-15 16:32:49 -0700
commit8a6929b72f2a74dac77bcf7aa62f5a1750960649 (patch)
treea1ebec22127a51784abbc550cc90d0a81dffc28f /Source
parenta19896cc5d9573a17b6ec206befb3b4ec6b2256b (diff)
downloadexternal_webkit-8a6929b72f2a74dac77bcf7aa62f5a1750960649.zip
external_webkit-8a6929b72f2a74dac77bcf7aa62f5a1750960649.tar.gz
external_webkit-8a6929b72f2a74dac77bcf7aa62f5a1750960649.tar.bz2
full screen delayed repaints no longer dropped in GLWebViewState
bug:5049965 Full screen repaints were passing incorrect inval regions. Added special case for delayed full repaints to pass full screen back as inval region from drawGL() method. Since no valid inval region was passed to framework to redraw, the view's drawGL() wasn't called again, so the tiledPages couldn't be swapped. Change-Id: Ibbcec77b304c01ba1e3072376480e04613aad56e
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/platform/graphics/android/GLWebViewState.cpp40
1 files changed, 26 insertions, 14 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
index 748c5e9..f16a342 100644
--- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -563,20 +563,32 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, IntRect* invalRect,
SkSafeUnref(m_previouslyUsedRoot);
m_previouslyUsedRoot = compositedRoot;
if (ret) {
- FloatRect frameworkInval = TilesManager::instance()->shader()->rectInInvScreenCoord(m_frameworkInval);
- // Inflate the invalidate rect to avoid precision lost.
- frameworkInval.inflate(1);
- IntRect inval(frameworkInval.x(), frameworkInval.y(), frameworkInval.width(), frameworkInval.height());
-
- inval.unite(m_frameworkLayersInval);
-
- invalRect->setX(inval.x());
- invalRect->setY(inval.y());
- invalRect->setWidth(inval.width());
- invalRect->setHeight(inval.height());
-
- XLOG("invalRect(%d, %d, %d, %d)", inval.x(),
- inval.y(), inval.width(), inval.height());
+ if (m_frameworkInval.isEmpty()) {
+ // ret==true && empty inval region means we've inval'd everything,
+ // but don't have new content. Keep redrawing full view (0,0,0,0)
+ // until tile generation catches up and we swap pages.
+ invalRect->setX(0);
+ invalRect->setY(0);
+ invalRect->setWidth(0);
+ invalRect->setHeight(0);
+ } else {
+ FloatRect frameworkInval = TilesManager::instance()->shader()->rectInInvScreenCoord(
+ m_frameworkInval);
+ // Inflate the invalidate rect to avoid precision lost.
+ frameworkInval.inflate(1);
+ IntRect inval(frameworkInval.x(), frameworkInval.y(),
+ frameworkInval.width(), frameworkInval.height());
+
+ inval.unite(m_frameworkLayersInval);
+
+ invalRect->setX(inval.x());
+ invalRect->setY(inval.y());
+ invalRect->setWidth(inval.width());
+ invalRect->setHeight(inval.height());
+
+ XLOG("invalRect(%d, %d, %d, %d)", inval.x(),
+ inval.y(), inval.width(), inval.height());
+ }
} else {
resetFrameworkInval();
}