Closed Bug 1121897 Opened 9 years ago Closed 6 years ago

Postpone or asynchronize getIconForSplash() to set browser frame src earlier

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ting, Unassigned)

References

Details

Refer to the profile at bug 1110624 comment 6, aw_getIconForSplash() takes ~10ms [1660,1670] before aw_render(). This can be either postponed or done asynchronously so we can let content process to receive the url earlier.
Setting the image src in aw_preloadSplash() triggers jar inflating and async DecodePool::DeocdeSomeOfImage(), but the backgroundImage setting in aw_setFrameBackground() triggers  sync DecodePool::DecodeABitOf() and DeocdePool::DecodeSomeOfImage().
To fix the problem, I found you can simply by change the flag in [1] to FLAG_NONE.

After some trace, I think make mDecodeOnDraw = true by [2] should help, too. But [3] makes all non-JPEG image's imageFlags to FLAG_NONE and make RasterImage::mDecodeOnDraw = false.

That means only JPEG image can decode on draw. And the image of slash is fully decoded while tracked by nsDocument.

[1]https://dxr.mozilla.org/mozilla-central/source/image/src/RasterImage.cpp#1484
[2]https://dxr.mozilla.org/mozilla-central/source/b2g/app/b2g.js?from=b2g.js&case=true#322
[3]https://dxr.mozilla.org/mozilla-central/source/image/src/ImageFactory.cpp#74
Blocks: gfxperf
Blocks: 1110624
No longer blocks: AppStartup
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.