diff options
author | Chris Craik <ccraik@google.com> | 2011-12-13 15:44:47 -0800 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2012-01-04 13:15:49 -0800 |
commit | 62279a918a9d01b69a61a822c8c285dd6fb03f1e (patch) | |
tree | fb05ab4ae40263e79dd383a2da1ec9500facb944 /Source/WebCore/platform/graphics/android | |
parent | 599c05f3080acd1c99f4d925c333d8a2711c9bdf (diff) | |
download | external_webkit-62279a918a9d01b69a61a822c8c285dd6fb03f1e.zip external_webkit-62279a918a9d01b69a61a822c8c285dd6fb03f1e.tar.gz external_webkit-62279a918a9d01b69a61a822c8c285dd6fb03f1e.tar.bz2 |
When in singlesurfacemode, resist switching out - DO NOT MERGE
cherry-pick of https://android-git.corp.google.com/g/#/c/155078/ into MR1 branch
bug:5660814
We want to avoid swapping in and out of singlesurface mode when we have enough
textures to hold the content, but not while the content is updating.
Change-Id: I3c45f2b9f3c8e06b397b701fb53ac6ac5ff8efdd
Diffstat (limited to 'Source/WebCore/platform/graphics/android')
-rw-r--r-- | Source/WebCore/platform/graphics/android/GLWebViewState.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp index 273c478..2cc2d85 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -132,6 +132,7 @@ void GLWebViewState::setBaseLayer(BaseLayerAndroid* layer, const SkRegion& inval // TODO: move this into TreeManager m_tiledPageA->discardTextures(); m_tiledPageB->discardTextures(); + m_layersRenderingMode = kAllTextures; } if (layer) { XLOG("new base layer %p, (inval region empty %d) with child %p", layer, inval.isEmpty(), layer->getChild(0)); @@ -376,6 +377,12 @@ bool GLWebViewState::setLayersRenderingMode(TexturesResult& nbTexturesNeeded) int maxTextures = TilesManager::instance()->maxLayerTextureCount(); LayersRenderingMode layersRenderingMode = m_layersRenderingMode; + if (m_layersRenderingMode == kSingleSurfaceRendering) { + // only switch out of SingleSurface mode, if we have 2x needed textures + // to avoid changing too often + maxTextures /= 2; + } + m_layersRenderingMode = kSingleSurfaceRendering; if (nbTexturesNeeded.fixed < maxTextures) m_layersRenderingMode = kFixedLayers; |