summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/WebCore/platform/graphics/android/GLWebViewState.cpp6
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp11
2 files changed, 9 insertions, 8 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
index 99eb1c6..1b0513b 100644
--- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -132,10 +132,10 @@ void GLWebViewState::setViewport(const SkRect& viewport, float scale)
int viewMaxTileX = static_cast<int>(ceilf((viewport.width()-1) * invTileContentWidth)) + 1;
int viewMaxTileY = static_cast<int>(ceilf((viewport.height()-1) * invTileContentHeight)) + 1;
- TilesManager* manager = TilesManager::instance();
- int maxTextureCount = viewMaxTileX * viewMaxTileY * (manager->highEndGfx() ? 4 : 2);
+ TilesManager* tilesManager = TilesManager::instance();
+ int maxTextureCount = viewMaxTileX * viewMaxTileY * (tilesManager->highEndGfx() ? 4 : 2);
- manager->setMaxTextureCount(maxTextureCount);
+ tilesManager->setMaxTextureCount(maxTextureCount);
// TODO: investigate whether we can move this return earlier.
if ((m_viewport == viewport)
diff --git a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
index 5ce63bf..63f73aa 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
@@ -153,8 +153,9 @@ void TileGrid::prepareGL(GLWebViewState* state, float scale,
bool goingDown = m_prevTileY < m_area.y();
m_prevTileY = m_area.y();
+ TilesManager* tilesManager = TilesManager::instance();
if (scale != m_scale)
- TilesManager::instance()->removeOperationsForFilter(new ScaleFilter(painter, m_scale));
+ tilesManager->removeOperationsForFilter(new ScaleFilter(painter, m_scale));
m_scale = scale;
@@ -164,11 +165,11 @@ void TileGrid::prepareGL(GLWebViewState* state, float scale,
m_tiles[i]->markAsDirty(m_dirtyRegion);
// log inval region for the base surface
- if (m_isBaseSurface && TilesManager::instance()->getProfiler()->enabled()) {
+ if (m_isBaseSurface && tilesManager->getProfiler()->enabled()) {
SkRegion::Iterator iterator(m_dirtyRegion);
while (!iterator.done()) {
SkIRect r = iterator.rect();
- TilesManager::instance()->getProfiler()->nextInval(r, scale);
+ tilesManager->getProfiler()->nextInval(r, scale);
iterator.next();
}
}
@@ -193,8 +194,8 @@ void TileGrid::prepareGL(GLWebViewState* state, float scale,
IntRect fullArea = computeTilesArea(unclippedArea, scale);
IntRect expandedArea = m_area;
- // on systems reporting highEndGfx=true, use expanded high res bounds
- if (TilesManager::instance()->highEndGfx())
+ // on systems reporting highEndGfx=true and useMinimalMemory not set, use expanded bounds
+ if (tilesManager->highEndGfx() && !tilesManager->useMinimalMemory())
expandedArea.inflate(EXPANDED_BOUNDS_INFLATE);
if (isLowResPrefetch)