Format with google-java-format
This commit is contained in:
parent
c0c1c315c5
commit
c4d9df970c
@ -34,7 +34,6 @@ import android.opengl.GLES20;
|
|||||||
import android.opengl.GLES30;
|
import android.opengl.GLES30;
|
||||||
import android.opengl.GLUtils;
|
import android.opengl.GLUtils;
|
||||||
import android.opengl.Matrix;
|
import android.opengl.Matrix;
|
||||||
import androidx.annotation.DoNotInline;
|
|
||||||
import androidx.annotation.IntRange;
|
import androidx.annotation.IntRange;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.media3.common.C;
|
import androidx.media3.common.C;
|
||||||
@ -413,7 +412,8 @@ public final class GlUtil {
|
|||||||
currentEglContextVersion,
|
currentEglContextVersion,
|
||||||
/* offset= */ 0);
|
/* offset= */ 0);
|
||||||
checkGlError();
|
checkGlError();
|
||||||
return currentEglContextVersion[0]; }
|
return currentEglContextVersion[0];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a newly created sync object and inserts it into the GL command stream.
|
* Returns a newly created sync object and inserts it into the GL command stream.
|
||||||
@ -445,7 +445,8 @@ public final class GlUtil {
|
|||||||
*/
|
*/
|
||||||
public static void deleteSyncObject(long syncObject) throws GlException {
|
public static void deleteSyncObject(long syncObject) throws GlException {
|
||||||
deleteSyncObjectQuietly(syncObject);
|
deleteSyncObjectQuietly(syncObject);
|
||||||
checkGlError(); }
|
checkGlError();
|
||||||
|
}
|
||||||
|
|
||||||
/** Releases the GL sync object if set, suppressing any error. */
|
/** Releases the GL sync object if set, suppressing any error. */
|
||||||
public static void deleteSyncObjectQuietly(long syncObject) {
|
public static void deleteSyncObjectQuietly(long syncObject) {
|
||||||
@ -546,8 +547,7 @@ public final class GlUtil {
|
|||||||
public static void focusEglSurface(
|
public static void focusEglSurface(
|
||||||
EGLDisplay eglDisplay, EGLContext eglContext, EGLSurface eglSurface, int width, int height)
|
EGLDisplay eglDisplay, EGLContext eglContext, EGLSurface eglSurface, int width, int height)
|
||||||
throws GlException {
|
throws GlException {
|
||||||
focusRenderTarget(
|
focusRenderTarget(eglDisplay, eglContext, eglSurface, /* framebuffer= */ 0, width, height);
|
||||||
eglDisplay, eglContext, eglSurface, /* framebuffer= */ 0, width, height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,7 +26,6 @@ import android.view.Choreographer;
|
|||||||
import android.view.Choreographer.FrameCallback;
|
import android.view.Choreographer.FrameCallback;
|
||||||
import android.view.Display;
|
import android.view.Display;
|
||||||
import android.view.Surface;
|
import android.view.Surface;
|
||||||
import android.view.WindowManager;
|
|
||||||
import androidx.annotation.DoNotInline;
|
import androidx.annotation.DoNotInline;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.RequiresApi;
|
import androidx.annotation.RequiresApi;
|
||||||
@ -419,7 +418,9 @@ public final class VideoFrameReleaseHelper {
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private DisplayHelper maybeBuildDisplayHelper(@Nullable Context context) {
|
private DisplayHelper maybeBuildDisplayHelper(@Nullable Context context) {
|
||||||
if (context == null) { return null;}
|
if (context == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
DisplayManager displayManager =
|
DisplayManager displayManager =
|
||||||
(DisplayManager) context.getSystemService(Context.DISPLAY_SERVICE);
|
(DisplayManager) context.getSystemService(Context.DISPLAY_SERVICE);
|
||||||
return displayManager != null ? new DisplayHelper(displayManager) : null;
|
return displayManager != null ? new DisplayHelper(displayManager) : null;
|
||||||
@ -443,8 +444,7 @@ public final class VideoFrameReleaseHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class DisplayHelper
|
private final class DisplayHelper implements DisplayManager.DisplayListener {
|
||||||
implements DisplayManager.DisplayListener {
|
|
||||||
|
|
||||||
private final DisplayManager displayManager;
|
private final DisplayManager displayManager;
|
||||||
|
|
||||||
|
@ -106,7 +106,8 @@ public final class SphericalGLSurfaceView extends GLSurfaceView {
|
|||||||
// fusion. It's used instead of TYPE_ROTATION_VECTOR since the latter uses the magnetometer on
|
// fusion. It's used instead of TYPE_ROTATION_VECTOR since the latter uses the magnetometer on
|
||||||
// devices. When used indoors, the magnetometer can take some time to settle depending on the
|
// devices. When used indoors, the magnetometer can take some time to settle depending on the
|
||||||
// device and amount of metal in the environment.
|
// device and amount of metal in the environment.
|
||||||
@Nullable Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_GAME_ROTATION_VECTOR);
|
@Nullable
|
||||||
|
Sensor orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_GAME_ROTATION_VECTOR);
|
||||||
if (orientationSensor == null) {
|
if (orientationSensor == null) {
|
||||||
orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);
|
orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user