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/GLWebViewState.cpp6
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp10
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp11
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp2
4 files changed, 19 insertions, 10 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
index 99eb1c6..1b0513b 100644
--- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -132,10 +132,10 @@ void GLWebViewState::setViewport(const SkRect& viewport, float scale)
int viewMaxTileX = static_cast<int>(ceilf((viewport.width()-1) * invTileContentWidth)) + 1;
int viewMaxTileY = static_cast<int>(ceilf((viewport.height()-1) * invTileContentHeight)) + 1;
- TilesManager* manager = TilesManager::instance();
- int maxTextureCount = viewMaxTileX * viewMaxTileY * (manager->highEndGfx() ? 4 : 2);
+ TilesManager* tilesManager = TilesManager::instance();
+ int maxTextureCount = viewMaxTileX * viewMaxTileY * (tilesManager->highEndGfx() ? 4 : 2);
- manager->setMaxTextureCount(maxTextureCount);
+ tilesManager->setMaxTextureCount(maxTextureCount);
// TODO: investigate whether we can move this return earlier.
if ((m_viewport == viewport)
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp
index 8fb4d4b..91335c7 100644
--- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp
@@ -205,9 +205,17 @@ int SurfaceCollectionManager::drawGL(double currentTime, IntRect& viewRect,
returnFlags |= uirenderer::DrawGlInfo::kStatusInvoke;
if (!shouldDraw) {
- if (didCollectionSwap) {
+ if (didCollectionSwap
+ || (!m_paintingCollection
+ && m_drawingCollection
+ && m_drawingCollection->isReady())) {
+ // either a swap just occurred, or there is no more work to be done: do a full draw
m_drawingCollection->swapTiles();
returnFlags |= uirenderer::DrawGlInfo::kStatusDraw;
+ } else {
+ // current collection not ready - invoke functor in process mode
+ // until either drawing or painting collection is ready
+ returnFlags |= uirenderer::DrawGlInfo::kStatusInvoke;
}
return returnFlags;
diff --git a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
index 5ce63bf..63f73aa 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/TileGrid.cpp
@@ -153,8 +153,9 @@ void TileGrid::prepareGL(GLWebViewState* state, float scale,
bool goingDown = m_prevTileY < m_area.y();
m_prevTileY = m_area.y();
+ TilesManager* tilesManager = TilesManager::instance();
if (scale != m_scale)
- TilesManager::instance()->removeOperationsForFilter(new ScaleFilter(painter, m_scale));
+ tilesManager->removeOperationsForFilter(new ScaleFilter(painter, m_scale));
m_scale = scale;
@@ -164,11 +165,11 @@ void TileGrid::prepareGL(GLWebViewState* state, float scale,
m_tiles[i]->markAsDirty(m_dirtyRegion);
// log inval region for the base surface
- if (m_isBaseSurface && TilesManager::instance()->getProfiler()->enabled()) {
+ if (m_isBaseSurface && tilesManager->getProfiler()->enabled()) {
SkRegion::Iterator iterator(m_dirtyRegion);
while (!iterator.done()) {
SkIRect r = iterator.rect();
- TilesManager::instance()->getProfiler()->nextInval(r, scale);
+ tilesManager->getProfiler()->nextInval(r, scale);
iterator.next();
}
}
@@ -193,8 +194,8 @@ void TileGrid::prepareGL(GLWebViewState* state, float scale,
IntRect fullArea = computeTilesArea(unclippedArea, scale);
IntRect expandedArea = m_area;
- // on systems reporting highEndGfx=true, use expanded high res bounds
- if (TilesManager::instance()->highEndGfx())
+ // on systems reporting highEndGfx=true and useMinimalMemory not set, use expanded bounds
+ if (tilesManager->highEndGfx() && !tilesManager->useMinimalMemory())
expandedArea.inflate(EXPANDED_BOUNDS_INFLATE);
if (isLowResPrefetch)
diff --git a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp
index ec0d9e7..af19f30 100644
--- a/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/TransferQueue.cpp
@@ -102,7 +102,7 @@ void TransferQueue::initGLResources(int width, int height)
m_sharedSurfaceTexture =
#if GPU_UPLOAD_WITHOUT_DRAW
new android::SurfaceTexture(m_sharedSurfaceTextureId, true,
- GL_TEXTURE_2D, false, bufferQueue);
+ GL_TEXTURE_2D, true, bufferQueue);
#else
new android::SurfaceTexture(m_sharedSurfaceTextureId, true,
GL_TEXTURE_EXTERNAL_OES, true,