Merge "fix lost old callback when continuous call requestRenderAndNotify"
This commit is contained in:
@@ -1667,7 +1667,15 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
|
|||||||
mWantRenderNotification = true;
|
mWantRenderNotification = true;
|
||||||
mRequestRender = true;
|
mRequestRender = true;
|
||||||
mRenderComplete = false;
|
mRenderComplete = false;
|
||||||
mFinishDrawingRunnable = finishDrawing;
|
final Runnable oldCallback = mFinishDrawingRunnable;
|
||||||
|
mFinishDrawingRunnable = () -> {
|
||||||
|
if (oldCallback != null) {
|
||||||
|
oldCallback.run();
|
||||||
|
}
|
||||||
|
if (finishDrawing != null) {
|
||||||
|
finishDrawing.run();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
sGLThreadManager.notifyAll();
|
sGLThreadManager.notifyAll();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user