Closed Bug 1152461 Opened 9 years ago Closed 9 years ago

Camera app does not use HWC on master flame-kk

Categories

(Core :: Layout, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
blocking-b2g 2.5?
Tracking Status
firefox41 --- fixed
b2g-master --- affected

People

(Reporter: sotaro, Assigned: mstange)

References

Details

Attachments

(1 file)

I flashed latest master flame-kk. Camera app did not use HWC for camera preview. Camera preview's UI became tiled layer. The camera UI seemed to be decided as scrollable layer. Then it causes fallback to OpenGL rendering.
[Blocking Requested - why for this release]:
blocking-b2g: --- → 3.0?
The layout code normally causes this regression. But these bugs were normally fixed as Graphics bug. Then change component to Graphics.
Component: Layout → Graphics
Version: 37 Branch → Trunk
Could you elaborate on bug behavior? What does HWC mean? How do I tell if I'm running into the bug or not?
Flags: needinfo?(sotaro.ikeda.g)
(In reply to Pi Wei Cheng [:piwei] from comment #3)
> Could you elaborate on bug behavior? What does HWC mean? How do I tell if
> I'm running into the bug or not?

Sorry. HWC means hardware composer. It is gonk module. It typically does rendering with lower power consumption than OpenGL rendering.
   http://androidxref.com/5.1.0_r1/xref/hardware/libhardware/include/hardware/hwcomposer.h

You can check by enabling "Draw Layer Borders" or "Draw Tile Borders" in Developer in Setting app. When the borders are rendered it uses OpenGL for rendering. When the border is not shown even enabling the setting, hardware composer is used for rendering. Typically, "video full screen playback" and "camera app's camera preview" have to use hardware composer rendering for power consumption reasons.

Bug 1139541 is a recent fix of same symptom.
Flags: needinfo?(sotaro.ikeda.g)
Bug 1139541 Comment 4 also explains how to check it.
QA Contact: bzumwalt
Mozilla-Inbound Regression Window:

Tested by enabling "Draw Layer Borders", "Draw Tile Borders", and "Frames Per Second". If these elements appeared in camera when autofocus was not on screen, this issue was considered to be occurring.

Last working Mozilla-Inbound build:
Device: Flame 3.0
Build ID: 20150402114235
Gaia: f37be8b44cb7c3a147b9615ab76743b760f08eeb
Gecko: 8f7ab41e6cc8
Version: 40.0a1 (3.0)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:40.0) Gecko/40.0 Firefox/40.0

First broken Mozilla-Inbound build:
Device:  Flame 3.0
BuildID: 20150402115556
Gaia: f37be8b44cb7c3a147b9615ab76743b760f08eeb
Gecko: d0fc7202b4cb
Version: 40.0a1 (3.0)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:40.0) Gecko/40.0 Firefox/40.0


Working Gaia with Broken Gecko issue DOES reproduce:
Gaia: f37be8b44cb7c3a147b9615ab76743b760f08eeb
Gecko: d0fc7202b4cb

Working Gecko with Broken Gaia issue does NOT reproduce:
Gaia: f37be8b44cb7c3a147b9615ab76743b760f08eeb
Gecko: 8f7ab41e6cc8


Mozilla-Inbound Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=8f7ab41e6cc8&tochange=d0fc7202b4cb


Issue may have been caused by changes made in bug 1148855
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Markus, can you take a look at this please? Looks like the landing for bug 1148855 might be the culprit here.
Blocks: 1148855
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker) → needinfo?(mstange)
Component: Graphics → Layout
Whiteboard: gfx-noted
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage?]
Flags: needinfo?(mstange)
Flags: needinfo?(mstange)
The layer tree contains a layer whose animated geometry root is the canvas frame of the document, and its parent is an HTMLScroll frame, and so the layer gets marked as scrollable. Sotaro, do you know why we didn't get a tiled layer here before? I can check what happens if I back out bug 1148855, but maybe you know the answer.
Flags: needinfo?(mstange) → needinfo?(sotaro.ikeda.g)
Oh, so maybe this is a regression from bug 1148022 instead - there might be a visible:hidden style on the root element that we now ignore for the purposes of animated geometry root detection.
(In reply to Markus Stange [:mstange] from comment #8)
> The layer tree contains a layer whose animated geometry root is the canvas
> frame of the document, and its parent is an HTMLScroll frame, and so the
> layer gets marked as scrollable. Sotaro, do you know why we didn't get a
> tiled layer here before? I can check what happens if I back out bug 1148855,
> but maybe you know the answer.

Sorry, I do not know the answer :-(
Flags: needinfo?(sotaro.ikeda.g)
Yeah, backing out bug 1148022 fixes this. I'm going to try to find a solution.
Blocks: 1148022
No longer blocks: 1148855
Attached patch patchSplinter Review
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Attachment #8603451 - Flags: review?(tnikkel)
Comment on attachment 8603451 [details] [diff] [review]
patch

Changing this to a nsIScrollableFrame check from a GetType check means that list control frames will now pass. Which seems fine.
Attachment #8603451 - Flags: review?(tnikkel) → review+
Good point, I hadn't thought of that. But I agree, it should be fine.
https://hg.mozilla.org/mozilla-central/rev/f9a7c383cd05
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Depends on: 1168889
This patch is making B2G desktop flicker a lot. See bug 1168889.
Depends on: 1169093
Depends on: 1167739
Depends on: 1170825
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: