summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-05-07 11:33:50 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-07 11:33:50 -0700
commit17a3b1ef1e8d47f9e6330193bda64609772b8626 (patch)
treebf57b982b6077919738346967bfe9168d7c011c2 /Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
parent353e1be7cac5375c6698b13bc0d786b385aff9ad (diff)
parente5c9306b222e597f907697ab28a7936bfc61e487 (diff)
downloadexternal_webkit-17a3b1ef1e8d47f9e6330193bda64609772b8626.zip
external_webkit-17a3b1ef1e8d47f9e6330193bda64609772b8626.tar.gz
external_webkit-17a3b1ef1e8d47f9e6330193bda64609772b8626.tar.bz2
Merge "Disable prerenders while scrolling" into jb-dev
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
index ef91f04..4badf8b 100644
--- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
@@ -83,21 +83,17 @@ SurfaceCollection::~SurfaceCollection()
#endif
}
-void SurfaceCollection::prepareGL(const SkRect& visibleContentRect)
+void SurfaceCollection::prepareGL(const SkRect& visibleContentRect, bool tryToFastBlit)
{
updateLayerPositions(visibleContentRect);
bool layerTilesDisabled = m_compositedRoot->state()->layersRenderingMode()
> GLWebViewState::kClippedTextures;
- bool updateWithBlit = true;
if (!layerTilesDisabled) {
- for (unsigned int i = 0; i < m_surfaces.size(); i++) {
- updateWithBlit &= m_surfaces[i]->canUpdateWithBlit();
- if (!updateWithBlit)
- break;
- }
+ for (unsigned int i = 0; tryToFastBlit && i < m_surfaces.size(); i++)
+ tryToFastBlit &= m_surfaces[i]->canUpdateWithBlit();
}
for (unsigned int i = 0; i < m_surfaces.size(); i++)
- m_surfaces[i]->prepareGL(layerTilesDisabled, updateWithBlit);
+ m_surfaces[i]->prepareGL(layerTilesDisabled, tryToFastBlit);
}
static inline bool compareSurfaceZ(const Surface* a, const Surface* b)