diff options
| -rw-r--r-- | libs/gui/SurfaceTexture.cpp | 5 | ||||
| -rw-r--r-- | opengl/libs/EGL/egl_cache.cpp | 2 | ||||
| -rw-r--r-- | opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if | 6 |
3 files changed, 11 insertions, 2 deletions
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp index 9332aac9df..175de69038 100644 --- a/libs/gui/SurfaceTexture.cpp +++ b/libs/gui/SurfaceTexture.cpp @@ -437,6 +437,11 @@ status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h, mSlots[buf].mEglImage = EGL_NO_IMAGE_KHR; mSlots[buf].mEglDisplay = EGL_NO_DISPLAY; } + if (mCurrentTexture == buf) { + // The current texture no longer references the buffer in this slot + // since we just allocated a new buffer. + mCurrentTexture = INVALID_BUFFER_SLOT; + } returnFlags |= ISurfaceTexture::BUFFER_NEEDS_REALLOCATION; } ST_LOGV("dequeueBuffer: returning slot=%d buf=%p flags=%#x", buf, diff --git a/opengl/libs/EGL/egl_cache.cpp b/opengl/libs/EGL/egl_cache.cpp index 13a492917d..fe32d43589 100644 --- a/opengl/libs/EGL/egl_cache.cpp +++ b/opengl/libs/EGL/egl_cache.cpp @@ -85,7 +85,7 @@ void egl_cache_t::initialize(egl_display_t *display) { bool atStart = !strncmp(BC_EXT_STR " ", exts, bcExtLen+1); bool atEnd = (bcExtLen+1) < extsLen && !strcmp(" " BC_EXT_STR, exts + extsLen - (bcExtLen+1)); - bool inMiddle = strstr(" " BC_EXT_STR " ", exts); + bool inMiddle = strstr(exts, " " BC_EXT_STR " "); if (equal || atStart || atEnd || inMiddle) { PFNEGLSETBLOBCACHEFUNCSANDROIDPROC eglSetBlobCacheFuncsANDROID; eglSetBlobCacheFuncsANDROID = diff --git a/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if b/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if index c5e34cd1b9..0c5fa04f13 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if +++ b/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if @@ -124,6 +124,10 @@ public class GLES11Ext { public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; public static final int GL_BGRA = 0x80E1; + public static final int GL_TEXTURE_EXTERNAL_OES = 0x8D65; + public static final int GL_SAMPLER_EXTERNAL_OES = 0x8D66; + public static final int GL_TEXTURE_BINDING_EXTERNAL_OES = 0x8D67; + public static final int GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8D68; native private static void _nativeClassInit(); static { @@ -135,4 +139,4 @@ public class GLES11Ext { private static final int GL_FLOAT = GLES10.GL_FLOAT; private static final int GL_SHORT = GLES10.GL_SHORT; - private static Buffer _matrixIndexPointerOES;
\ No newline at end of file + private static Buffer _matrixIndexPointerOES; |