diff options
Diffstat (limited to 'Source/WebCore/platform/graphics')
5 files changed, 33 insertions, 5 deletions
diff --git a/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp b/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp index 7e6a57d..7c6fb7a 100644 --- a/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp +++ b/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp @@ -255,6 +255,7 @@ void BaseTileTexture::setOwnTextureTileInfoFromQueue(const TextureTileInfo* info m_ownTextureTileInfo.m_scale = info->m_scale; m_ownTextureTileInfo.m_painter = info->m_painter; m_ownTextureTileInfo.m_picture = info->m_picture; + m_ownTextureTileInfo.m_inverted = TilesManager::instance()->invertedScreen(); } bool BaseTileTexture::readyFor(BaseTile* baseTile) @@ -264,7 +265,8 @@ bool BaseTileTexture::readyFor(BaseTile* baseTile) (info->m_x == baseTile->x()) && (info->m_y == baseTile->y()) && (info->m_scale == baseTile->scale()) && - (info->m_painter == baseTile->painter())) + (info->m_painter == baseTile->painter()) && + (info->m_inverted == TilesManager::instance()->invertedScreen())) return true; XLOG("readyFor return false for tile x, y (%d %d) texId %d ," diff --git a/Source/WebCore/platform/graphics/android/BaseTileTexture.h b/Source/WebCore/platform/graphics/android/BaseTileTexture.h index b21659f..bc66195 100644 --- a/Source/WebCore/platform/graphics/android/BaseTileTexture.h +++ b/Source/WebCore/platform/graphics/android/BaseTileTexture.h @@ -48,6 +48,7 @@ public: , m_texture(0) , m_painter(0) , m_picture(0) + , m_inverted(false) { } int m_x; @@ -57,6 +58,7 @@ public: TextureInfo* m_texture; TilePainter* m_painter; unsigned int m_picture; + bool m_inverted; }; // While in the queue, the BaseTile can be re-used, the updated bitmap diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp index c54977d..53d32f7 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -573,11 +573,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); diff --git a/Source/WebCore/platform/graphics/android/TilesManager.cpp b/Source/WebCore/platform/graphics/android/TilesManager.cpp index 6e1ce31..d7c7952 100644 --- a/Source/WebCore/platform/graphics/android/TilesManager.cpp +++ b/Source/WebCore/platform/graphics/android/TilesManager.cpp @@ -93,6 +93,7 @@ TilesManager::TilesManager() , m_generatorReady(false) , m_showVisualIndicator(false) , m_invertedScreen(false) + , m_invertedScreenSwitch(false) , m_drawRegistrationCount(0) { XLOG("TilesManager ctor"); diff --git a/Source/WebCore/platform/graphics/android/TilesManager.h b/Source/WebCore/platform/graphics/android/TilesManager.h index 471bece..a383a2e 100644 --- a/Source/WebCore/platform/graphics/android/TilesManager.h +++ b/Source/WebCore/platform/graphics/android/TilesManager.h @@ -143,11 +143,23 @@ public: return m_invertedScreen; } + bool invertedScreenSwitch() + { + return m_invertedScreenSwitch; + } + void setInvertedScreen(bool invert) { + if (m_invertedScreen != invert) + m_invertedScreenSwitch = true; m_invertedScreen = invert; } + void setInvertedScreenSwitch(bool invertedSwitch) + { + m_invertedScreenSwitch = invertedSwitch; + } + void setInvertedScreenContrast(float contrast) { m_shader.setContrast(contrast); @@ -179,6 +191,7 @@ private: bool m_showVisualIndicator; bool m_invertedScreen; + bool m_invertedScreenSwitch; sp<TexturesGenerator> m_pixmapsGenerationThread; |