Closed Bug 1138735 Opened 9 years ago Closed 9 years ago

Fallback to software vsync if CVDisplayLink fails to initialize

Categories

(Core :: Graphics, defect, P2)

ARM
All
defect

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: mchang, Assigned: mchang)

References

()

Details

Attachments

(1 file)

Fallback to software vsync on OS X if CVDisplayLink has an error initializing.
Just a check to make sure we can enable hardware vsync. Otherwise default back to software vsync.
Attachment #8571669 - Flags: review?(bugmail.mozilla)
Attachment #8571669 - Flags: review?(mstange)
Attachment #8571669 - Flags: review?(bugmail.mozilla)
Attachment #8571669 - Flags: feedback+
Comment on attachment 8571669 [details] [diff] [review]
Fallback to software vsync if hardware vsync is unavailable on OS X

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

::: gfx/thebes/gfxPlatformMac.cpp
@@ +555,5 @@
> +    NS_WARNING("OS X Vsync source not enabled. Falling back to software vsync.\n");
> +    return gfxPlatform::CreateHardwareVsyncSource();
> +  }
> +
> +  primaryDisplay.DisableVsync();

What's this for? If it's needed, why weren't we doing this before?
(In reply to Markus Stange [:mstange] from comment #2)
> Comment on attachment 8571669 [details] [diff] [review]
> Fallback to software vsync if hardware vsync is unavailable on OS X
> 
> Review of attachment 8571669 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/thebes/gfxPlatformMac.cpp
> @@ +555,5 @@
> > +    NS_WARNING("OS X Vsync source not enabled. Falling back to software vsync.\n");
> > +    return gfxPlatform::CreateHardwareVsyncSource();
> > +  }
> > +
> > +  primaryDisplay.DisableVsync();
> 
> What's this for? If it's needed, why weren't we doing this before?

It's just to make sure that we can use hardware vsync. If we can't for whatever reason, we can still fallback to software vsync. We weren't doing it before because I write bugs :). Sorry! But we do this on b2g as well and Windows [1].

[1] https://dxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxWindowsPlatform.cpp?from=gfxWindowsPlatform.cpp#2116
Comment on attachment 8571669 [details] [diff] [review]
Fallback to software vsync if hardware vsync is unavailable on OS X

Makes sense, thanks.
Attachment #8571669 - Flags: review?(mstange) → review+
https://hg.mozilla.org/mozilla-central/rev/57e351862f31
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: