From fcfeb4b5970c8f361634429934a2518d7e8328dd Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 8 Mar 2010 11:14:20 -0800 Subject: fixes for [2474091] Saw Poor behaviour playing a video. - fix a bug when hacking video buffers into gralloc buffers where the buffer size was incorrect this was causing the "direct-form-texture" mode to fail - also when the above fails, make sure to revert to the "mdp copy mode" before going to "slow mode" - finally disable completely the "direct-from-texture" mode for now. It cannot work because the allocated buffers can't respect the GPU constraints (alignment and such). We'll have to find a solution for that. --- libs/surfaceflinger/LayerBase.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'libs/surfaceflinger/LayerBase.cpp') diff --git a/libs/surfaceflinger/LayerBase.cpp b/libs/surfaceflinger/LayerBase.cpp index b0109ca29d..63b57201af 100644 --- a/libs/surfaceflinger/LayerBase.cpp +++ b/libs/surfaceflinger/LayerBase.cpp @@ -666,22 +666,15 @@ status_t LayerBase::initializeEglImage( dpy, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID, (EGLClientBuffer)clientBuf, attrs); - LOGE_IF(texture->image == EGL_NO_IMAGE_KHR, - "eglCreateImageKHR() failed. err=0x%4x", - eglGetError()); - if (texture->image != EGL_NO_IMAGE_KHR) { glBindTexture(GL_TEXTURE_2D, texture->name); glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)texture->image); GLint error = glGetError(); if (UNLIKELY(error != GL_NO_ERROR)) { - // this failed, for instance, because we don't support NPOT. - // FIXME: do something! LOGE("layer=%p, glEGLImageTargetTexture2DOES(%p) " "failed err=0x%04x", this, texture->image, error); - mFlags &= ~DisplayHardware::DIRECT_TEXTURE; err = INVALID_OPERATION; } else { // Everything went okay! @@ -691,6 +684,8 @@ status_t LayerBase::initializeEglImage( texture->height = clientBuf->height; } } else { + LOGE("layer=%p, eglCreateImageKHR() failed. err=0x%4x", + this, eglGetError()); err = INVALID_OPERATION; } return err; -- cgit v1.2.3-59-g8ed1b