summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-04-09 14:39:00 -0700
committerChris Craik <ccraik@google.com>2012-04-09 15:43:19 -0700
commit77a63f12c44ce6ef9e69cb9a2e104fc625d96cac (patch)
tree539ccffcd559fb318abf241d395727ea22672dee /Source/WebCore/platform/graphics
parent98e8504d9f510b8cbaca1b0144efea3a4d1a8eec (diff)
downloadexternal_webkit-77a63f12c44ce6ef9e69cb9a2e104fc625d96cac.zip
external_webkit-77a63f12c44ce6ef9e69cb9a2e104fc625d96cac.tar.gz
external_webkit-77a63f12c44ce6ef9e69cb9a2e104fc625d96cac.tar.bz2
Don't render expanded bounds if useMinimalMemory set
Extracted TilesManager instance locally, and standardized the extraction naming. Change-Id: Ia6ba1013bc6502f7c3a49d5dbf5d74739d997d2e
Diffstat (limited to 'Source/WebCore/platform/graphics')
-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)