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

Commit a62b09a1 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

fix [2615973] ViewRoot locks the Surface even when the dirty region is empty

Change-Id: I3041a57441bd9ee97f2cbc03ce42643175023c78
parent a8624186
Loading
Loading
Loading
Loading
+86 −84
Original line number Diff line number Diff line
@@ -1332,6 +1332,7 @@ public final class ViewRoot extends Handler implements ViewParent,
                    appScale + ", width=" + mWidth + ", height=" + mHeight);
        }

        if (!dirty.isEmpty() || mIsAnimating) {
            Canvas canvas;
            try {
                int left = dirty.left;
@@ -1430,6 +1431,7 @@ public final class ViewRoot extends Handler implements ViewParent,
            } finally {
                surface.unlockCanvasAndPost(canvas);
            }
        }

        if (LOCAL_LOGV) {
            Log.v("ViewRoot", "Surface " + surface + " unlockCanvasAndPost");