diff options
author | Nicolas Roard <nicolasroard@google.com> | 2011-08-18 11:47:41 -0700 |
---|---|---|
committer | Nicolas Roard <nicolasroard@google.com> | 2011-08-18 15:20:34 -0700 |
commit | f1ab740d0427ebb5c42b8b72fa3102b037a109f0 (patch) | |
tree | e131a6c4104445f3a6c6b1cfd6e79223dc381b1a /Source/WebCore/platform/graphics/android/GLWebViewState.cpp | |
parent | 11f051d74612aaf0dad2d78baf9e767ef16be62a (diff) | |
download | external_webkit-f1ab740d0427ebb5c42b8b72fa3102b037a109f0.zip external_webkit-f1ab740d0427ebb5c42b8b72fa3102b037a109f0.tar.gz external_webkit-f1ab740d0427ebb5c42b8b72fa3102b037a109f0.tar.bz2 |
Fix repaint when we toggle the inverted mode
- add a boolean return in WebView::nativeSetProperty()
- add an inverted flag in BaseTileTexture
Note that we invert the textures rather than the final screen.
bug:5167645
java counterpart: https://android-git.corp.google.com/g/#/c/129133/
Change-Id: I249e429dbabb347b1c5c0828ef4fad17ece6e4b3
Diffstat (limited to 'Source/WebCore/platform/graphics/android/GLWebViewState.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/GLWebViewState.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp index b7da291..4bc83ef 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -565,11 +565,21 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, IntRect* invalRect, SkSafeRef(compositedRoot); SkSafeUnref(m_previouslyUsedRoot); m_previouslyUsedRoot = compositedRoot; + + ret |= TilesManager::instance()->invertedScreenSwitch(); + if (ret) { - 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. + // 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. + bool fullScreenInval = m_frameworkInval.isEmpty(); + + if (TilesManager::instance()->invertedScreenSwitch()) { + fullScreenInval = true; + TilesManager::instance()->setInvertedScreenSwitch(false); + } + + if (fullScreenInval) { invalRect->setX(0); invalRect->setY(0); invalRect->setWidth(0); |