diff options
author | Chris Craik <ccraik@google.com> | 2012-05-31 15:22:14 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-05-31 15:22:14 -0700 |
commit | 9af7514f84d41c3aa4add011ef0ffe5af04e7143 (patch) | |
tree | df982f9c7eee879bc7b33e29a59d3f5aec9698f0 | |
parent | b10052827bf3e6263912013b2daaf928a63508e8 (diff) | |
parent | effdd108fdcbfad1612f8be305ea716bdd7d927e (diff) | |
download | external_webkit-9af7514f84d41c3aa4add011ef0ffe5af04e7143.zip external_webkit-9af7514f84d41c3aa4add011ef0ffe5af04e7143.tar.gz external_webkit-9af7514f84d41c3aa4add011ef0ffe5af04e7143.tar.bz2 |
am effdd108: Don\'t allow merging within an animated layer
* commit 'effdd108fdcbfad1612f8be305ea716bdd7d927e':
Don't allow merging within an animated layer
-rw-r--r-- | Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp | 13 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/android/layers/LayerAndroid.h | 6 |
2 files changed, 12 insertions, 7 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--; diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h index c56d50a..f821d89 100644 --- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h +++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.h @@ -166,7 +166,7 @@ public: void setPreserves3D(bool value) { m_preserves3D = value; } void setAnchorPointZ(float z) { m_anchorPointZ = z; } float anchorPointZ() { return m_anchorPointZ; } - void setDrawTransform(const TransformationMatrix& transform) { m_drawTransform = transform; } + void setDrawTransform(const TransformationMatrix& transform) { m_drawTransform = m_drawTransformUnfudged = transform; } virtual const TransformationMatrix* drawTransform() const { return &m_drawTransform; } void setChildrenTransform(const TransformationMatrix& t) { m_childrenTransform = t; } void setDrawClip(const FloatRect& rect) { m_clippingRect = rect; } @@ -300,11 +300,15 @@ protected: virtual void onDraw(SkCanvas*, SkScalar opacity, android::DrawExtra* extra, PaintStyle style); virtual InvalidateFlags onSetHwAccelerated(bool hwAccelerated) { return InvalidateNone; } TransformationMatrix m_drawTransform; + TransformationMatrix m_drawTransformUnfudged; int m_uniqueId; private: void updateLocalTransformAndClip(const TransformationMatrix& parentMatrix, const FloatRect& clip); + bool hasDynamicTransform() { + return contentIsScrollable() || isPositionFixed() || (m_animations.size() != 0); + } #if DUMP_NAV_CACHE friend class CachedLayer::Debug; // debugging access only |