diff options
author | Chris Craik <ccraik@google.com> | 2012-01-04 13:43:37 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-01-04 13:43:37 -0800 |
commit | 08a2aede30839b296a2fad9d27939c4aaa6ccbb1 (patch) | |
tree | 2f980357fda88ae9e013ce9eacee24ad0625846e /Source/WebCore/platform/graphics/android | |
parent | 2cc4497f17622689c7cd981e220795762660df5c (diff) | |
parent | 62279a918a9d01b69a61a822c8c285dd6fb03f1e (diff) | |
download | external_webkit-08a2aede30839b296a2fad9d27939c4aaa6ccbb1.zip external_webkit-08a2aede30839b296a2fad9d27939c4aaa6ccbb1.tar.gz external_webkit-08a2aede30839b296a2fad9d27939c4aaa6ccbb1.tar.bz2 |
Merge "When in singlesurfacemode, resist switching out - DO NOT MERGE" into ics-mr1
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 262d270..3bcda9a 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -133,6 +133,7 @@ void GLWebViewState::setBaseLayer(BaseLayerAndroid* layer, const SkRegion& inval m_zoomManager.swapPages(); // reset zoom state 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)); @@ -377,6 +378,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; |