Closed Bug 1165200 Opened 10 years ago Closed 10 years ago

Fix GonkDisplay::QueueBuffer() for bootAnim

Categories

(Core Graveyard :: Widget: Gonk, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.2r+, firefox41 fixed, b2g-v2.1 wontfix, b2g-v2.1S wontfix, b2g-v2.2 wontfix, b2g-v2.2r fixed, b2g-master fixed)

RESOLVED FIXED
mozilla41
blocking-b2g 2.2r+
Tracking Status
firefox41 --- fixed
b2g-v2.1 --- wontfix
b2g-v2.1S --- wontfix
b2g-v2.2 --- wontfix
b2g-v2.2r --- fixed
b2g-master --- fixed

People

(Reporter: jerry, Assigned: jerry)

References

Details

Attachments

(2 files, 3 obsolete files)

+++ This bug was initially created as a clone of Bug #1163681 +++ After bug 1163681, we can't see the bootAnim anymore.
I don't see the error message as [1]. BootAnim uses separated gralloc buffer. It's not from bufferQueue. So I update the QueueBuffer() for bootAnim case. [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1162715#c0
Attachment #8606126 - Flags: review?(sotaro.ikeda.g)
Attachment #8606126 - Flags: review?(mwu)
Attachment #8606126 - Flags: review?(sotaro.ikeda.g) → review+
I set review+, but I do not fun of using mBootAnimBuffer. HWC architecture requests, at least 2 buffers for animation update.
Comment on attachment 8606126 [details] [diff] [review] fix GonkDisplay::QueueBuffer() for bootAnim. v1 Sorry, I clear the review+, until the necessity of mBootAnimBuffer becomes clear. I rechecked GonkDisplayJB::QueueBuffer()'s implementation. since it's first implementation, it is not implemented correctly. It seems that just fixing it seems to address the problem.
Attachment #8606126 - Flags: review+ → review-
On Bug 1163681, I focused only on b2g v2.2. I did not checked master's code enough. Bug 1163681 should basically fixed the problem of GonkDisplayJB::QueueBuffer(). Do same thing as in b2g v2.2 should fix the problem also on master, I think.
Attachment #8606322 - Attachment is obsolete: true
(In reply to Sotaro Ikeda [:sotaro] from comment #4) > On Bug 1163681, I focused only on b2g v2.2. I did not checked master's code > enough. Bug 1163681 should basically fixed the problem of > GonkDisplayJB::QueueBuffer(). Therefore, mBootAnimBuffer seems not necessary.
Attachment #8606323 - Flags: feedback?(hshih)
Attachment #8606323 - Flags: review?(mwu)
mBootAnimBuffer is intentional - we want to be able to pass the animation buffer to gecko during startup and allow gecko to decide when to stop the animation. That's not done at the moment, but that's the goal.
(In reply to Michael Wu [:mwu] from comment #8) > mBootAnimBuffer is intentional - we want to be able to pass the animation > buffer to gecko during startup and allow gecko to decide when to stop the > animation. That's not done at the moment, but that's the goal. mwu, can you explain more about why FrameBufferSurface's buffer does not work for it. In current gecko's code, FrameBufferSurface's buffer is enough.
Flags: needinfo?(mwu)
My concern is that use single buffer for animation could cause flickering. At least, 2 buffers are necessary for the bootanimation.
Yeah we probably need two. FrameBufferSurface doesn't work because it gets taken by EGL during gecko's gfx initialization.
Flags: needinfo?(mwu)
Android create a surface for bootanimation. Similar way of implementation seems more architecturally clean than handling raw buffer. http://androidxref.com/5.1.0_r1/xref/frameworks/base/cmds/bootanimation/BootAnimation.cpp#241
(In reply to Sotaro Ikeda [:sotaro] from comment #12) > Android create a surface for bootanimation. Similar way of implementation > seems more architecturally clean than handling raw buffer. > http://androidxref.com/5.1.0_r1/xref/frameworks/base/cmds/bootanimation/ > BootAnimation.cpp#241 If the surface is destroyed when bootanimation stop. GraphicBuffer usage increase does not affect to actual Firefox OS's normal usage.
Yeah agreed - creating a proper surface to manage these buffers is the right way to go.
Yhea, it is a way to go:-)
Attachment #8606323 - Flags: review?(mwu)
Attachment #8606323 - Flags: feedback?(hshih)
Jerry, can you update a patch as in comment 12? Single buffer could cause flickering or lower fps.
Flags: needinfo?(hshih)
(In reply to Sotaro Ikeda [:sotaro] from comment #16) > Jerry, can you update a patch as in comment 12? Single buffer could cause > flickering or lower fps. And please do not forget to fix fence handling correctly.
Comment on attachment 8606126 [details] [diff] [review] fix GonkDisplay::QueueBuffer() for bootAnim. v1 Review of attachment 8606126 [details] [diff] [review]: ----------------------------------------------------------------- To summarize, I think we want to do these things: 1. Switch the boot animation to drawing to a double buffered surface rather than just juggling raw gralloc buffers. 2. Have the hardware compositor take the boot animation surface from GonkDisplay when it initializes, and start displaying buffers from there. 3. Drop the surface and stop displaying the animation when we receive the browser-ui-startup-complete notification. (fired from b2g/chrome/content/shell.js)
Attachment #8606126 - Flags: review?(mwu)
I will ask :chiajung the reason for the original single buffer usage and check the items in comment 18 later. thx.
Blocks: 1165161
Create a new surface for bootAnim.
Attachment #8606126 - Attachment is obsolete: true
Attachment #8606323 - Attachment is obsolete: true
Attachment #8606752 - Flags: review?(sotaro.ikeda.g)
Attachment #8606752 - Flags: review?(mwu)
(In reply to Michael Wu [:mwu] from comment #18) > To summarize, I think we want to do these things: > > 1. Switch the boot animation to drawing to a double buffered surface rather > than just juggling raw gralloc buffers. attachment 8606752 [details] [diff] [review] will do that. > 2. Have the hardware compositor take the boot animation surface from > GonkDisplay when it initializes, and start displaying buffers from there. I'm not sure why HwcComposer2D needs to touch the boot animation surface. During booting, b2g will not call HwcComposer2D::TryHwComposition() and HwcComposer2D::Render(). In bootAnim case, GonkDisplay can handle everything. > 3. Drop the surface and stop displaying the animation when we receive the > browser-ui-startup-complete notification. (fired from > b2g/chrome/content/shell.js) Bug 1165161 will do that.
Flags: needinfo?(hshih)
Comment on attachment 8606752 [details] [diff] [review] fix GonkDisplay::QueueBuffer() for bootAnim. v2 Review of attachment 8606752 [details] [diff] [review]: ----------------------------------------------------------------- Looks good.
Attachment #8606752 - Flags: review?(sotaro.ikeda.g) → review+
Attachment #8606752 - Flags: review?(mwu) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
[Approval Request Comment] Bug caused by (feature/regressing bug #): Bug 1191674 User impact if declined: User will see the bootAnim pause for a long times. Testing completed: The are already at m-c. Risk to taking this patch (and alternatives if risky): low String or UUID changes made by this patch: no
Attachment #8647270 - Flags: approval-mozilla-b2g37?
Blocks: 1191674
TAM's comment for this issue: This is one of the three dependent issues of bug 1191674, which is needed by partner TCL for their product based on 2.2. Thought this is not functional critical however indeed impact first time user experience (power on animation is the first thing user will see), plus the risk is low so I think it's worth fixing. In comment 38 of bug 1191674 we can already see those patches work for their problem. Hi Josh: how is your view about landing it on 2.2
Flags: needinfo?(jocheng)
Hi Wesly, We currently do not have plan for shipping device on 2.2 but 2.2r. I like to make this 2.2r+. Thanks!
blocking-b2g: --- → 2.2r+
Flags: needinfo?(jocheng)
Comment on attachment 8647270 [details] [diff] [review] fix GonkDisplay::QueueBuffer() for bootAnim. (b2g v2.2) Thanks Jerry, Make this blocking-b2g: 2.2r+. Currently no 2.2r approval required.
Attachment #8647270 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37-
Blocks: 1197968
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: