mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Backed out changeset 21222476d9d9 (bug 1249640)
This commit is contained in:
parent
29fb1c5cca
commit
61814a3698
@ -414,6 +414,23 @@ gfxAndroidPlatform::RequiresLinearZoom()
|
||||
return gfxPlatform::RequiresLinearZoom();
|
||||
}
|
||||
|
||||
bool
|
||||
gfxAndroidPlatform::UseAcceleratedSkiaCanvas()
|
||||
{
|
||||
return HaveChoiceOfHWAndSWCanvas() && gfxPlatform::UseAcceleratedSkiaCanvas();
|
||||
}
|
||||
|
||||
bool gfxAndroidPlatform::HaveChoiceOfHWAndSWCanvas()
|
||||
{
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
if (!AndroidBridge::Bridge() || AndroidBridge::Bridge()->GetAPIVersion() < 11) {
|
||||
// It's slower than software due to not having a compositing fast path
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return gfxPlatform::HaveChoiceOfHWAndSWCanvas();
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
class GonkVsyncSource final : public VsyncSource
|
||||
{
|
||||
|
@ -85,6 +85,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool HaveChoiceOfHWAndSWCanvas() override;
|
||||
virtual bool UseAcceleratedSkiaCanvas() override;
|
||||
virtual already_AddRefed<mozilla::gfx::VsyncSource> CreateHardwareVsyncSource() override;
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
|
@ -125,8 +125,6 @@ NS_IMPL_ISUPPORTS_INHERITED(GfxInfo, GfxInfoBase, nsIGfxInfoDebug)
|
||||
GfxInfo::GfxInfo()
|
||||
: mInitialized(false)
|
||||
, mGLStrings(new GLStrings)
|
||||
, mOSVersionInteger(0)
|
||||
, mSDKVersion(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -183,14 +181,13 @@ GfxInfo::EnsureInitialized()
|
||||
mAdapterDescription.AppendPrintf(", Manufacturer: %s", NS_LossyConvertUTF16toASCII(mManufacturer).get());
|
||||
}
|
||||
|
||||
if (mozilla::AndroidBridge::Bridge()->GetStaticIntField("android/os/Build$VERSION", "SDK_INT", &mSDKVersion)) {
|
||||
// the HARDWARE field isn't available on Android SDK < 8, but we require 9+ anyway.
|
||||
MOZ_ASSERT(mSDKVersion >= 8);
|
||||
if (mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "HARDWARE", mHardware)) {
|
||||
mAdapterDescription.AppendPrintf(", Hardware: %s", NS_LossyConvertUTF16toASCII(mHardware).get());
|
||||
}
|
||||
} else {
|
||||
mSDKVersion = 0;
|
||||
int32_t sdkVersion;
|
||||
if (!mozilla::AndroidBridge::Bridge()->GetStaticIntField("android/os/Build$VERSION", "SDK_INT", &sdkVersion))
|
||||
sdkVersion = 0;
|
||||
|
||||
// the HARDWARE field isn't available on Android SDK < 8
|
||||
if (sdkVersion >= 8 && mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build", "HARDWARE", mHardware)) {
|
||||
mAdapterDescription.AppendPrintf(", Hardware: %s", NS_LossyConvertUTF16toASCII(mHardware).get());
|
||||
}
|
||||
|
||||
nsString release;
|
||||
@ -410,12 +407,6 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature,
|
||||
|
||||
// Don't evaluate special cases when evaluating the downloaded blocklist.
|
||||
if (aDriverInfo.IsEmpty()) {
|
||||
if (aFeature == nsIGfxInfo::FEATURE_CANVAS2D_ACCELERATION) {
|
||||
// It's slower than software due to not having a compositing fast path
|
||||
*aStatus = (mSDKVersion >= 11) ? nsIGfxInfo::FEATURE_STATUS_OK : nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (aFeature == FEATURE_WEBGL_OPENGL) {
|
||||
if (mGLStrings->Renderer().Find("Adreno 200") != -1 ||
|
||||
mGLStrings->Renderer().Find("Adreno 205") != -1)
|
||||
|
@ -92,7 +92,6 @@ private:
|
||||
nsString mModel, mHardware, mManufacturer, mProduct;
|
||||
nsCString mOSVersion;
|
||||
uint32_t mOSVersionInteger;
|
||||
int32_t mSDKVersion;
|
||||
};
|
||||
|
||||
} // namespace widget
|
||||
|
Loading…
Reference in New Issue
Block a user