From f1ab740d0427ebb5c42b8b72fa3102b037a109f0 Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Thu, 18 Aug 2011 11:47:41 -0700 Subject: 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 --- .../platform/graphics/android/GLWebViewState.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'Source/WebCore/platform/graphics/android/GLWebViewState.cpp') 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); -- cgit v1.1