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

Commit a8046acc authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Fix drawing translationZ to software canvas"

parents e7f2e101 e7c128f4
Loading
Loading
Loading
Loading
+16 −8
Original line number Diff line number Diff line
@@ -22356,6 +22356,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        }
    }
    /**
     * If an attached view draws to a HW canvas, it may use its RenderNode + DisplayList.
     *
     * If a view is dettached, its DisplayList shouldn't exist. If the canvas isn't
     * HW accelerated, it can't handle drawing RenderNodes.
     *
     * @hide
     */
    protected final boolean drawsWithRenderNode(Canvas canvas) {
        return mAttachInfo != null
                && mAttachInfo.mHardwareAccelerated
                && canvas.isHardwareAccelerated();
    }
    /**
     * This method is called by ViewGroup.drawChild() to have each child view draw itself.
     *
@@ -22365,14 +22379,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    boolean draw(Canvas canvas, ViewGroup parent, long drawingTime) {
        final boolean hardwareAcceleratedCanvas = canvas.isHardwareAccelerated();
        /* If an attached view draws to a HW canvas, it may use its RenderNode + DisplayList.
         *
         * If a view is dettached, its DisplayList shouldn't exist. If the canvas isn't
         * HW accelerated, it can't handle drawing RenderNodes.
         */
        boolean drawingWithRenderNode = mAttachInfo != null
                && mAttachInfo.mHardwareAccelerated
                && hardwareAcceleratedCanvas;
        boolean drawingWithRenderNode = drawsWithRenderNode(canvas);
        boolean more = false;
        final boolean childHasIdentityMatrix = hasIdentityMatrix();
+1 −1
Original line number Diff line number Diff line
@@ -4266,7 +4266,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        int transientIndex = transientCount != 0 ? 0 : -1;
        // Only use the preordered list if not HW accelerated, since the HW pipeline will do the
        // draw reordering internally
        final ArrayList<View> preorderedList = isHardwareAccelerated()
        final ArrayList<View> preorderedList = drawsWithRenderNode(canvas)
                ? null : buildOrderedChildList();
        final boolean customOrder = preorderedList == null
                && isChildrenDrawingOrderEnabled();