Closed Bug 1120753 Opened 5 years ago Closed 5 years ago

Fallback to software vsync if hardware vsync fails to initialize on b2g

Categories

(Core :: Graphics, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox36 --- wontfix
firefox37 --- wontfix
firefox38 --- fixed
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: mchang, Assigned: mchang)

References

Details

Attachments

(1 file, 2 obsolete files)

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

If hardware vsync fails to initialize, fallback and use software vsync. This is required for the b2g-emulators which have no HwcComposer but still use gfxAndroidPlatform. In the cases where vsync + compositor aligned vsync are enabled but the HwcComposer fails to initialize, we won't be able to composite anything.
Requesting blocking-b2g 2.2 as this is required to enable silk by default, bug 987532.
blocking-b2g: --- → 2.2?
Attached patch Fallback to Software Vsync (obsolete) — Splinter Review
Attachment #8548321 - Flags: review?(bugmail.mozilla)
Blocks: 1118530
Summary: Fallback to software vsync is hardware vsync fails to initialize on b2g → Fallback to software vsync if hardware vsync fails to initialize on b2g
Attachment #8548321 - Flags: review?(bugmail.mozilla) → review+
blocking-b2g: 2.2? → ---
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
Attached patch Fallback to Software Vsync. v2 (obsolete) — Splinter Review
Rebased on master. Also found a bug on a flame device where we initialize the gfxPlatform before we initialize the HwcComposer vsync callbacks. Hardware vsync wouldn't be enabled yet and so we'd fallback to software vsync. This version initializes the hardware vsync callback when we create the HwcComposer instead of when we initialize the HwcComposer. Initialization of the HwcComposer occurs once we have a glcontext, which is later in the startup process.
Attachment #8548321 - Attachment is obsolete: true
Attachment #8549034 - Flags: review?(bugmail.mozilla)
Comment on attachment 8549034 [details] [diff] [review]
Fallback to Software Vsync. v2

Review of attachment 8549034 [details] [diff] [review]:
-----------------------------------------------------------------

r? mwu for HwcComposer2D changes.

::: gfx/thebes/VsyncSource.h
@@ -45,5 @@
>        // Large parts of Gecko assume TimeStamps should not be in the future such as animations
>        virtual void NotifyVsync(TimeStamp aVsyncTimestamp);
>  
>        nsRefPtr<RefreshTimerVsyncDispatcher> GetRefreshTimerVsyncDispatcher();
> -

nit: whitespace deletion

@@ -62,5 @@
>    };
>  
>    void AddCompositorVsyncDispatcher(CompositorVsyncDispatcher* aCompositorVsyncDispatcher);
>    void RemoveCompositorVsyncDispatcher(CompositorVsyncDispatcher* aCompositorVsyncDispatcher);
> -

nit: whitespace deletion
Attachment #8549034 - Flags: review?(mwu)
Attachment #8549034 - Flags: review?(bugmail.mozilla)
Attachment #8549034 - Flags: review+
Attachment #8549034 - Flags: review?(mwu) → review+
Carrying r+, updated without whitespace deletions.
Attachment #8549034 - Attachment is obsolete: true
Attachment #8549141 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/a3d8163ee939
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Comment on attachment 8549141 [details] [diff] [review]
Fallback to Software Vsync. v3

Approval Request Comment
[Feature/regressing bug #]: Required for silk, bug 987532 
[User impact if declined]: Once silk is enabled by default, mochitests will fail to execute.
[Describe test coverage new/current, TBPL]: Without this patch, all tests will fail with silk enabled by default since hardware vsync does not work on the emulators.
[Risks and why]: Low - Currently only used if silk is enabled, which is currently prefed off.
[String/UUID change made/needed]: None
Attachment #8549141 - Flags: approval-mozilla-aurora?
Comment on attachment 8549141 [details] [diff] [review]
Fallback to Software Vsync. v3

From https://bugzilla.mozilla.org/show_bug.cgi?id=1121065#c8, asking for b2g37 approval instead. Approval request in comment 8.
Attachment #8549141 - Flags: approval-mozilla-aurora? → approval-mozilla-b2g37?
Attachment #8549141 - Flags: approval-mozilla-b2g37? → approval-mozilla-b2g37+
You need to log in before you can comment on or make changes to this bug.