am b763d5ff
: Assume LayerScreenshot has pre-multiplied alpha
* commit 'b763d5fffa2f942a6ae3637fab17439dd32dbebc': Assume LayerScreenshot has pre-multiplied alpha
This commit is contained in:
commit
f5b27f7140
@ -118,21 +118,21 @@ void LayerScreenshot::onDraw(const sp<const DisplayDevice>& hw, const Region& cl
|
||||
|
||||
if (s.alpha == 0xFF) {
|
||||
glDisable(GL_BLEND);
|
||||
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
} else {
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glColor4f(alpha, alpha, alpha, alpha);
|
||||
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
}
|
||||
|
||||
LayerMesh mesh;
|
||||
computeGeometry(hw, &mesh);
|
||||
|
||||
glColor4f(0, 0, 0, alpha);
|
||||
|
||||
glDisable(GL_TEXTURE_EXTERNAL_OES);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, mTextureName);
|
||||
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
glMatrixMode(GL_TEXTURE);
|
||||
glLoadIdentity();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
Loading…
Reference in New Issue
Block a user