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

Commit e080af37 authored by Romain Guy's avatar Romain Guy
Browse files

Save/restore display lists' canvas properly

Change-Id: Ic016f0215f9fe5c67af98f059ecce4ed94994810
parent 9f443fb6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -9995,6 +9995,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            }
            final HardwareCanvas canvas = mDisplayList.start();
            int restoreCount = 0;
            try {
                int width = mRight - mLeft;
                int height = mBottom - mTop;
@@ -10004,6 +10005,8 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
                canvas.onPreDraw(null);
                computeScroll();
                restoreCount = canvas.save();
                canvas.translate(-mScrollX, -mScrollY);
                mPrivateFlags |= DRAWN | DRAWING_CACHE_VALID;
                mPrivateFlags &= ~DIRTY_MASK;
@@ -10015,6 +10018,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
                    draw(canvas);
                }
            } finally {
                canvas.restoreToCount(restoreCount);
                canvas.onPostDraw();
                mDisplayList.end();