diff options
author | George Mount <mount@google.com> | 2012-11-16 15:44:26 -0800 |
---|---|---|
committer | George Mount <mount@google.com> | 2012-12-05 11:18:20 -0800 |
commit | 837007c09f723dd96cd8e99476de242c633759c2 (patch) | |
tree | 67e41902c33cc95b21f2a9cdc77899b0e2ba5221 /tests/src/com/android/gallery3d/ui/TextureTest.java | |
parent | 8d26578f8db895dadb7e0e1d7a56c00fa18183ec (diff) | |
download | android_packages_apps_Snap-837007c09f723dd96cd8e99476de242c633759c2.tar.gz android_packages_apps_Snap-837007c09f723dd96cd8e99476de242c633759c2.tar.bz2 android_packages_apps_Snap-837007c09f723dd96cd8e99476de242c633759c2.zip |
Add GLES20 canvas implementation.
Change-Id: I5680909f31dc097599d0e063aa1f6daba834d3e2
Diffstat (limited to 'tests/src/com/android/gallery3d/ui/TextureTest.java')
-rw-r--r-- | tests/src/com/android/gallery3d/ui/TextureTest.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/src/com/android/gallery3d/ui/TextureTest.java b/tests/src/com/android/gallery3d/ui/TextureTest.java index 36446b389..361bf7b84 100644 --- a/tests/src/com/android/gallery3d/ui/TextureTest.java +++ b/tests/src/com/android/gallery3d/ui/TextureTest.java @@ -48,6 +48,7 @@ public class TextureTest extends TestCase { return GL11.GL_TEXTURE_2D; } + @Override public boolean isOpaque() { mOpaqueCalled++; return true; @@ -61,7 +62,8 @@ public class TextureTest extends TestCase { @SmallTest public void testBasicTexture() { GL11 glStub = new GLStub(); - GLCanvas canvas = new GLCanvasImpl(glStub); + GLCanvas canvas = new GLCanvasImpl(); + canvas.initialize(glStub); MyBasicTexture texture = new MyBasicTexture(canvas, 47); assertEquals(47, texture.getId()); @@ -81,7 +83,8 @@ public class TextureTest extends TestCase { assertTrue(texture.isLoaded()); // For a different GL, it's not loaded. - GLCanvas canvas2 = new GLCanvasImpl(new GLStub()); + GLCanvas canvas2 = new GLCanvasImpl(); + canvas2.initialize(glStub); assertFalse(texture.isLoaded()); assertEquals(0, texture.mOnBindCalled); @@ -135,7 +138,8 @@ public class TextureTest extends TestCase { @SmallTest public void testUploadedTexture() { GL11 glStub = new GLStub(); - GLCanvas canvas = new GLCanvasImpl(glStub); + GLCanvas canvas = new GLCanvasImpl(); + canvas.initialize(glStub); MyUploadedTexture texture = new MyUploadedTexture(); // draw it and the bitmap should be fetched. @@ -181,6 +185,7 @@ public class TextureTest extends TestCase { return GL11.GL_TEXTURE_2D; } + @Override public boolean isOpaque() { return true; } |