summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
index 1c769bf..b675f7d 100644
--- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
+++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollection.cpp
@@ -95,15 +95,6 @@ void SurfaceCollection::prepareGL(const SkRect& visibleContentRect, bool tryToFa
m_surfaces[i]->prepareGL(layerTilesDisabled, tryToFastBlit);
}
-static inline bool compareSurfaceZ(const Surface* a, const Surface* b)
-{
- const LayerAndroid* la = a->getFirstLayer();
- const LayerAndroid* lb = b->getFirstLayer();
-
- // swap drawing order if zValue suggests it AND the layers are in the same stacking context
- return (la->zValue() > lb->zValue()) && (la->getParent() == lb->getParent());
-}
-
bool SurfaceCollection::drawGL(const SkRect& visibleContentRect)
{
TRACE_METHOD();
@@ -111,21 +102,10 @@ bool SurfaceCollection::drawGL(const SkRect& visibleContentRect)
ClassTracker::instance()->show();
#endif
- bool needsRedraw = false;
updateLayerPositions(visibleContentRect);
bool layerTilesDisabled = m_compositedRoot->state()->isSingleSurfaceRenderingMode();
- // create a duplicate vector of surfaces, sorted by z value
- Vector <Surface*> surfaces;
- for (unsigned int i = 0; i < m_surfaces.size(); i++)
- surfaces.append(m_surfaces[i]);
- std::stable_sort(surfaces.begin()+1, surfaces.end(), compareSurfaceZ);
-
- // draw the sorted vector
- for (unsigned int i = 0; i < m_surfaces.size(); i++)
- needsRedraw |= surfaces[i]->drawGL(layerTilesDisabled);
-
- return needsRedraw;
+ return m_compositedRoot->drawTreeSurfacesGL();
}
Color SurfaceCollection::getBackgroundColor()