From dcab18c9c1a4ac6b5b9c996a4b002b0468bb3269 Mon Sep 17 00:00:00 2001 From: Ichitaro Kohara Date: Fri, 18 Feb 2011 13:15:04 +0100 Subject: [PATCH] Fixed to draw texture when loadTexture() is called at first time SW renderer of Stagefright reaches loadTexture() to draw image. The first time loadTexture() is called, it just initializes OGL texture, then returns. Thus, the first time call doesn't draw. This patch fixes to move on to draw stage after the initialization. Change-Id: I3ec1ad68fb8d376a4ad7aefded1c18a002d175c4 --- services/surfaceflinger/TextureManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/surfaceflinger/TextureManager.cpp b/services/surfaceflinger/TextureManager.cpp index c9a15f56a..9e24f90d5 100644 --- a/services/surfaceflinger/TextureManager.cpp +++ b/services/surfaceflinger/TextureManager.cpp @@ -186,7 +186,7 @@ status_t TextureManager::loadTexture(Texture* texture, if (texture->name == -1UL) { status_t err = initTexture(texture); LOGE_IF(err, "loadTexture failed in initTexture (%s)", strerror(err)); - return err; + if (err != NO_ERROR) return err; } if (texture->target != Texture::TEXTURE_2D)