diff options
author | Chris Craik <ccraik@google.com> | 2012-07-17 09:48:23 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-07-17 09:48:23 -0700 |
commit | df35691cd76b673c8a24babfab42d6bec4ee465b (patch) | |
tree | a8466827447f0fc86978af7a1fb3eacc9b554dfe /Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp | |
parent | 0453f79675ffe6fddb59add2dcee0e3f0e7e74b1 (diff) | |
download | external_webkit-df35691cd76b673c8a24babfab42d6bec4ee465b.zip external_webkit-df35691cd76b673c8a24babfab42d6bec4ee465b.tar.gz external_webkit-df35691cd76b673c8a24babfab42d6bec4ee465b.tar.bz2 |
Revert "Don't prepare in invoke mode unless needed"
bug:6829376
This reverts commit 0453f79675ffe6fddb59add2dcee0e3f0e7e74b1
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp index 09cb832..1270498 100644 --- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp @@ -49,7 +49,6 @@ SurfaceCollectionManager::SurfaceCollectionManager() , m_fastSwapMode(false) , m_previouslyScrolling(false) , m_newPaintingCollection(false) - , m_lastPreparedCollection(0) { } @@ -230,26 +229,6 @@ int SurfaceCollectionManager::singleSurfaceModeInvalidation(bool hasRunningAnima return returnFlags; } -void SurfaceCollectionManager::prepareGL(SurfaceCollection* collection, SkRect& visibleContentRect, - float scale, TexturesResult* texturesResultPtr, - bool shouldDraw, bool tryFastBlit) -{ - - // don't prepare if not drawing, and nothing changed - if (!shouldDraw - && collection == m_lastPreparedCollection - && visibleContentRect == m_lastPreparedRect - && std::abs(scale - m_lastPreparedScale) < 0.01) - return; - - collection->prepareGL(visibleContentRect, tryFastBlit); - collection->computeTexturesAmount(texturesResultPtr); - - m_lastPreparedCollection = collection; - m_lastPreparedRect = visibleContentRect; - m_lastPreparedScale = scale; -} - int SurfaceCollectionManager::drawGL(double currentTime, IntRect& viewRect, SkRect& visibleContentRect, float scale, bool scrolling, bool singleSurfaceMode, @@ -273,8 +252,9 @@ int SurfaceCollectionManager::drawGL(double currentTime, IntRect& viewRect, m_paintingCollection->evaluateAnimations(currentTime); - prepareGL(m_paintingCollection, visibleContentRect, scale, - texturesResultPtr, shouldDraw, tryFastBlit); + m_paintingCollection->prepareGL(visibleContentRect, tryFastBlit); + m_paintingCollection->computeTexturesAmount(texturesResultPtr); + if (!TilesManager::instance()->useDoubleBuffering() || m_paintingCollection->isReady()) { ALOGV("have painting collection %p ready, swapping!", m_paintingCollection); didCollectionSwap = true; @@ -288,8 +268,8 @@ int SurfaceCollectionManager::drawGL(double currentTime, IntRect& viewRect, } } else if (m_drawingCollection) { ALOGV("preparing drawing collection %p", m_drawingCollection); - prepareGL(m_drawingCollection, visibleContentRect, scale, - texturesResultPtr, shouldDraw, tryFastBlit); + m_drawingCollection->prepareGL(visibleContentRect); + m_drawingCollection->computeTexturesAmount(texturesResultPtr); } if (m_paintingCollection) |