Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89b7f2e3 authored by Chet Haase's avatar Chet Haase
Browse files

Fix Animation bugs from DisplayList properties integration

The new DisplayList properties functionality does not currently handle Animation
(android.view.animation) functionality, so we fall back to the previous approach
of redrawing the DisplayList when an Animation changes alpha/transform data for
a View. The DL code was not, however, correctly using that logic, so that
the Animation transform information was being ignored, or at least not set
correctly on the DisplayList during redraws.

This fix accounts for Animation changes and sets up the DisplayList correctly.

Change-Id: I9f6e0382b05d0627f4779f30e74641dedcc77f82
parent fae7ab3a
Loading
Loading
Loading
Loading
+8 −12
Original line number Diff line number Diff line
@@ -11481,7 +11481,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
                layerType != LAYER_TYPE_HARDWARE;
        int restoreTo = -1;
        if (!useDisplayListProperties) {
        if (!useDisplayListProperties || transformToApply != null) {
            restoreTo = canvas.save();
        }
        if (offsetForScroll) {
@@ -11515,11 +11515,9 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
                    if (concatMatrix) {
                        // Undo the scroll translation, apply the transformation matrix,
                        // then redo the scroll translate to get the correct result.
                        if (!useDisplayListProperties) {
                        canvas.translate(-transX, -transY);
                        canvas.concat(transformToApply.getMatrix());
                        canvas.translate(transX, transY);
                        }
                        parent.mGroupFlags |= ViewGroup.FLAG_CLEAR_TRANSFORMATION;
                    }
@@ -11548,13 +11546,11 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
                            layerFlags |= Canvas.CLIP_TO_LAYER_SAVE_FLAG;
                        }
                        if (layerType == LAYER_TYPE_NONE) {
                            if (!useDisplayListProperties) {
                            final int scrollX = hasDisplayList ? 0 : sx;
                            final int scrollY = hasDisplayList ? 0 : sy;
                            canvas.saveLayerAlpha(scrollX, scrollY, scrollX + mRight - mLeft,
                                    scrollY + mBottom - mTop, multipliedAlpha, layerFlags);
                        }
                        }
                    } else {
                        // Alpha is handled by the child directly, clobber the layer's alpha
                        mPrivateFlags |= ALPHA_SET;