diff options
author | Chris Craik <ccraik@google.com> | 2011-09-23 13:35:27 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2011-09-23 13:35:27 -0700 |
commit | 1fa8d6ed441c26473ab89a9f6afe781dac53fcf6 (patch) | |
tree | 6100e13878080c9064764b209691a458730adbd9 | |
parent | 10a44388d0f291ac0aa1af1a0ef9fa99c98c842c (diff) | |
download | external_webkit-1fa8d6ed441c26473ab89a9f6afe781dac53fcf6.zip external_webkit-1fa8d6ed441c26473ab89a9f6afe781dac53fcf6.tar.gz external_webkit-1fa8d6ed441c26473ab89a9f6afe781dac53fcf6.tar.bz2 |
If we have a bad framework inval rect, request entire screen redraw
bug:5365139
This problem is occurring because we convert webkit invals to framework ones,
but webkit invals don't account for stolen/discarded tiles/textures.
This is just a temporary fix, see also bug:5321078 which describes the root of
the problem.
Change-Id: I6d823315dba8d669171c9c7c9ed3ca20fbed07ae
-rw-r--r-- | Source/WebCore/platform/graphics/android/GLWebViewState.cpp | 19 |
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 55419f4..a7d7780 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -599,12 +599,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. @@ -621,6 +616,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(); |