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

Commit 5a372071 authored by Robert Carr's avatar Robert Carr
Browse files

SurfaceView Cleanup (2/n): Cleanup visible = mVisible

Since visible=mVisible we don't really need this visible variable
we clean it up to avoid confusion.

Test: Existing tests pass
Change-Id: I7ae7b27f71744c90004f77467f6fd5e79d2f557c
parent f45cfa23
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1083,7 +1083,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
                    + " top=" + (mWindowSpaceTop != mLocation[1]));

            try {
                final boolean visible = mVisible = mRequestedVisible;
                mVisible = mRequestedVisible;
                mWindowSpaceLeft = mLocation[0];
                mWindowSpaceTop = mLocation[1];
                mSurfaceWidth = myWidth;
@@ -1115,20 +1115,20 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
                final boolean realSizeChanged = performSurfaceTransaction(viewRoot,
                    translator, creating, sizeChanged, needBLASTSync);
                final boolean redrawNeeded = sizeChanged || creating ||
                    (visible && !mDrawFinished);
                    (mVisible && !mDrawFinished);

                try {
                    SurfaceHolder.Callback[] callbacks = null;

                    final boolean surfaceChanged = creating;
                    if (mSurfaceCreated && (surfaceChanged || (!visible && visibleChanged))) {
                    if (mSurfaceCreated && (surfaceChanged || (!mVisible && visibleChanged))) {
                        mSurfaceCreated = false;
                        notifySurfaceDestroyed();
                    }

                    copySurface(creating /* surfaceControlCreated */, sizeChanged);

                    if (visible && mSurface.isValid()) {
                    if (mVisible && mSurface.isValid()) {
                        if (!mSurfaceCreated && (surfaceChanged || visibleChanged)) {
                            mSurfaceCreated = true;
                            mIsCreating = true;