diff options
| author | Owen Lin <owenlin@google.com> | 2012-04-02 03:38:02 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-04-02 03:38:02 -0700 |
| commit | 49b137806386ff0c8cf5caba4bf7e0a9aab4b7b9 (patch) | |
| tree | f6be271dd955d9c8a454c56e5f84bed9aa7a64cc /src | |
| parent | 2341c197b0becf99422e8ad305def77df6161714 (diff) | |
| parent | ba7d106f7e4fcb0036e694449e6fc5b002526309 (diff) | |
| download | android_packages_apps_Gallery2-49b137806386ff0c8cf5caba4bf7e0a9aab4b7b9.tar.gz android_packages_apps_Gallery2-49b137806386ff0c8cf5caba4bf7e0a9aab4b7b9.tar.bz2 android_packages_apps_Gallery2-49b137806386ff0c8cf5caba4bf7e0a9aab4b7b9.zip | |
Merge "Delete buffers and textures in GL."
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/gallery3d/ui/GLCanvasImpl.java | 4 | ||||
| -rw-r--r-- | src/com/android/gallery3d/ui/GLId.java | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/com/android/gallery3d/ui/GLCanvasImpl.java b/src/com/android/gallery3d/ui/GLCanvasImpl.java index 686e712bd..6411a3165 100644 --- a/src/com/android/gallery3d/ui/GLCanvasImpl.java +++ b/src/com/android/gallery3d/ui/GLCanvasImpl.java @@ -673,13 +673,13 @@ public class GLCanvasImpl implements GLCanvas { synchronized (mUnboundTextures) { IntArray ids = mUnboundTextures; if (ids.size() > 0) { - GLId.glDeleteTextures(ids.size(), ids.getInternalArray(), 0); + GLId.glDeleteTextures(mGL, ids.size(), ids.getInternalArray(), 0); ids.clear(); } ids = mDeleteBuffers; if (ids.size() > 0) { - GLId.glDeleteBuffers(ids.size(), ids.getInternalArray(), 0); + GLId.glDeleteBuffers(mGL, ids.size(), ids.getInternalArray(), 0); ids.clear(); } } diff --git a/src/com/android/gallery3d/ui/GLId.java b/src/com/android/gallery3d/ui/GLId.java index c228c350d..6151177d6 100644 --- a/src/com/android/gallery3d/ui/GLId.java +++ b/src/com/android/gallery3d/ui/GLId.java @@ -16,6 +16,8 @@ package com.android.gallery3d.ui; +import javax.microedition.khronos.opengles.GL11; + // This mimics corresponding GL functions. public class GLId { static int sNextId = 1; @@ -32,9 +34,11 @@ public class GLId { } } - public synchronized static void glDeleteTextures(int n, int[] textures, int offset) { + public synchronized static void glDeleteTextures(GL11 gl, int n, int[] textures, int offset) { + gl.glDeleteTextures(n, textures, offset); } - public synchronized static void glDeleteBuffers(int n, int[] buffers, int offset) { + public synchronized static void glDeleteBuffers(GL11 gl, int n, int[] buffers, int offset) { + gl.glDeleteBuffers(n, buffers, offset); } } |
