Loading core/java/android/view/SurfaceView.java +5 −7 Original line number Diff line number Diff line Loading @@ -692,7 +692,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb try { redrawNeeded |= visible && !mDrawFinished; SurfaceHolder.Callback callbacks[] = null; SurfaceHolder.Callback[] callbacks = null; final boolean surfaceChanged = creating; if (mSurfaceCreated && (surfaceChanged || (!visible && visibleChanged))) { Loading Loading @@ -819,7 +819,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb if (!isHardwareAccelerated() || !mRtHandlingPositionUpdates) { try { if (DEBUG) Log.d(TAG, String.format("%d updateSurfacePosition UI, " + "postion = [%d, %d, %d, %d]", System.identityHashCode(this), "position = [%d, %d, %d, %d]", System.identityHashCode(this), mScreenRect.left, mScreenRect.top, mScreenRect.right, mScreenRect.bottom)); setParentSpaceRectangle(mScreenRect, -1); Loading @@ -842,9 +842,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb mDeferredDestroySurfaceControl = null; } runOnUiThread(() -> { performDrawFinished(); }); runOnUiThread(this::performDrawFinished); } /** Loading Loading @@ -918,7 +916,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb if (DEBUG) { Log.d(TAG, String.format( "%d updateSurfacePosition RenderWorker, frameNr = %d, " + "postion = [%d, %d, %d, %d]", + "position = [%d, %d, %d, %d]", System.identityHashCode(this), frameNumber, left, top, right, bottom)); } Loading Loading @@ -954,7 +952,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb }; private SurfaceHolder.Callback[] getSurfaceCallbacks() { SurfaceHolder.Callback callbacks[]; SurfaceHolder.Callback[] callbacks; synchronized (mCallbacks) { callbacks = new SurfaceHolder.Callback[mCallbacks.size()]; mCallbacks.toArray(callbacks); Loading core/java/android/view/ViewTreeObserver.java +1 −1 Original line number Diff line number Diff line Loading @@ -1074,7 +1074,7 @@ public final class ViewTreeObserver { * be called manually if you are forcing the drawing on a View or a hierarchy of Views * that are not attached to a Window or in the GONE state. * * @return True if the current draw should be canceled and resceduled, false otherwise. * @return True if the current draw should be canceled and rescheduled, false otherwise. */ @SuppressWarnings("unchecked") public final boolean dispatchOnPreDraw() { Loading Loading
core/java/android/view/SurfaceView.java +5 −7 Original line number Diff line number Diff line Loading @@ -692,7 +692,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb try { redrawNeeded |= visible && !mDrawFinished; SurfaceHolder.Callback callbacks[] = null; SurfaceHolder.Callback[] callbacks = null; final boolean surfaceChanged = creating; if (mSurfaceCreated && (surfaceChanged || (!visible && visibleChanged))) { Loading Loading @@ -819,7 +819,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb if (!isHardwareAccelerated() || !mRtHandlingPositionUpdates) { try { if (DEBUG) Log.d(TAG, String.format("%d updateSurfacePosition UI, " + "postion = [%d, %d, %d, %d]", System.identityHashCode(this), "position = [%d, %d, %d, %d]", System.identityHashCode(this), mScreenRect.left, mScreenRect.top, mScreenRect.right, mScreenRect.bottom)); setParentSpaceRectangle(mScreenRect, -1); Loading @@ -842,9 +842,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb mDeferredDestroySurfaceControl = null; } runOnUiThread(() -> { performDrawFinished(); }); runOnUiThread(this::performDrawFinished); } /** Loading Loading @@ -918,7 +916,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb if (DEBUG) { Log.d(TAG, String.format( "%d updateSurfacePosition RenderWorker, frameNr = %d, " + "postion = [%d, %d, %d, %d]", + "position = [%d, %d, %d, %d]", System.identityHashCode(this), frameNumber, left, top, right, bottom)); } Loading Loading @@ -954,7 +952,7 @@ public class SurfaceView extends View implements ViewRootImpl.WindowStoppedCallb }; private SurfaceHolder.Callback[] getSurfaceCallbacks() { SurfaceHolder.Callback callbacks[]; SurfaceHolder.Callback[] callbacks; synchronized (mCallbacks) { callbacks = new SurfaceHolder.Callback[mCallbacks.size()]; mCallbacks.toArray(callbacks); Loading
core/java/android/view/ViewTreeObserver.java +1 −1 Original line number Diff line number Diff line Loading @@ -1074,7 +1074,7 @@ public final class ViewTreeObserver { * be called manually if you are forcing the drawing on a View or a hierarchy of Views * that are not attached to a Window or in the GONE state. * * @return True if the current draw should be canceled and resceduled, false otherwise. * @return True if the current draw should be canceled and rescheduled, false otherwise. */ @SuppressWarnings("unchecked") public final boolean dispatchOnPreDraw() { Loading