summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/rendering/Surface.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2012-05-17 17:32:25 -0700
committerNicolas Roard <nicolasroard@google.com>2012-05-17 18:01:19 -0700
commit377dc9f6b46a2ac0f968d9ee8d3c7916f3bf6904 (patch)
tree518fb21355b3530d6cdd18e3c6303348ee5501c0 /Source/WebCore/platform/graphics/android/rendering/Surface.cpp
parent37df6b06a8481e3608cff1718038d353a8733d6c (diff)
downloadexternal_webkit-377dc9f6b46a2ac0f968d9ee8d3c7916f3bf6904.zip
external_webkit-377dc9f6b46a2ac0f968d9ee8d3c7916f3bf6904.tar.gz
external_webkit-377dc9f6b46a2ac0f968d9ee8d3c7916f3bf6904.tar.bz2
Fix invalidations sent to framework
bug:6479200 bug:6323847 bug:4124445 Change-Id: I1a4058ba6c69d3e285b6274d99a6eafcbf1cdc6f
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/Surface.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/Surface.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp
index 7e4e918..20a9c2b 100644
--- a/Source/WebCore/platform/graphics/android/rendering/Surface.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/Surface.cpp
@@ -253,8 +253,12 @@ bool Surface::drawGL(bool layerTilesDisabled)
}
// draw member layers (draws image textures, glextras)
- for (unsigned int i = 0; i < m_layers.size(); i++)
- askRedraw |= m_layers[i]->drawGL(tilesDisabled);
+ for (unsigned int i = 0; i < m_layers.size(); i++) {
+ if (m_layers[i]->drawGL(tilesDisabled)) {
+ m_layers[i]->addDirtyArea();
+ askRedraw = true;
+ }
+ }
return askRedraw;
}
@@ -264,7 +268,16 @@ void Surface::swapTiles()
if (!m_surfaceBacking)
return;
- m_surfaceBacking->swapTiles();
+ if (m_surfaceBacking->swapTiles())
+ addFrameworkInvals();
+}
+
+void Surface::addFrameworkInvals()
+{
+ // Let's return an inval area to framework that will
+ // contain all of our layers' areas
+ for (unsigned int i = 0; i < m_layers.size(); i++)
+ m_layers[i]->addDirtyArea();
}
bool Surface::isReady()