diff options
author | Chris Craik <ccraik@google.com> | 2012-06-15 11:36:20 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2012-06-15 11:38:24 -0700 |
commit | e83f95748e8eb4e2f2c2cb893cb9517898d1bf95 (patch) | |
tree | eeb3754324501de6c22563367eae11f981cd0102 /Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp | |
parent | b97b5896776bdd4f345a90f0c950e47c6c795e7b (diff) | |
download | external_webkit-e83f95748e8eb4e2f2c2cb893cb9517898d1bf95.zip external_webkit-e83f95748e8eb4e2f2c2cb893cb9517898d1bf95.tar.gz external_webkit-e83f95748e8eb4e2f2c2cb893cb9517898d1bf95.tar.bz2 |
When swapping, immediately start processing new work
Because no new work is enqueued after a SurfaceCollectionManager::swap(), there
can be significant TexturesGenerator idle period before the next prepare of the
new painting tree. This change removes that delay by preparing the new tree
immediately.
Change-Id: I061983abe7210f75d5e4f44d5dca79a0a47d329f
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp index 520a557..1270498 100644 --- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp @@ -246,12 +246,12 @@ int SurfaceCollectionManager::drawGL(double currentTime, IntRect& viewRect, int returnFlags = 0; bool didCollectionSwap = false; + bool tryFastBlit = !m_fastSwapMode; if (m_paintingCollection) { ALOGV("preparing painting collection %p", m_paintingCollection); m_paintingCollection->evaluateAnimations(currentTime); - bool tryFastBlit = !m_fastSwapMode; m_paintingCollection->prepareGL(visibleContentRect, tryFastBlit); m_paintingCollection->computeTexturesAmount(texturesResultPtr); @@ -282,6 +282,9 @@ int SurfaceCollectionManager::drawGL(double currentTime, IntRect& viewRect, && m_drawingCollection->isReady())) { // either a swap just occurred, or there is no more work to be done: do a full draw m_drawingCollection->swapTiles(); + + if (didCollectionSwap && m_paintingCollection) + m_paintingCollection->prepareGL(visibleContentRect, tryFastBlit); returnFlags |= DrawGlInfo::kStatusDraw; } else { // current collection not ready - invoke functor in process mode @@ -307,6 +310,9 @@ int SurfaceCollectionManager::drawGL(double currentTime, IntRect& viewRect, if (didCollectionSwap || m_fastSwapMode || (drawingReady && !m_paintingCollection)) m_drawingCollection->swapTiles(); + if (didCollectionSwap && m_paintingCollection) + m_paintingCollection->prepareGL(visibleContentRect, tryFastBlit); + if (drawingReady) { // exit fast swap mode, as content is up to date m_fastSwapMode = false; |