diff options
author | Chris Craik <ccraik@google.com> | 2012-05-31 14:07:11 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2012-05-31 14:13:24 -0700 |
commit | effdd108fdcbfad1612f8be305ea716bdd7d927e (patch) | |
tree | df982f9c7eee879bc7b33e29a59d3f5aec9698f0 /Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp | |
parent | 150a26fa5442a5fc931e5df05808e33aac1a7dea (diff) | |
download | external_webkit-effdd108fdcbfad1612f8be305ea716bdd7d927e.zip external_webkit-effdd108fdcbfad1612f8be305ea716bdd7d927e.tar.gz external_webkit-effdd108fdcbfad1612f8be305ea716bdd7d927e.tar.bz2 |
Don't allow merging within an animated layer
Also isolates layer translation fudging so as to not affect child transforms.
bug:6585341
Change-Id: If416c6fad90ee37fbe3438e01706b34e683165b7
Diffstat (limited to 'Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp index 293bbbc..0f01fe2 100644 --- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp @@ -122,6 +122,7 @@ LayerAndroid::LayerAndroid(const LayerAndroid& layer) : Layer(layer), m_transform = layer.m_transform; m_drawTransform = layer.m_drawTransform; + m_drawTransformUnfudged = layer.m_drawTransformUnfudged; m_childrenTransform = layer.m_childrenTransform; m_dirtyRegion = layer.m_dirtyRegion; @@ -407,6 +408,7 @@ void LayerAndroid::updateLocalTransformAndClip(const TransformationMatrix& paren -originY, -anchorPointZ()); + m_drawTransformUnfudged = m_drawTransform; if (m_drawTransform.isIdentityOrTranslation() && surface() && surface()->allowTransformFudging()) { // adjust the translation coordinates of the draw transform matrix so @@ -455,9 +457,8 @@ void LayerAndroid::updateGLPositionsAndScale(const TransformationMatrix& parentM setDrawOpacity(opacity); // constantly recalculate the draw transform of layers that may require it (and their children) - forceCalculation |= isPositionFixed() - || contentIsScrollable() - || (m_animations.size() != 0); + forceCalculation |= hasDynamicTransform(); + forceCalculation &= !(disableFixedElemUpdate && isPositionFixed()); if (forceCalculation) updateLocalTransformAndClip(parentMatrix, clipping); @@ -465,7 +466,7 @@ void LayerAndroid::updateGLPositionsAndScale(const TransformationMatrix& parentM if (!countChildren() || !m_visible) return; - TransformationMatrix localMatrix = m_drawTransform; + TransformationMatrix localMatrix = m_drawTransformUnfudged; // Flatten to 2D if the layer doesn't preserve 3D. if (!preserves3D()) { @@ -682,7 +683,7 @@ void LayerAndroid::assignSurfaces(LayerMergeState* mergeState) mergeState->currentSurface->addLayer(this, m_drawTransform); m_surface = mergeState->currentSurface; - if (contentIsScrollable() || isPositionFixed()) { + if (hasDynamicTransform()) { // disable layer merging within the children of these layer types mergeState->nonMergeNestedLevel++; } @@ -704,7 +705,7 @@ void LayerAndroid::assignSurfaces(LayerMergeState* mergeState) mergeState->depth--; } - if (contentIsScrollable() || isPositionFixed()) { + if (hasDynamicTransform()) { // re-enable joining mergeState->nonMergeNestedLevel--; |