From 3c2218dce93737af90cf230db56fed0e0d1a93fc Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Tue, 3 May 2011 16:44:01 -0700 Subject: Fix z-sorting bug:3456526 Change-Id: Idfde406fec0d7afba91506eba806cd0b56cde784 --- WebCore/platform/graphics/android/LayerAndroid.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'WebCore/platform/graphics/android/LayerAndroid.cpp') diff --git a/WebCore/platform/graphics/android/LayerAndroid.cpp b/WebCore/platform/graphics/android/LayerAndroid.cpp index e616041..6e4b10a 100644 --- a/WebCore/platform/graphics/android/LayerAndroid.cpp +++ b/WebCore/platform/graphics/android/LayerAndroid.cpp @@ -604,6 +604,8 @@ void LayerAndroid::updateGLPositions(const TransformationMatrix& parentMatrix, -anchorPointZ()); setDrawTransform(localMatrix); + m_zValue = TilesManager::instance()->shader()->zValue(drawTransform(), getSize().width(), getSize().height()); + opacity *= getOpacity(); setDrawOpacity(opacity); @@ -925,10 +927,7 @@ bool LayerAndroid::needsScheduleRepaint(LayerTexture* texture) static inline bool compareLayerZ(const LayerAndroid* a, const LayerAndroid* b) { - const TransformationMatrix& transformA = a->drawTransform(); - const TransformationMatrix& transformB = b->drawTransform(); - - return transformA.m43() < transformB.m43(); + return a->zValue() > b->zValue(); } bool LayerAndroid::drawGL(GLWebViewState* glWebViewState, SkMatrix& matrix) -- cgit v1.1