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

Commit 2369a6d7 authored by Chris Craik's avatar Chris Craik Committed by android-build-merger
Browse files

Support shadows and reordering in ViewOverlay

am: 36d9a6df

Change-Id: I1e7c33d68b5e2350b8b0ac589c46fdc250424b1a
parents e688b70e 36d9a6df
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -238,7 +238,19 @@ public class ViewOverlay {

        @Override
        protected void dispatchDraw(Canvas canvas) {
            /*
             * The OverlayViewGroup doesn't draw with a DisplayList, because
             * draw(Canvas, View, long) is never called on it. This is fine, since it doesn't need
             * RenderNode/DisplayList features, and can just draw into the owner's Canvas.
             *
             * This means that we need to insert reorder barriers manually though, so that children
             * of the OverlayViewGroup can cast shadows and Z reorder with each other.
             */
            canvas.insertReorderBarrier();

            super.dispatchDraw(canvas);

            canvas.insertInorderBarrier();
            final int numDrawables = (mDrawables == null) ? 0 : mDrawables.size();
            for (int i = 0; i < numDrawables; ++i) {
                mDrawables.get(i).draw(canvas);