diff options
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/libs/EGL/egl.cpp | 10 | ||||
-rw-r--r-- | opengl/tests/gl2_jni/Android.mk | 2 | ||||
-rw-r--r-- | opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp | 10 | ||||
-rw-r--r-- | opengl/tests/gl_jni/Android.mk | 2 | ||||
-rw-r--r-- | opengl/tests/gl_perfapp/Android.mk | 2 | ||||
-rw-r--r-- | opengl/tests/gldual/Android.mk | 2 | ||||
-rw-r--r-- | opengl/tests/hwc/Android.mk | 2 | ||||
-rw-r--r-- | opengl/tests/lib/Android.mk | 2 |
8 files changed, 21 insertions, 11 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index 861d7ac..7ce86b3 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -1130,6 +1130,16 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config, EGLConfig iConfig = dp->configs[intptr_t(config)].config; EGLint format; + // for now fail if the window is not a Surface. + int type = -1; + ANativeWindow* anw = reinterpret_cast<ANativeWindow*>(window); + if ((anw->query(window, NATIVE_WINDOW_CONCRETE_TYPE, &type) != 0) || + (type == NATIVE_WINDOW_SURFACE_TEXTURE_CLIENT)) { + LOGE("native window is a SurfaceTextureClient (currently " + "unsupported)"); + return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE); + } + // set the native window's buffers format to match this config if (cnx->egl.eglGetConfigAttrib(iDpy, iConfig, EGL_NATIVE_VISUAL_ID, &format)) { diff --git a/opengl/tests/gl2_jni/Android.mk b/opengl/tests/gl2_jni/Android.mk index 384966c..e8b6c57 100644 --- a/opengl/tests/gl2_jni/Android.mk +++ b/opengl/tests/gl2_jni/Android.mk @@ -44,7 +44,7 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_MODULE := libgl2jni -LOCAL_PRELINK_MODULE := false + include $(BUILD_SHARED_LIBRARY) diff --git a/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp b/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp index 602ea1a..f0b8d12 100644 --- a/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp +++ b/opengl/tests/gl2_yuvtex/gl2_yuvtex.cpp @@ -186,11 +186,6 @@ const int yuvTexUsage = GraphicBuffer::USAGE_HW_TEXTURE | GraphicBuffer::USAGE_SW_WRITE_RARELY; const int yuvTexFormat = HAL_PIXEL_FORMAT_YV12; const int yuvTexOffsetY = 0; -const int yuvTexStrideY = (yuvTexWidth + 0xf) & ~0xf; -const int yuvTexOffsetV = yuvTexStrideY * yuvTexHeight; -const int yuvTexStrideV = (yuvTexStrideY/2 + 0xf) & ~0xf; -const int yuvTexOffsetU = yuvTexOffsetV + yuvTexStrideV * yuvTexHeight/2; -const int yuvTexStrideU = yuvTexStrideV; const bool yuvTexSameUV = false; static sp<GraphicBuffer> yuvTexBuffer; static GLuint yuvTex; @@ -200,6 +195,11 @@ bool setupYuvTexSurface(EGLDisplay dpy, EGLContext context) { int blockHeight = yuvTexHeight > 16 ? yuvTexHeight / 16 : 1; yuvTexBuffer = new GraphicBuffer(yuvTexWidth, yuvTexHeight, yuvTexFormat, yuvTexUsage); + int yuvTexStrideY = yuvTexBuffer->getStride(); + int yuvTexOffsetV = yuvTexStrideY * yuvTexHeight; + int yuvTexStrideV = (yuvTexStrideY/2 + 0xf) & ~0xf; + int yuvTexOffsetU = yuvTexOffsetV + yuvTexStrideV * yuvTexHeight/2; + int yuvTexStrideU = yuvTexStrideV; char* buf = NULL; status_t err = yuvTexBuffer->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&buf)); if (err != 0) { diff --git a/opengl/tests/gl_jni/Android.mk b/opengl/tests/gl_jni/Android.mk index f1bd31d..4acd91f 100644 --- a/opengl/tests/gl_jni/Android.mk +++ b/opengl/tests/gl_jni/Android.mk @@ -46,7 +46,7 @@ LOCAL_MODULE := libgljni LOCAL_ARM_MODE := arm -LOCAL_PRELINK_MODULE := false + include $(BUILD_SHARED_LIBRARY) diff --git a/opengl/tests/gl_perfapp/Android.mk b/opengl/tests/gl_perfapp/Android.mk index dd75a74..4b79569 100644 --- a/opengl/tests/gl_perfapp/Android.mk +++ b/opengl/tests/gl_perfapp/Android.mk @@ -47,7 +47,7 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_MODULE := libglperf -LOCAL_PRELINK_MODULE := false + include $(BUILD_SHARED_LIBRARY) diff --git a/opengl/tests/gldual/Android.mk b/opengl/tests/gldual/Android.mk index 995a5d7..f1a998a 100644 --- a/opengl/tests/gldual/Android.mk +++ b/opengl/tests/gldual/Android.mk @@ -44,7 +44,7 @@ LOCAL_SHARED_LIBRARIES := \ LOCAL_MODULE := libgldualjni -LOCAL_PRELINK_MODULE := false + include $(BUILD_SHARED_LIBRARY) diff --git a/opengl/tests/hwc/Android.mk b/opengl/tests/hwc/Android.mk index 6312970..e4d7e28 100644 --- a/opengl/tests/hwc/Android.mk +++ b/opengl/tests/hwc/Android.mk @@ -29,7 +29,7 @@ LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES LOCAL_SHARED_LIBRARIES += libcutils libutils libstlport LOCAL_STATIC_LIBRARIES += libglTest -LOCAL_PRELINK_MODULE := false + include $(BUILD_STATIC_LIBRARY) diff --git a/opengl/tests/lib/Android.mk b/opengl/tests/lib/Android.mk index 7542ac4..ac1e183 100644 --- a/opengl/tests/lib/Android.mk +++ b/opengl/tests/lib/Android.mk @@ -27,6 +27,6 @@ LOCAL_C_INCLUDES += system/extras/tests/include \ LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES LOCAL_SHARED_LIBRARIES += libcutils libutils libstlport -LOCAL_PRELINK_MODULE := false + include $(BUILD_STATIC_LIBRARY) |