summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/GLWebViewState.cpp
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2010-11-05 12:07:58 -0400
committerDerek Sollenberger <djsollen@google.com>2010-11-05 12:36:23 -0400
commita1e806ed3b2d9e2727d08cc2a3958fce501f6f33 (patch)
tree080f1f338514bb7ee83fd8b41007b0f2d7cc689c /WebCore/platform/graphics/android/GLWebViewState.cpp
parent1e6843296fbdb863eaaaa99df71c7b333e7b7803 (diff)
downloadexternal_webkit-a1e806ed3b2d9e2727d08cc2a3958fce501f6f33.zip
external_webkit-a1e806ed3b2d9e2727d08cc2a3958fce501f6f33.tar.gz
external_webkit-a1e806ed3b2d9e2727d08cc2a3958fce501f6f33.tar.bz2
Support partial invalidation of tiles based on webkit's inval rect.
This CL reverts the rollback of the original CL now that we have fixed bug #3165953. This reverts commit 144ccd9c8dba05ffaa0ae598f9b70032050fc20e. Change-Id: Ibb5254f652ed95aa3b7b71bf24a2578c51e74a70
Diffstat (limited to 'WebCore/platform/graphics/android/GLWebViewState.cpp')
-rw-r--r--WebCore/platform/graphics/android/GLWebViewState.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/WebCore/platform/graphics/android/GLWebViewState.cpp b/WebCore/platform/graphics/android/GLWebViewState.cpp
index e1e517c..4ad22d8 100644
--- a/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -81,7 +81,6 @@ GLWebViewState::GLWebViewState()
, m_extra(0)
, m_navLayer(0)
{
- m_invalidatedRect.setEmpty();
m_tiledPageA = new TiledPage(FIRST_TILED_PAGE_ID, this);
m_tiledPageB = new TiledPage(SECOND_TILED_PAGE_ID, this);
#ifdef DEBUG_COUNT
@@ -108,8 +107,13 @@ void GLWebViewState::setBaseLayer(BaseLayerAndroid* layer, IntRect& rect)
m_navLayer = 0;
if (m_baseLayer) {
m_baseLayer->setGLWebViewState(this);
- m_invalidatedRect.set(rect);
m_currentPictureCounter++;
+
+ if (!rect.isEmpty()) {
+ // find which tiles fall within the invalRect and mark them as dirty
+ m_tiledPageA->invalidateRect(rect, m_currentPictureCounter);
+ m_tiledPageB->invalidateRect(rect, m_currentPictureCounter);
+ }
}
}
@@ -132,7 +136,7 @@ void GLWebViewState::resetExtra(bool repaint)
m_navLayer = 0;
}
-void GLWebViewState::paintBaseLayerContent(SkCanvas* canvas)
+unsigned int GLWebViewState::paintBaseLayerContent(SkCanvas* canvas)
{
android::Mutex::Autolock lock(m_baseLayerLock);
if (m_baseLayer) {
@@ -140,6 +144,7 @@ void GLWebViewState::paintBaseLayerContent(SkCanvas* canvas)
if (m_extra && m_navLayer)
m_extra->draw(canvas, m_navLayer);
}
+ return m_currentPictureCounter;
}
void GLWebViewState::scheduleUpdate(const double& currentTime, float scale)