summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/LayerAndroid.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2011-05-03 16:44:01 -0700
committerNicolas Roard <nicolas@android.com>2011-05-03 17:13:25 -0700
commit3c2218dce93737af90cf230db56fed0e0d1a93fc (patch)
tree0c74022160a9c93ac0374fe2c3e1731d31c9a530 /WebCore/platform/graphics/android/LayerAndroid.cpp
parentcef717ff0869605896b43ea1c86b5c0fa96c2c81 (diff)
downloadexternal_webkit-3c2218dce93737af90cf230db56fed0e0d1a93fc.zip
external_webkit-3c2218dce93737af90cf230db56fed0e0d1a93fc.tar.gz
external_webkit-3c2218dce93737af90cf230db56fed0e0d1a93fc.tar.bz2
Fix z-sorting
bug:3456526 Change-Id: Idfde406fec0d7afba91506eba806cd0b56cde784
Diffstat (limited to 'WebCore/platform/graphics/android/LayerAndroid.cpp')
-rw-r--r--WebCore/platform/graphics/android/LayerAndroid.cpp7
1 files changed, 3 insertions, 4 deletions
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)