summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-05-04 11:08:55 -0700
committerJohn Reck <jreck@google.com>2012-05-06 15:55:00 -0700
commite5c9306b222e597f907697ab28a7936bfc61e487 (patch)
treeea2a15d5a709640a9fc4386a055c2eef35a714c8 /Source/WebCore/platform
parente712b54e831d077c789984b8206f64d81dbceaa2 (diff)
downloadexternal_webkit-e5c9306b222e597f907697ab28a7936bfc61e487.zip
external_webkit-e5c9306b222e597f907697ab28a7936bfc61e487.tar.gz
external_webkit-e5c9306b222e597f907697ab28a7936bfc61e487.tar.bz2
Disable prerenders while scrolling
Bug: 6445656 Change-Id: I3d9e2cece4b3ec86deb00e98ae98f281525dab48
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp12
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h2
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp3
3 files changed, 7 insertions, 10 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
index 0bdbf38..7e7a503 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)
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h
index 5cfd943..18e50ee 100644
--- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h
+++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.h
@@ -48,7 +48,7 @@ public:
virtual ~SurfaceCollection();
// Tiled painting methods (executed on groups)
- void prepareGL(const SkRect& visibleContentRect);
+ void prepareGL(const SkRect& visibleContentRect, bool tryToFastBlit = false);
bool drawGL(const SkRect& visibleContentRect);
Color getBackgroundColor();
void swapTiles();
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp
index b26be03..7c42bd9 100644
--- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp
@@ -171,7 +171,8 @@ int SurfaceCollectionManager::drawGL(double currentTime, IntRect& viewRect,
m_paintingCollection->evaluateAnimations(currentTime);
- m_paintingCollection->prepareGL(visibleContentRect);
+ bool tryFastBlit = !m_fastSwapMode;
+ m_paintingCollection->prepareGL(visibleContentRect, tryFastBlit);
m_paintingCollection->computeTexturesAmount(texturesResultPtr);
if (!TilesManager::instance()->useDoubleBuffering() || m_paintingCollection->isReady()) {