Closed Bug 1435546 Opened 3 years ago Closed 3 years ago
Drawing to one canvas on a page affects another canvas
Tested with Firefox for Android Beta and Nightly, on Nexus 5X. The attached test-case has two canvases. In one is drawn a red box, in the other a green box. They also have colored borders that match the colors of the drawn boxes. There are two bugs here: 1) When Firefox "loses focus" (for example when switching to another app, or locking the screen), when it regains focus the two canvases will be empty. 2) I have rigged a redraw of the red canvas when the page is clicked. Such a redraw after step #1 will cause both canvases to be red, as if they're sharing a context. #1 only seems to happen when the canvases are large. Are they unloaded from memory?
Component: General → Canvas: 2D
Product: Firefox for Android → Core
I can't reproduce #2 on my phone, but #1 seems like a regression from bug 1379920.
Additionally, when I try to bring Firefox back into the foreground on a debug build, I get the following assertion: > 02-06 21:08:30.568 7799-7863/org.mozilla.fennec_jan A/MOZ_Assert: Assertion failure: status != 0 (ClientWaitSync generated an error. Has mSync already been destroyed?), at /home/jan/Mozilla/mozilla-central/gfx/layers/opengl/TextureHostOGL.cpp:687 And the thing that triggers this seems to be the heap minimisation we do when going into the background on Android. If I comment out this line (https://dxr.mozilla.org/mozilla-central/rev/0d806b3230fe4767fa70cdee57db87d1e9a5ba49/widget/android/nsAppShell.cpp#184), I can no longer reproduce this on a local build.
Jamie, can you reproduce on any of the phones you have?
I tested this on another phone, Xiaomi Mi 5, and only #1 happens. When it tries to draw the red square, it appears in just one canvas.
Moving issue #1 over to bug 1436466 to keep things separate.
Tested on Nexus 5 and Pixel 2 phones. Only #1 happens.
tracking-fennec: ? → +
3 years ago
Assignee: nobody → sotaro.ikeda.g
Priority: -- → P1
With bug 1436466 fixed, I can no longer reproduce this. Should this bug be closed, or is there a worry of a different way it can be exposed?
This bug could be closed.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1436466
You need to log in before you can comment on or make changes to this bug.