summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-09-23 13:54:16 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-23 13:54:16 -0700
commitc16143183b56f2047f9babebfe58092c609fbf32 (patch)
tree7aefbefec3fe7543c62e174016c6637e1cb0db66 /Source
parent6d41ddf6adcb00dbb779f43cfcaf5f3137c3d142 (diff)
parent1fa8d6ed441c26473ab89a9f6afe781dac53fcf6 (diff)
downloadexternal_webkit-c16143183b56f2047f9babebfe58092c609fbf32.zip
external_webkit-c16143183b56f2047f9babebfe58092c609fbf32.tar.gz
external_webkit-c16143183b56f2047f9babebfe58092c609fbf32.tar.bz2
Merge "If we have a bad framework inval rect, request entire screen redraw"
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/platform/graphics/android/GLWebViewState.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
index 0b2d058..a7aae25 100644
--- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -597,12 +597,7 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, IntRect* invalRect,
TilesManager::instance()->setInvertedScreenSwitch(false);
}
- if (fullScreenInval) {
- invalRect->setX(0);
- invalRect->setY(0);
- invalRect->setWidth(0);
- invalRect->setHeight(0);
- } else {
+ if (!fullScreenInval) {
FloatRect frameworkInval = TilesManager::instance()->shader()->rectInInvScreenCoord(
m_frameworkInval);
// Inflate the invalidate rect to avoid precision lost.
@@ -619,6 +614,18 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, IntRect* invalRect,
XLOG("invalRect(%d, %d, %d, %d)", inval.x(),
inval.y(), inval.width(), inval.height());
+
+ if (!invalRect->intersects(rect)) {
+ // invalidate is occurring offscreen, do full inval to guarantee redraw
+ fullScreenInval = true;
+ }
+ }
+
+ if (fullScreenInval) {
+ invalRect->setX(0);
+ invalRect->setY(0);
+ invalRect->setWidth(0);
+ invalRect->setHeight(0);
}
} else {
resetFrameworkInval();