Closed Bug 1188877 Opened 9 years ago Closed 9 years ago

[Z3c KK] HWComposer regression, shows homescreen icons instead of app content

Categories

(Core :: Graphics, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: gerard-majax, Assigned: sotaro)

References

Details

(Keywords: foxfood, regression)

Attachments

(2 files, 2 obsolete files)

I'm pretty confident this is a regression after bug 1175463 landed: I had a build done just before it landed and this behavior was not there. Then I did a new build with updated hardware/qcom/display and the issue happens.

Basically, upon loading of apps (any, but I saw it quite often with at least Email and Twitter), you get corrupted display where the background of the app is replaced with the homscreen layer that contains apps icons and their names. The app itself is properly usable except it's totally unreadable.

Often, focusing a text field or switching apps will trigger a proper redraw.

STR:
 0. Launch app

Expected:
 Proper content

Actual:
 Sometimes, quite often indeed but I don't have figures, we get the layer with homescreen icons and app names instead of the content of the app
Flags: needinfo?(sotaro.ikeda.g)
I'll try to get a screenshot next time I reproduce.
:gerard-majax, can you answer the questions?
- Is Hardware composer composition enabled on your device?
- Do you flash also kernel?
Flags: needinfo?(sotaro.ikeda.g) → needinfo?(lissyx+mozillians)
(In reply to Sotaro Ikeda [:sotaro] from comment #2)
> :gerard-majax, can you answer the questions?
> - Is Hardware composer composition enabled on your device?

Yes

> - Do you flash also kernel?

Yes. I do flash absolutely everything.
Flags: needinfo?(lissyx+mozillians)
Flags: needinfo?(sotaro.ikeda.g)
:gerard-majax, when the problem happens, does the app have scrollable frame? When a scrollable frame exist, HWC composition does not happen, instead only OpenGL composition happens.
Flags: needinfo?(lissyx+mozillians)
I don't know. How can I know ?
Flags: needinfo?(lissyx+mozillians)
(In reply to Alexandre LISSY :gerard-majax from comment #5)
> I don't know. How can I know ?

If you can scroll or pan/zoom in application, an application normally have a scrollable layer.

Another way is, enabling "Draw Layer Borders" and "Draw Tile Borders" in "Developer" in Setting app. It draws layer borders and tile borders. Scrollable frame is rendered as tiled layer. Then you can see the tiles' borders as green line if the application have a tiled layer. When you see the tiles' border, hwc is not used for composition. When you see layer border, hwc is not used for composition except video(Yuv) rendering.
Flags: needinfo?(sotaro.ikeda.g)
On latest master, all application's layer seems not rendered as full hwc composition on Z3C on my side. Therefore, the problem seems not related hwc's composition.
Reproduced consistently:
 0. Open Email client, go to a folder
 1. Tap the "Compose" button

Sadly, a screenshot do not show it.
Attached image DSC_0811.JPG (deleted) β€”
Assignee: nobody → sotaro.ikeda.g
I could also reproduce the problem on latest master aries. The problem happens only when hwc composition is enabled. Therefore hwc seems to be related to the problem. But bug 1175463 is not related to the problem. Even when rollbacked the change of bug 1175463, the problem did not fix. And the changed code was not used when the problem happens.
Remove dependency to 1175463 from comment 10.
No longer depends on: 1175463
Component: GonkIntegration → Graphics
Product: Firefox OS → Core
When the problem happens hwc always did partial OVERLAY composition(GL and hwc mixed composition).
The following code in HwcComposer2D::TryHwComposition() does not work as expected.

                    // HWC will compose HWC_OVERLAY layers in partial
>                    // Overlay Composition, set layer composition flag
>                    // on mapped LayerComposite to skip GPU composition
>                    mHwcLayerMap[k]->SetLayerComposited(true);
>                    if ((mList->hwLayers[k].hints & HWC_HINT_CLEAR_FB) &&
>                        (mList->hwLayers[k].blending == HWC_BLENDING_NONE)) {
>                        // Clear visible rect on FB with transparent pixels.
>                        hwc_rect_t r = mList->hwLayers[k].displayFrame;
>                        mHwcLayerMap[k]->SetClearRect(nsIntRect(r.left, r.top,
>                                                                r.right - r.left,
>                                                                r.bottom - r.top));
>                    }

https://dxr.mozilla.org/mozilla-central/source/widget/gonk/HwcComposer2D.cpp#688
This seems like a regression of Bug 1073252.
Blocks: 1073252
Attached patch patch - Fix LayerComposite::SetClearRect() calling (obsolete) (deleted) β€” β€” Splinter Review
The patch seems to fix the problem.
Comment on attachment 8640761 [details] [diff] [review]
patch - Fix LayerComposite::SetClearRect() calling

:gerard-majax, can you try if the patch fix the problem?
Attachment #8640761 - Flags: feedback?(lissyx+mozillians)
Attached patch patch - Fix LayerComposite::SetClearRect() calling (obsolete) (deleted) β€” β€” Splinter Review
Remove unnecessary check.
Attachment #8640761 - Attachment is obsolete: true
Attachment #8640761 - Flags: feedback?(lissyx+mozillians)
Comment on attachment 8640802 [details] [diff] [review]
patch - Fix LayerComposite::SetClearRect() calling

:gerard-majax, can you try if the patch fix the problem?
Attachment #8640802 - Flags: feedback?(lissyx+mozillians)
Comment on attachment 8640802 [details] [diff] [review]
patch - Fix LayerComposite::SetClearRect() calling

Oh, I updated incorrect patch.
Attachment #8640802 - Flags: feedback?(lissyx+mozillians)
Correct patch.
Attachment #8640802 - Attachment is obsolete: true
Attachment #8640805 - Flags: feedback?(lissyx+mozillians)
Comment on attachment 8640805 [details] [diff] [review]
patch - Fix LayerComposite::SetClearRect() calling

I'm not able to ever reproduce once this is applied, thanks!
Attachment #8640805 - Flags: feedback?(lissyx+mozillians) → feedback+
(In reply to Alexandre LISSY :gerard-majax from comment #21)
> Comment on attachment 8640805 [details] [diff] [review]
> patch - Fix LayerComposite::SetClearRect() calling
> 
> I'm not able to ever reproduce once this is applied, thanks!

Good. Thanks for the confirmation!
Attachment #8640805 - Flags: review?(mwu)
Attachment #8640805 - Flags: review?(mwu)
Attachment #8640805 - Flags: review?(mwu)
Attachment #8640805 - Flags: review?(mwu) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/0bd29e2ee5fa
https://hg.mozilla.org/mozilla-central/rev/0bd29e2ee5fa
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: