From 83d8d83ad1f2c9aee0db9a5a1329cfc64801bc3a Mon Sep 17 00:00:00 2001 From: Jack Palevich Date: Fri, 21 Aug 2009 11:48:50 -0700 Subject: [PATCH] Remove unused getConfigSpec methods from ApiDemos sample code At one time during the development of GLSurfaceView, the GLSurfaceView.Renderer interface had a getConfigSpec method that was used to select the frame buffer format. This method was removed from the Renderer interface before GLSurfaceView became a public API, but the sample code still defined these now-unused methods. To reduce the chance of confusing a developer who uses the sample code, this change removes the dead, no-longer-called getConfigSpec implementations from the three samples. See GLSurfaceView.setEGLConfigChooser for the replacement technique. --- .../android/apis/graphics/CubeRenderer.java | 23 ------------------- .../apis/graphics/TouchRotateActivity.java | 10 -------- .../spritetext/SpriteTextRenderer.java | 10 -------- 3 files changed, 43 deletions(-) diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/CubeRenderer.java b/samples/ApiDemos/src/com/example/android/apis/graphics/CubeRenderer.java index 527e2bc04..0f15f9131 100644 --- a/samples/ApiDemos/src/com/example/android/apis/graphics/CubeRenderer.java +++ b/samples/ApiDemos/src/com/example/android/apis/graphics/CubeRenderer.java @@ -64,29 +64,6 @@ class CubeRenderer implements GLSurfaceView.Renderer { mAngle += 1.2f; } - public int[] getConfigSpec() { - if (mTranslucentBackground) { - // We want a depth buffer and an alpha buffer - int[] configSpec = { - EGL10.EGL_RED_SIZE, 8, - EGL10.EGL_GREEN_SIZE, 8, - EGL10.EGL_BLUE_SIZE, 8, - EGL10.EGL_ALPHA_SIZE, 8, - EGL10.EGL_DEPTH_SIZE, 16, - EGL10.EGL_NONE - }; - return configSpec; - } else { - // We want a depth buffer, don't care about the - // details of the color buffer. - int[] configSpec = { - EGL10.EGL_DEPTH_SIZE, 16, - EGL10.EGL_NONE - }; - return configSpec; - } - } - public void onSurfaceChanged(GL10 gl, int width, int height) { gl.glViewport(0, 0, width, height); diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.java b/samples/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.java index 09d369441..c0f32a71a 100644 --- a/samples/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.java +++ b/samples/ApiDemos/src/com/example/android/apis/graphics/TouchRotateActivity.java @@ -134,16 +134,6 @@ class TouchSurfaceView extends GLSurfaceView { mCube.draw(gl); } - public int[] getConfigSpec() { - // We want a depth buffer, don't care about the - // details of the color buffer. - int[] configSpec = { - EGL10.EGL_DEPTH_SIZE, 16, - EGL10.EGL_NONE - }; - return configSpec; - } - public void onSurfaceChanged(GL10 gl, int width, int height) { gl.glViewport(0, 0, width, height); diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java b/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java index b9369cd7c..223300a8d 100644 --- a/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java +++ b/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/SpriteTextRenderer.java @@ -50,16 +50,6 @@ public class SpriteTextRenderer implements GLSurfaceView.Renderer{ mLabelPaint.setARGB(0xff, 0x00, 0x00, 0x00); } - public int[] getConfigSpec() { - // We don't need a depth buffer, and don't care about our - // color depth. - int[] configSpec = { - EGL10.EGL_DEPTH_SIZE, 0, - EGL10.EGL_NONE - }; - return configSpec; - } - public void onSurfaceCreated(GL10 gl, EGLConfig config) { /* * By default, OpenGL enables features that improve quality