SurfaceFlinger: set wrap mode on screenshot texture
Some implementations of NPOT, particular those derived from core GLES2, require the wrap mode to be CLAMP_TO_EDGE. Set the required wrap mode for the screenshot texture so it passes the completeness check. Change-Id: I735016123e4acaf54b40d1435bd70281cef88a31
This commit is contained in:
parent
375adfb954
commit
b1d1c6d4c2
@ -70,6 +70,8 @@ void LayerScreenshot::initTexture(GLfloat u, GLfloat v) {
|
||||
glBindTexture(GL_TEXTURE_2D, mTextureName);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
mTexCoords[0] = 0; mTexCoords[1] = v;
|
||||
mTexCoords[2] = 0; mTexCoords[3] = 0;
|
||||
mTexCoords[4] = u; mTexCoords[5] = 0;
|
||||
|
@ -1857,6 +1857,8 @@ status_t SurfaceFlinger::electronBeamOffAnimationImplLocked()
|
||||
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glVertexPointer(2, GL_FLOAT, 0, vtx);
|
||||
@ -2029,6 +2031,8 @@ status_t SurfaceFlinger::electronBeamOnAnimationImplLocked()
|
||||
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glVertexPointer(2, GL_FLOAT, 0, vtx);
|
||||
|
Loading…
Reference in New Issue
Block a user