summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform
diff options
context:
space:
mode:
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()) {