Created attachment 8597490 [details] logcat-nfc-flicker.txt Description: Every time NFC pairing is activated and the device enters the Shrinking UI, the UI will flicker black. This occurs when entering and exiting the shrinking UI Repro Steps: 1) Update a Flame to 20150424010200 2) Enable NFC on the DUT, as well as on another device 3) Enter the Gallery app and select an image 4) Tap the back of the DUT to the back of the second device to enter the Shrinking UI Actual: The screen will flicker when entering and exiting the Shrinking UI Expected: The Shrinking UI will open and close smoothly, without graphical issue. Environmental Variables: Device: Flame 3.0 (512MB)(Full Flash) Build ID: 20150424010200 Gaia: 0c5e2ee1173f3c53379ef3cd10de714836258fe8 Gecko: 22a157f7feb7 Gonk: b83fc73de7b64594cd74b33e498bf08332b5d87b Version: 40.0a1 (3.0) Firmware Version: v18D-1 User Agent: Mozilla/5.0 (Mobile; rv:40.0) Gecko/40.0 Firefox/40.0 Repro frequency: 10/10 See attached: Logcat, Video (URL)
This issue DOES occur on Flame 2.2, 2.1, and 2.0 builds. The screen will flicker when entering and exiting the Shrinking UI. Note: The issue seems less severe in 2.1 and 2.0 builds. Environmental Variables: Device: Flame 2.2 (512MB)(Full Flash) Build ID: 20150424002507 Gaia: b838d0e7c163e66660dcb6e387d8339944a7a30e Gecko: 5fe76b26e55f Gonk: ebad7da532429a6f5efadc00bf6ad8a41288a429 Version: 37.0 (2.2) Firmware Version: v18D-1 User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0 Environmental Variables: Device: Flame 2.1 (512MB)(Full Flash) Build ID: 20150424001201 Gaia: bbe983b4e8bebfec26b3726b79568a22d667223c Gecko: 6a68a038146a Gonk: ebad7da532429a6f5efadc00bf6ad8a41288a429 Version: 34.0 (2.1) Firmware Version: v18D-1 User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0 Environmental Variables: Device: Flame 2.0 (512MB)(Full Flash) Build ID: 20150424000201 Gaia: 84898cadf28b1a1fcd03b726cff658de470282f0 Gecko: ff96615f8cfc Gonk: ebad7da532429a6f5efadc00bf6ad8a41288a429 Version: 32.0 (2.0) Firmware Version: v18D-1 User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
QA Whiteboard: [QAnalyst-Triage?]
NI on component owner for nomination decision and assignment.
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(pbylenga) → needinfo?(ashiue)
Do not nominate to block since this is not a functional bug. Add gaia developers in CC list to aware this issue.
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][COM=NFC]
ni? for Juwei on this. This is a pretty bad UX, and the similar bugs have been indentified as 2.1+. See Bug 997606 and Bug 1033136.
Hi, Please do block this bug since it's a very bad experience. People wouldn't be able to trust this function if it display choppy.
According to comment 5, nominate this issue.
blocking-b2g: --- → 2.2?
Ni gaia developer and see if he can help to fix the problem.
Assignee: nobody → gduan
I've been doing some tests on Flame and Nexus. I'm not completely sure but it seems that the flickering is related to screenshot generation and AppWindow.setVisible() called here . On Nexus I was able to remove the flickering by introducing a timeout of 500ms before calling setVisible. Still this does not help on Flame. I've removed setVisible completely on Flame, as a result I can see the flickering only the first time I trigger ShrinkingUI, the subsequent triggers are looking fine (until I restart the app or lock the screen). Hope this helps in solving the problem.  - https://github.com/mozilla-b2g/gaia/blob/b320ab38f5615d8e26db304f6188dc87fd4f307b/apps/system/js/app_window.js#L2051
Thanks, tauzen! I did some tests, too. I found that the root cause is probably the time gap between rendering background image and hiding frame, because I tried to modify  , update backgroundColor to white instead of updating backgroundImage to the blob we get from screenshot. and there's no flickering then. If my assumption is correct, I would suggest to use hidden image to load the blob image and put it to backgroundImage when it's ready. see https://github.com/cctuan/gaia/commit/c819f571e818e37252dbdbe5ead76301d62f7f16 Hi Alive, could you advise? Thanks.  - https://github.com/mozilla-b2g/gaia/blob/b320ab38f5615d8e26db304f6188dc87fd4f307b/apps/system/js/app_window.js#L1325
f+ if we use promise instead of callback.
Comment on attachment 8600690 [details] [review] [gaia] cctuan:1158379 > mozilla-b2g:master Hi Alive, could you review this patch? My solution can reduce the period of flickering but not 100%. There's still a small period between image.onload and backgroundImage is fully rendered, but I haven't thought a way to solve it from JS.
Attachment #8600690 - Flags: review?(alive)
Comment on attachment 8600690 [details] [review] [gaia] cctuan:1158379 > mozilla-b2g:master Thanks!
Attachment #8600690 - Flags: review?(alive) → review+
Status: NEW → ASSIGNED
manually merged to master : https://github.com/mozilla-b2g/gaia/commit/c48bc387de07f9eb005fa37a4c315e39bab9b6c6
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
blocking-b2g: 2.2? → 2.2+
Verified on 3.0, it seems much better: http://youtu.be/0WYrmuea98s Build ID 20150520160208 Gaia Revision b290c77ccb7ab0af599b3d8287b71b9970d8dcb0 Gaia Date 2015-05-20 10:19:05 Gecko Revision https://hg.mozilla.org/mozilla-central/rev/8d8df22fe72d Gecko Version 41.0a1 Device Name flame Firmware(Release) 4.4.2 Firmware(Incremental) eng.cltbld.20150520.192608 Firmware Date Wed May 20 19:26:18 EDT 2015 Bootloader L1TC100118D0 Hi George, could you please uplift this patch to v2.2? Thank you.
status-b2g-master: affected → verified
Comment on attachment 8600690 [details] [review] [gaia] cctuan:1158379 > mozilla-b2g:master [Approval Request Comment] [Bug caused by] (feature/regressing bug #): It's not a regression of gaia, nor a feature. [User impact] if declined: User might see shrinking flickering, see https://youtu.be/8o67gyc-1nw [Testing completed]: Yes, manually verified and unit test [Risk to taking this patch] (and alternatives if risky): Need to uplift patch of bug 1162384, or it might caus bug 1162384 [String changes made]:
Attachment #8600690 - Flags: approval-gaia-v2.2?
Attachment #8600690 - Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
status-b2g-v2.2: affected → fixed
Target Milestone: --- → 2.2 S12 (15may)
Verified on 2.2: Build ID 20150525162504 Gaia Revision 144673a413586f98b5e2c27b781c1a539611f754 Gaia Date 2015-05-25 02:01:14 Gecko Revision https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/115112d51e08 Gecko Version 37.0 Device Name flame Firmware(Release) 4.4.2 Firmware(Incremental) eng.cltbld.20150525.202102 Firmware Date Mon May 25 20:21:12 EDT 2015 Bootloader L1TC100118D0
Status: RESOLVED → VERIFIED
status-b2g-v2.2: fixed → verified
You need to log in before you can comment on or make changes to this bug.