Rename spherical/Utils class to GlUtil

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207525621
This commit is contained in:
eguven 2018-08-06 04:48:37 -07:00 committed by Oliver Woodman
parent 454b106921
commit bf6b647088
3 changed files with 7 additions and 7 deletions

View file

@ -30,11 +30,11 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer;
/** GL utility methods. */
/*package*/ final class Utils {
/*package*/ final class GlUtil {
private static final String TAG = "Spherical.Utils";
/** Class only contains static methods. */
private Utils() {}
private GlUtil() {}
/**
* If there is an OpenGl error, logs the error and if {@link

View file

@ -15,7 +15,7 @@
*/
package com.google.android.exoplayer2.ui.spherical;
import static com.google.android.exoplayer2.ui.spherical.Utils.checkGlError;
import static com.google.android.exoplayer2.ui.spherical.GlUtil.checkGlError;
import android.annotation.TargetApi;
import android.opengl.GLES11Ext;
@ -126,12 +126,12 @@ import java.nio.FloatBuffer;
/** Used by static constructors. */
private Mesh(float[] vertexData) {
vertixCount = vertexData.length / COORDS_PER_VERTEX;
vertexBuffer = Utils.createBuffer(vertexData);
vertexBuffer = GlUtil.createBuffer(vertexData);
}
/** Initializes of the GL components. */
/* package */ void init() {
program = Utils.compileProgram(VERTEX_SHADER_CODE, FRAGMENT_SHADER_CODE);
program = GlUtil.compileProgram(VERTEX_SHADER_CODE, FRAGMENT_SHADER_CODE);
mvpMatrixHandle = GLES20.glGetUniformLocation(program, "uMvpMatrix");
positionHandle = GLES20.glGetAttribLocation(program, "aPosition");
texCoordsHandle = GLES20.glGetAttribLocation(program, "aTexCoords");

View file

@ -15,7 +15,7 @@
*/
package com.google.android.exoplayer2.ui.spherical;
import static com.google.android.exoplayer2.ui.spherical.Utils.checkGlError;
import static com.google.android.exoplayer2.ui.spherical.GlUtil.checkGlError;
import android.graphics.SurfaceTexture;
import android.opengl.GLES20;
@ -49,7 +49,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
checkGlError();
textureId = Utils.createExternalTexture();
textureId = GlUtil.createExternalTexture();
surfaceTexture = new SurfaceTexture(textureId);
surfaceTexture.setOnFrameAvailableListener(surfaceTexture -> frameAvailable.set(true));
return surfaceTexture;