mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 709560 - Set blend function when enabling gl blending. r=pcwalton
The missing blend function was causing the default of GL_ONE, GL_ZERO to take effect, making it look like alpha blending wasn't working. It would start working once the 9-patch shadow was rendered since that code sets the correct blend function. Fix this by ensuring we set the blend function wherever we use blending.
This commit is contained in:
parent
610f764e15
commit
d84f168de3
@ -213,6 +213,7 @@ public class LayerRenderer implements GLSurfaceView.Renderer {
|
||||
updateDroppedFrames(frameStartTime);
|
||||
try {
|
||||
gl.glEnable(GL10.GL_BLEND);
|
||||
gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
|
||||
mFrameRateLayer.draw(screenContext);
|
||||
} finally {
|
||||
gl.glDisable(GL10.GL_BLEND);
|
||||
|
@ -167,6 +167,7 @@ public class ScrollbarLayer extends TileLayer {
|
||||
|
||||
try {
|
||||
GLES11.glEnable(GL10.GL_BLEND);
|
||||
GLES11.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
Rect rect = RectUtils.round(mVertical ? getVerticalRect(context) : getHorizontalRect(context));
|
||||
GLES11.glBindTexture(GL10.GL_TEXTURE_2D, getTextureID());
|
||||
|
Loading…
Reference in New Issue
Block a user