Render wallpaper in system app only while homescreen is not loaded yet.

RESOLVED WONTFIX

Status

Firefox OS
Gaia::System::Window Mgmt
P1
normal
RESOLVED WONTFIX
4 years ago
4 years ago

People

(Reporter: alive, Assigned: mchang)

Tracking

({perf, regression})

unspecified
1.4 S2 (28feb)
ARM
Gonk (Firefox OS)
perf, regression
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [c=handeye p=3 s=2014.02.28 u=])

Attachments

(3 attachments)

+++ This bug was initially created as a clone of Bug #960325 +++

See bug 960325 comment 21.
Blocks: 902766
No longer blocks: 917416, 960683
No longer depends on: 960736
This is actually a visual regression of bug 960325; if homescreen app is OOM'd we see black background.

Also, when I unlock lock screen to home screen I can see black background since the painting of background image comes later (when we setVisible(true) the home screen app).

I wonder if any fixes in this bug, in system app, actually offsets the perf benefit we try to achieve in bug 960325?

Also, is bug 960325 to risk to be worked on for v1.4 on master (see b2g-internal)? Should we simply back it out and re-land everything after Mar 17?
blocking-b2g: --- → 1.4?
Flags: needinfo?(mchang)
Keywords: regression
(Assignee)

Comment 2

4 years ago
Bug 960325 was a requirement for bug 917416, which helps with scrolling and memory in every app. Bug 960325 actually regresses the homescreen app a bit in exchange for helping every other app. If this is the only visual regression, I think we can fix this by March 17th.
Flags: needinfo?(mchang)
Whiteboard: [c=handeye p=4 s= u=] → [c=handeye p=3 s= u=]
(Assignee)

Updated

4 years ago
Assignee: nobody → mchang
Status: NEW → ASSIGNED
Target Milestone: --- → 1.4 S3 (14mar)
(Assignee)

Comment 3

4 years ago
Created attachment 8381845 [details]
Layer Tree w/ background in Homescreen Only while Going to Homescreen
(Assignee)

Comment 4

4 years ago
Created attachment 8381846 [details]
Layer tree w/ background in system + homescreen app while going to homescreen
(Assignee)

Comment 5

4 years ago
Created attachment 8381854 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/16640

I've been investigating this, and essentially there are cases where we flash black because the system app has a black background. I think what's happening is, during some transitions, the layer tree gets complicated due to large transactions and we don't optimize as well as we can. Therefore, we default to showing what's in the system app rather than what's in the current app. There are a couple of ways to fix this:

1) Add the background back into the system app, so it is copied in both the homescreen and system app.
2) Do some hooks so that animations that reveal the homescreen can't start until the homescreen has been painted.
3) Block in the compositor until the reflayer has finished all of it's transactions.

(3) is risky and dangerous. (2) would add latency and overhead to every action in gaia. (1) Is the safest bet / least risky bet and it fixes the issues coming from bug 960325. Talking with :BenWa and :mattwoodrow, we sometimes lose some of the memory gains from 917416, but it appears we optimize this a bit better than we thought.

Surprisingly, we actually optimize the background in the system app away (from my limited testing) except during transitions, which is exactly when we want the background in the system app. When we scroll, we still get the benefits of bug 917416. Will this work for 1.4, then we can file a follow up bug to remove the duplicate code.
Attachment #8381854 - Flags: review?(alive)
(In reply to Mason Chang [:mchang] from comment #5)
> (3) is risky and dangerous. (2) would add latency and overhead to every
> action in gaia. (1) Is the safest bet / least risky bet and it fixes the
> issues coming from bug 960325. Talking with :BenWa and :mattwoodrow, we
> sometimes lose some of the memory gains from 917416, but it appears we
> optimize this a bit better than we thought.
> 
> Surprisingly, we actually optimize the background in the system app away
> (from my limited testing) except during transitions, which is exactly when
> we want the background in the system app. When we scroll, we still get the
> benefits of bug 917416. Will this work for 1.4, then we can file a follow up
> bug to remove the duplicate code.

Good to hear all that!
Attachment #8381854 - Flags: review?(alive) → review+
(Assignee)

Comment 7

4 years ago
Landed in gaia master - ec159aac19ff25912f1d68ffb44b29f797583ef5
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
(Assignee)

Comment 8

4 years ago
Backed out on gaia master - df3e165ade590407677a8d78e99f8c1c0c469f11
See bug 917416.
Resolution: FIXED → WONTFIX

Updated

4 years ago
blocking-b2g: 1.4? → ---

Updated

4 years ago
Whiteboard: [c=handeye p=3 s= u=] → [c=handeye p=3 s=2014.02.28 u=]
Target Milestone: 1.4 S3 (14mar) → 1.4 S2 (28feb)
You need to log in before you can comment on or make changes to this bug.