Closed Bug 728631 Opened 8 years ago Closed 8 years ago

Layers become opaque during scale


(Core :: Graphics, defect)

Not set





(Reporter: jrmuizel, Assigned: joe)



(Whiteboard: mwc-demo maple)


(1 file, 1 obsolete file)

You can see this on runfield and George's falling leaves demo (

Ali or Benoit any idea what this could be?
No, I'll take a look at this, it should be easy at least find the root cause.
Assignee: nobody → bgirard
Assignee: bgirard → joe
We get blending turned off on ourselves by the Java OpenGL code. Since we always want blending turned on, let's just leave it that way and remove the disable calls altogether.
Attachment #598940 - Flags: review?(
We should always have blending enabled; if code needs blending disabled, it should disable it, do its job, and then re-enable blending.
Comment on attachment 598940 [details] [diff] [review]
Don't disable blending from Java code

Review of attachment 598940 [details] [diff] [review]:

I think it'd be better to reverse this logic than just remove the disables about the place.

i.e. add a glEnable GL_BLEND in initialisation, and disable it in the areas where blending isn't currently used. This will prevent the situation where we render with an unexpected blend function.

::: mobile/android/base/gfx/
@@ +658,5 @@
>                  try {
>                      GLES20.glEnable(GLES20.GL_BLEND);
>                      GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);
>                      mFrameRateLayer.draw(mScreenContext);
>                  } finally {

Remove this try/finally block if there's not going to be anything in the finally.

::: mobile/android/base/gfx/
@@ +70,5 @@
>          try {
>              GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, getTextureID());
>              drawPatches(context);
>          } finally {


::: mobile/android/base/gfx/
@@ +398,5 @@
>                                               coordBuffer);
>                  GLES20.glDrawArrays(GLES20.GL_TRIANGLE_STRIP, 0, 4);
>              }
>          } finally {

And again
Attachment #598940 - Flags: review?( → review-
This removes the try/finally blocks. I really don't want to change how we enable/disable blending in the Java code, because I don't understand it.
Attachment #598940 - Attachment is obsolete: true
Attachment #598959 - Flags: review?(doug.turner)
Attachment #598959 - Flags: review?(doug.turner) → review+
Closed: 8 years ago
Resolution: --- → FIXED
Duplicate of this bug: 728000
On my falling leaves demo I still saw some of the leaves turn black if I pressed on the URL bar to bring up the URL menu then pressed back to return to the page. This was with today's maple
I was not careful, and included some debug code when I pushed. I fixed that:
Duplicate of this bug: 728283
You need to log in before you can comment on or make changes to this bug.