From bf6b6470887b483dcd46f2131dcbd872984c9d62 Mon Sep 17 00:00:00 2001 From: eguven Date: Mon, 6 Aug 2018 04:48:37 -0700 Subject: [PATCH] Rename spherical/Utils class to GlUtil ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=207525621 --- .../exoplayer2/ui/spherical/{Utils.java => GlUtil.java} | 4 ++-- .../com/google/android/exoplayer2/ui/spherical/Mesh.java | 6 +++--- .../android/exoplayer2/ui/spherical/SceneRenderer.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) rename library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/{Utils.java => GlUtil.java} (98%) diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/Utils.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/GlUtil.java similarity index 98% rename from library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/Utils.java rename to library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/GlUtil.java index 07ae93874d..c962ad78c0 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/Utils.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/GlUtil.java @@ -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 diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/Mesh.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/Mesh.java index 29bfa92743..d3d7d854ae 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/Mesh.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/Mesh.java @@ -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"); diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SceneRenderer.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SceneRenderer.java index e8fea025dd..96788000ca 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SceneRenderer.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SceneRenderer.java @@ -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;