Closed Bug 728631 Opened 8 years ago Closed 8 years ago

Layers become opaque during scale

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: jrmuizel, Assigned: joe)

References

Details

(Whiteboard: mwc-demo maple)

Attachments

(1 file, 1 obsolete file)

You can see this on runfield and George's falling leaves demo (http://people.mozilla.com/~gwright/falling_leaves/falling_leaves.html)

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?(chrislord.net)
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/LayerRenderer.java
@@ +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/NinePatchTileLayer.java
@@ +70,5 @@
>  
>          try {
>              GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, getTextureID());
>              drawPatches(context);
>          } finally {

Same

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

And again
Attachment #598940 - Flags: review?(chrislord.net) → 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+
https://hg.mozilla.org/projects/maple/rev/b5879891f58c
Status: NEW → RESOLVED
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: https://hg.mozilla.org/projects/maple/rev/181ba66322a0
Duplicate of this bug: 728283
You need to log in before you can comment on or make changes to this bug.