Skip to content

Commit 222c221

Browse files
Ichitaro KoharaJohan Redestig
authored andcommitted
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
1 parent c6b22e2 commit 222c221

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/surfaceflinger/TextureManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ status_t TextureManager::loadTexture(Texture* texture,
186186
if (texture->name == -1UL) {
187187
status_t err = initTexture(texture);
188188
LOGE_IF(err, "loadTexture failed in initTexture (%s)", strerror(err));
189-
return err;
189+
if (err != NO_ERROR) return err;
190190
}
191191

192192
if (texture->target != Texture::TEXTURE_2D)

0 commit comments

Comments
 (0)