Camera app does not use HWC on master flame-kk

RESOLVED FIXED in Firefox 41

Status

()

Core
Layout
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: sotaro, Assigned: mstange)

Tracking

Trunk
mozilla41
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking-b2g:2.5?, firefox41 fixed, b2g-master affected)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
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.
(Reporter)

Comment 1

3 years ago
[Blocking Requested - why for this release]:
blocking-b2g: --- → 3.0?
(Reporter)

Updated

3 years ago
Keywords: qawanted, regressionwindow-wanted
(Reporter)

Comment 2

3 years ago
The layout code normally causes this regression. But these bugs were normally fixed as Graphics bug. Then change component to Graphics.
Component: Layout → Graphics
(Reporter)

Updated

3 years ago
Version: 37 Branch → Trunk
Whiteboard: gfx-noted
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)
(Reporter)

Comment 4

3 years ago
(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)
(Reporter)

Comment 5

3 years ago
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)
Keywords: qawanted, regressionwindow-wanted
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
Blocks: 1139541
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage?]
status-b2g-master: --- → affected
Flags: needinfo?(mstange)
Flags: needinfo?(mstange)
(Assignee)

Comment 8

3 years ago
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)
(Assignee)

Comment 9

3 years ago
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.
(Reporter)

Comment 10

3 years ago
(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)
(Assignee)

Comment 11

3 years ago
Yeah, backing out bug 1148022 fixes this. I'm going to try to find a solution.
Blocks: 1148022
No longer blocks: 1148855
(Assignee)

Comment 12

3 years ago
Created attachment 8603451 [details] [diff] [review]
patch
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+
(Assignee)

Comment 14

3 years ago
Good point, I hadn't thought of that. But I agree, it should be fine.
(Assignee)

Comment 15

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/f9a7c383cd05
https://hg.mozilla.org/mozilla-central/rev/f9a7c383cd05
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox41: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41

Updated

2 years ago
Depends on: 1168889

Comment 17

2 years ago
This patch is making B2G desktop flicker a lot. See bug 1168889.

Updated

2 years ago
Depends on: 1169093
(Assignee)

Updated

2 years ago
Depends on: 1167739
(Assignee)

Updated

2 years ago
Depends on: 1170825
You need to log in before you can comment on or make changes to this bug.