summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/TiledPage.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2011-03-07 11:14:44 -0800
committerNicolas Roard <nicolasroard@google.com>2011-03-08 18:55:55 -0800
commit67e4aa15702646d5ff50e9524f4e63eb9ed20122 (patch)
tree054c51b8413613ea13248dad4fae47f1bd4f2426 /WebCore/platform/graphics/android/TiledPage.cpp
parentdeb796f509e2ad13b4ef4c01b1a1e707b4e762ee (diff)
downloadexternal_webkit-67e4aa15702646d5ff50e9524f4e63eb9ed20122.zip
external_webkit-67e4aa15702646d5ff50e9524f4e63eb9ed20122.tar.gz
external_webkit-67e4aa15702646d5ff50e9524f4e63eb9ed20122.tar.bz2
Partial invalidation of the browser textures
bug:3461349 bug:3464483 Change-Id: I627f06d0fe48aaa0adca65cd13dc738af87eeefc
Diffstat (limited to 'WebCore/platform/graphics/android/TiledPage.cpp')
-rw-r--r--WebCore/platform/graphics/android/TiledPage.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/WebCore/platform/graphics/android/TiledPage.cpp b/WebCore/platform/graphics/android/TiledPage.cpp
index 36988dd..a400a4a 100644
--- a/WebCore/platform/graphics/android/TiledPage.cpp
+++ b/WebCore/platform/graphics/android/TiledPage.cpp
@@ -129,6 +129,7 @@ void TiledPage::invalidateRect(const IntRect& inval, const unsigned int pictureC
// We defer marking the tile as dirty until the next time we need to prepare
// to draw.
m_invalRegion.op(firstDirtyTileX, firstDirtyTileY, lastDirtyTileX, lastDirtyTileY, SkRegion::kUnion_Op);
+ m_invalTilesRegion.op(inval.x(), inval.y(), inval.right(), inval.bottom(), SkRegion::kUnion_Op);
m_latestPictureInval = pictureCount;
}
@@ -183,11 +184,12 @@ void TiledPage::updateTileState(const SkIRect& tileBounds)
{
if (!m_glWebViewState || tileBounds.isEmpty()) {
m_invalRegion.setEmpty();
+ m_invalTilesRegion.setEmpty();
return;
}
- const int nbTilesWidth = tileBounds.width();
- const int nbTilesHeight = tileBounds.height();
+ const int nbTilesWidth = tileBounds.width() - 1;
+ const int nbTilesHeight = tileBounds.height() - 1;
const int lastTileX = tileBounds.fRight - 1;
const int lastTileY = tileBounds.fBottom - 1;
@@ -196,14 +198,14 @@ void TiledPage::updateTileState(const SkIRect& tileBounds)
BaseTile& tile = m_baseTiles[x];
+ // if the tile is in the dirty region then we must invalidate it
+ if (m_invalRegion.contains(tile.x(), tile.y()))
+ tile.markAsDirty(m_latestPictureInval, m_invalTilesRegion);
+
// if the tile no longer has a texture then proceed to the next tile
if (tile.isAvailable())
continue;
- // if the tile is in the dirty region then we must invalidate it
- if (m_invalRegion.contains(tile.x(), tile.y()))
- tile.markAsDirty(m_latestPictureInval);
-
// set the used level of the tile (e.g. distance from the viewport)
int dx = 0;
int dy = 0;
@@ -226,6 +228,7 @@ void TiledPage::updateTileState(const SkIRect& tileBounds)
// clear the invalidated region as all tiles within that region have now
// been marked as dirty.
m_invalRegion.setEmpty();
+ m_invalTilesRegion.setEmpty();
}
void TiledPage::prepare(bool goingDown, bool goingLeft, const SkIRect& tileBounds)