Procházet zdrojové kódy

GLSurfaceView: report draw finished after first onDrawFrame in GLThread

At default, GLThread will not report draw finish after 1st
onDrawFrame. This will cause long black screen issue for game
whose 2nd onDrawFrame taking time, such as CandyCrash case
reported by customer.
This change ensure the draw finished to be reported after 1st
onDrawFrame.

CRs-Fixed: 2182359

Change-Id: I8b817bdb5d6dcaec9835b45c6efe8e6892c716fe
Signed-off-by: Adesh15 <adesikha15@gmail.com>
Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
Signed-off-by: Simao Gomes Viana <xdevs23@outlook.com>
ten
shoudil před 3 roky
rodič
revize
8109d2c613
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4
    0
      opengl/java/android/opengl/GLSurfaceView.java

+ 4
- 0
opengl/java/android/opengl/GLSurfaceView.java Zobrazit soubor

@@ -1570,6 +1570,10 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
if (view != null) {
try {
Trace.traceBegin(Trace.TRACE_TAG_VIEW, "onDrawFrame");
if (mFinishDrawingRunnable != null) {
finishDrawingRunnable = mFinishDrawingRunnable;
mFinishDrawingRunnable = null;
}
view.mRenderer.onDrawFrame(gl);
if (finishDrawingRunnable != null) {
finishDrawingRunnable.run();

Načítá se…
Zrušit
Uložit