Bug 1325072 - fall back to sw vsync source when Java environment is not available. r?snorp
MozReview-Commit-ID: KYWKB1WWdzp
--- a/gfx/thebes/gfxAndroidPlatform.cpp
+++ b/gfx/thebes/gfxAndroidPlatform.cpp
@@ -416,16 +416,16 @@ private:
static Display globalDisplay;
return globalDisplay;
}
};
already_AddRefed<mozilla::gfx::VsyncSource>
gfxAndroidPlatform::CreateHardwareVsyncSource()
{
- if (java::VsyncSource::IsVsyncSupported()) {
+ if (jni::IsAvailable() && java::VsyncSource::IsVsyncSupported()) {
RefPtr<AndroidVsyncSource> vsyncSource = new AndroidVsyncSource();
return vsyncSource.forget();
}
NS_WARNING("Vsync not supported. Falling back to software vsync");
return gfxPlatform::CreateHardwareVsyncSource();
}